From b0b83f8a7b7603104cf014bf25aac5f1a7e8a37b Mon Sep 17 00:00:00 2001 From: Ge Wang Date: Mon, 20 May 2024 00:31:58 -0700 Subject: [PATCH] add example blit3.ck --- VERSIONS | 4 ++- examples/basic/blit3.ck | 54 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 examples/basic/blit3.ck diff --git a/VERSIONS b/VERSIONS index 8badcfc65..665876769 100644 --- a/VERSIONS +++ b/VERSIONS @@ -9,7 +9,9 @@ ChucK VERSIONS log - (added) command line query system `--query:` - (added) examples/deep/smb.ck -- a ChucK rendition of Super Mario Bros. original theme by Koji Kondo; modeled in ChucK by Wesley Burchell in 2017 -- (fixed) globals events system synchronization +- (added) examples/basic/blit3.ck -- lounge blit; made for svork concert lounge music +- (fixed) globals events system synchronization (this fixes a long-running, + elusive Chunity crashing bug) 1.5.2.4 (April 2024) diff --git a/examples/basic/blit3.ck b/examples/basic/blit3.ck new file mode 100644 index 000000000..99031b3d8 --- /dev/null +++ b/examples/basic/blit3.ck @@ -0,0 +1,54 @@ +// name: blit3.ck +// desc: lounge blit +// date: spring 2024; made for svork's concert lounge music + +// a duration +250::ms => dur T; + +// patch +Blit s => LPF lpf => ADSR e => DelayL eicho => JCRev r => dac; +// feedback +eicho => Gain g(.8) => eicho; + +// delay settings +T*2/3 => eicho.max => eicho.delay; +// reverb mix +.15 => r.mix; +// lowpass cutoff +8000 => lpf.freq; + +// set adsr +e.set( 15::ms, 13::ms, .5, 35::ms ); + +// intervals array +[ 0, 2, 4, 7, 9, 11 ] @=> int hi[]; +// roots array +[ 33, 24 ] @=> int roots[]; + +// infinite time loop +while( true ) +{ + // for each root + for( int r : roots ) + { + // repeat with r for some number of times + repeat( Math.random2(16,32) ) + { + // frequency + Std.mtof( r + Math.random2(0,3) * 12 + + hi[Math.random2(0,hi.size()-1)] ) => s.freq; + + // harmonics + Math.random2( 1, 5 ) => s.harmonics; + + // key on + e.keyOn(); + // advance time + T-e.releaseTime() => now; + // key off + e.keyOff(); + // advance time + e.releaseTime() => now; + } + } +}