BandedWG m => JCRev r => dac; StringTokenizer perry; // substring parser ConsoleInput skot; // stdin line grabber // defined out here to alleviate broken garbage collector 1 => int running; string out[6]; int i; float cnum,cval; float strike; // infinite event loop while( running ) { skot.prompt( "" ) => now; // prompt for line while( skot.more() ) // loop over lines { skot.getLine() => perry.set; // set the line 0 => i; while( perry.more() ) // process line { perry.next( out[i] ); // get all fields // <<< out[i] >>>; i + 1 => i; } } if (out[0]=="ExitProgram") 0 => running; // check for Exit else if (out[0]=="NoteOn") { strike => m.pluck; // noteOn <<< strike >>>; } else if (out[0]=="NoteOff") 1 => m.noteOff; // noteOff else if (out[0]=="AfterTouch") { // strike vigor Std.atof(out[3]) / 127.0 => strike; } else if (out[0]=="PitchBend") { Std.mtof(Std.atof(out[3])) => m.freq; } else if (out[0]=="ControlChange") { Std.atoi(out[3]) => cnum; // control number Std.atof(out[4]) / 128.0 => cval; // control value if (cnum==1) cval => r.gain; // master volume if (cnum==2) cval => m.bowPressure; // bow pressure if (cnum==4) cval => m.bowMotion; // bow motion if (cnum==8) cval => m.strikePosition; // strike/bow position if (cnum==11) cval => m.integrationConstant; // huh? if (cnum==128) cval=> m.bowRate; // bow rate if (cnum==64) { if (Std.atoi(out[4])==0) 1.0 => m.startBowing; else 1.0 => m.stopBowing; } if (cnum==44) cval => r.mix; // reverb mix if (cnum==16) { (16, Std.atoi(out[4])) => m.controlChange; } } }