Saturday, 20 February 2010

Max5 - Handling Sound

As previously explained you can have inputs to Max5 using the following objects:


 

But as well as these there are many more things you can do to manipulate the inputs using other objects and messages as follows:

The previous is another way of toggling between on and off but this time using messages such as 1's and 0's to give it a state.

The following is a form using the Max5 keyboard in the patcher so that whenever you click a note on the keyboard the appropriate sound will be outputted to the speakers or headphones:

 
As you can see this uses the notein and noteout objects.
You can also add more interaction and better handling by using other objects. The following is a input from a mic to a output such as a speaker. 

adc~    =   analogue to digital converter
dac~    =   digital to analogue converter

These can also be used by using the speaker and microphone symbols,  I have used both in the following:

As you can see with the following you can also have sliders as volume controls or to control the synthesis of a sound, the bars labeled input and output show the volume at each interval. There is also a number box to show the volume.

But what about opening from files? You can not only open files but you can play, stop and pause where appropriate:

 
 All of the actions made on the sound are message boxes as this is the best way of a human controling the sound as if it were all code it would get very confusing.

Here is a more complicated way of manipulating sound in max5 I will try and explain what I can:


 
The previous example is a loop with a stop and start button along with the toggle button which sort of does the same thing, the 0.5 is half way to 1 so this makes the sound play half speed. The groove is connected to a buffer, if both of them have the same name then they automically relate to each other, if you do this wrong you will have a error outputted but once they have been connected and related to each other the error message will dissapear. The 1 or 2 represents the sound output, mono for one speaker or stereo for two speakers. I have used the speaker symbol here instead of the dac~ to give you a better understanding of its use. The min and max points in the number boxes do exactly as it says. The buffer looks like this:


Simple read message sent to the buffer which has been related to its groove~ object, the length of what we want and 1 or 2 for the sound outputs.

No comments:

Post a Comment