Skip to content

Commit

Permalink
add example blit3.ck
Browse files Browse the repository at this point in the history
  • Loading branch information
gewang committed May 20, 2024
1 parent 54aba1d commit b0b83f8
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
4 changes: 3 additions & 1 deletion VERSIONS
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ ChucK VERSIONS log
- (added) command line query system `--query:<name>`
- (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)
Expand Down
54 changes: 54 additions & 0 deletions examples/basic/blit3.ck
Original file line number Diff line number Diff line change
@@ -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;
}
}
}

0 comments on commit b0b83f8

Please sign in to comment.