Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

36 lines (29 sloc) 0.8 kB
// use noteOff
// overlap requires multiple voices per channel
// assign output channel in the beep function
2 => int nChans;
// same number of UGens but they'll switch channels
TubeBell ch[nChans];
for (0=>int c; c<nChans; c++)
new TubeBell @=> ch[c];
ch[c].gain(1.0/nChans); // automatically scale output
fun void beep( int n )
n-1 => int c;
for (0=>int i; i<n; i++)
ch[i] => dac.chan(c); // connect bells to this channel
1000::ms => now;
500::ms => now;
for (0=>int i; i<n; i++)
ch[i].noteOff(0.0); // leave gain up, damp with noteOff
1000::ms => now;
for (0=>int i; i<n; i++) ch[i] =< dac.chan(c); // disconnect bells from this channel
while (true) for (1=>int n; n<=nChans; n++) beep(n);
Jump to Line
Something went wrong with that request. Please try again.