concept clarinet sound in category chuck

appears as: clarinet sound
Programming for Musicians and Digital Artists: Creating music with ChucK

This is an excerpt from Manning's book Programming for Musicians and Digital Artists: Creating music with ChucK.

Listing 6.4 shows a simple example of using the Envelope and SqrOsc UGens to make a clarinet sound. Note that you connect the oscillator through the Envelope to the dac . After setting an initial frequency , you use a while loop to play individual notes by triggering the Envelope , waiting a bit to let it smoothly rise, and then turning the Envelope off (again waiting a bit to let it ramp down). We use a loop to play what’s called a “harmonic series,” increasing the pitch by 55 Hz. each time .