Debian Codegraph @

examples/special/LiSa-load.ck

raw
1 //-----------------------------------------------------------------------------
2 // name: LiSa-load.ck
3 // desc: loading an audio file into a LiSa
4 // requires: chuck-1.5.5.6 (see LiSa-load-classic.ck for older method)
5 //
6 // author: Nick Shaheed (2025): at last, a read function
7 // this drastically shortens the code needed (compared to the "classic" method)
8 // this also increases performance for audio file loading by around 100x (!)
9 // ~~~~~~~~~~~~~~~
10 // Ge Wang (2021): rolled function, added twilight
11 // sound (see twilight-granular-kb-interp.ck for more info)
12 // and bi-directional loop
13 // Dan Trueman (2007): original example; was LiSa-SndBuf.ck
14 //-----------------------------------------------------------------------------
15
16 // instantiate a LiSa audio file name; connect to dac
17 LiSa lisa( "twilight/twilight-granular.aiff" ) => dac;
18
19 // alternately can use the .read() function
20 // lisa.read( "twilight/twilight-granular.aiff" );
21
22 // party on...
23 2 => lisa.rate; // rate!
24 1 => lisa.loop; // loop it!
25 1 => lisa.bi; // bi-directional loop!
26 1 => lisa.play; // play!
27
28 // commence party
29 while( true ) 1::second => now;