Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

35 lines (27 sloc) 0.772 kB
// gen7: line segment table generator
// probably superceded by CurveTable
// ported to ChucK from rtcmix by dan trueman
// see luke's page: http://www.music.columbia.edu/cmix/makegens.html#03
// make one, no sound
Gen7 g7;
// set up the values [0,1] and distances in the table
// first arg is initial value
// followed by pairs indicating distance (total distance = 1)
// and destination value for linear segments
// set coefficients
[0., 0.5, 1., 0.5, 0.] => g7.coefs;
// create an envelope to scan through the table values
Envelope e => blackhole;
e.duration(10000::ms);
0. => e.value;
e.keyOn();
// loop
while (true)
{
// print
<<< e.value(), g7.lookup(e.value()) >>>;
// end
if(e.value() == 1.) break;
// advance time
10::ms => now;
}
Jump to Line
Something went wrong with that request. Please try again.