Explanation of the Concepts
Wavetable synthesis is the technique that digital 'samplers' use to create sound. The basic idea is that a short recording, known as an audio-sample (notice the conflicting use of the word 'sample', which also refers to a single number in an audio file) is stored in a buffer known as a 'wavetable'. When the user presses a key, the beginning of the wavetable (the 'attack') is played, and then the center of the table (the 'sustain loop') is looped until the user releases the key, at which time the end of the wavetable (the 'release') is played. A wavetable can be played back at different pitches using interpolation, as discussed in the previous chapter. Wavetable synthesis, by extension, can also be used to create new and unusual timbres. This chapter will show how to use MKAiff to insert data into an aiff file that stores the information needed by wavetable synthesis algorithms. Then, a relatively complete wavetable-synthesis algorithm will be constructed from successively more complicated examples.