Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
// just add Arx (and MIDI Patchbay) MidiIn min; MidiMsg msg; if ( !min.open(0) ) me.exit(); SndBuf s[50]; "hihat-open.wav" => s[36].read; "hihat.wav" => s[42].read; "kick.wav" => s[39].read; "kick.wav" => s[41].read; "snare-chili.wav" => s[37].read; "snare-hop.wav" => s[43].read; "snare.wav" => s[45].read; for( 0 => int i; i < s.cap(); i++) s[i] => dac; while( true ) { min => now; while( min.recv( msg ) ) { <<< msg.data1, msg.data2, msg.data3 >>>; if(msg.data1 >= 0x90 && msg.data1 < 0xa0) { 0 => s[msg.data2].pos; (msg.data3 / 127.0) * 0.9 => s[msg.data2].gain; (msg.data3 / 127.0) * 0.2 + 0.9 => s[msg.data2].rate; } } }
This paste will be private.
From the Design Piracy series on my blog: