Skip to content

Instantly share code, notes, and snippets.

@stuntgoat
Last active December 31, 2015 11:29
Show Gist options
  • Save stuntgoat/7980253 to your computer and use it in GitHub Desktop.
Save stuntgoat/7980253 to your computer and use it in GitHub Desktop.
// TODO:
// create an array for each pulse on/off cycle
// an array of volume
// an array for
"audio/hey.wav" => string hey;
"audio/hi.wav" => string hi;
"audio/ho.wav" => string ho;
// fun void sequence(int duration, int pulse, string filename) {
fun void sequence(int duration, string filename) {
SndBuf buf => dac;
filename => buf.read;
while(true) {
0 => buf.pos;
duration::ms => now;
}
}
spork ~ sequence(500, hey);
spork ~ sequence(600, hi);
spork ~ sequence(700, ho);
while( true )
1::second => now;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment