Wavetables and buffers store sample information of the sound that can be used/manipulated at a later time. Buffers are also what store audio that you are recording for later use. While recording sounds and or loading sound is fun, sometimes algorithmically generating a buffer can yield interesting timbres. In this short post I will be looking at one way to generate a buffer that produces a fun noisy timbre.
First we will set Max/MSP up to write a buffer with the click of a button. First we will create a buffer (buffer~), name it whatever you like and give it a time of 11.61. This is how many milliseconds the buffer will be. This number can change or scaled to accommodate for more values. 11 milliseconds is about 512 samples so you would need 22 milliseconds for 1024 etc.
The main object that will release numbers is uzi. uzi will count up to whatever number you give it in order. This is how we are indexing sample values as well as creating sample values. Uzi needs to release its numbers into an expression. The expr object is what you would use to write an expression. In my example below the expression is (cos($i1)/511) * 500. I am using t i i to release the numbers generated by uzi into different objects without having timing issues. Pack is then used to gather the index and the value and send them together to peek~.
To play the sound I am using wave~ to play the buffer back as a period wave. You can also use play~ to read the buffer at different speeds.
This same method can be used to write windows for granular synthesis and by using index~ to read it back for amplitude values. Either way, writing your own buffer for wavetable synthesis, granular synthesis or windowing is a very important technique that can yield rich results.