Note: Since you can specify time in Max in floating-point milliseconds, the resolution of the scheduler varies depending on how often it runs. It is perhaps useful to think of there being effectively two different rates of activity: the slower control rate of Max's scheduler, and the faster audio sample rate. Max messages travel much more slowly, at what is often referred to as a control rate. For each millisecond of audio, MSP must produce about 44 sample values (assuming an audio sample rate of 44,100 Hz), so for each sample it must look up the proper value in each oscillator and multiply those two values to produce the output sample.Įven though many MSP objects accept input values expressed in milliseconds, they calculate samples at an audio sampling rate.
#Max msp 8 full#
Those increasing numbers will be used as the right operand in the *~ for each sample of the audio waveform, and the result will be that the 2000 Hz tone will fade in linearly from silence to full amplitude each second. Over the course of each second, the (sub-audio) sawtooth wave output of the phasor~ object sends a continuous ramp of increasing values from 0 to 1. In this example, a cosine waveform oscillator with a frequency of 2000 Hz (the cycle~ object) has its amplitude scaled (every sample is multiplied by some number in the *~ object) then sent to the digital-to-analog converter ( dac~). These calculations are made by each object, based on the configuration of the signal network.Īn oscillator (cycle~), and an amplifier (*~) controlled by another oscillator (phasor~) The way MSP handles this is to calculate, on an ongoing basis, all the numbers that will be needed to produce the next few milliseconds of audio. This rate - 1000 times per second - is generally fast enough for any sort of control one might want to exert over external devices such as synthesizers, or over visual effects such as QuickTime movies.ĭigital audio, however, must be processed at a much faster rate - commonly 44,100 times per second per channel of audio.
The basic unit of time for scheduling events in Max is the millisecond (0.001 seconds).
#Max msp 8 Patch#
If you think of a signal network in this way - as a very fast patch - then it still makes sense to think of MSP objects as ‘sending’ and ‘receiving’ messages (even though those messages are sent faster than Max can see them), so we will continue to use standard Max terminology such as send, receive, input, and output for MSP objects. What happens in between those millisecond intervals is calculated and performed by MSP.
Max, and you the user, can only directly affect that signal portion of the patch every millisecond. So, even without any specific Max message being sent, the *~ object is receiving the output from the two sig~ objects, and any object connected to the outlet of *~ would be receiving the product 0.75.Īnother way to think of a MSP signal network is as a portion of a patch that runs at a faster (audio) rate than Max. In the MSP example on the right, however, each outlet that is connected as part of the signal network is constantly contributing its current value to the equation. Only then does the number box receive, display, and send out the number 0.75.
When the user clicks on the button, the float object sends out its stored value. In the Max example on the left, the number box doesn't know about the number 0.75 stored in the float object. Max messages occur at a specific instant MSP objects are in constant communication