Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates after moving Boids to its own repo
- Loading branch information
1 parent
7f88622
commit ffb747e
Showing
16 changed files
with
55 additions
and
2,301 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
+ MIDIFunc { | ||
|
||
ccNRPN {|ccNum, action| | ||
var list, seq, ccNum_in = 0, valIn = 0; | ||
list = #[99, 98, 6, 38]; // the channels the 14-bit message (and it's ccNum) come in on | ||
seq = Pseq(list, 1).asStream; // don't edit this yet... probably a more simple way to do this | ||
CCResponder({arg src, chan, num, val; | ||
if(num == seq.next) { | ||
switch(num) | ||
{99} {ccNum_in = ccNum_in | (val << 7)} | ||
{98} {ccNum_in = ccNum_in | val} | ||
{6} {valIn = valIn | (val << 7) } | ||
{38} { | ||
valIn = valIn | val; | ||
if(ccNum_in == ccNum) { | ||
action.value(ccNum_in, valIn); | ||
}; | ||
ccNum_in = valIn = 0; | ||
seq.reset; // reset the sequence | ||
}; | ||
} { | ||
seq.reset; | ||
}; | ||
}, num: list | ||
); | ||
} | ||
|
||
// ccNRPN {arg func, ccNum, chan, srcID, argTemplate, dispatcher; | ||
// var list, seq, ccNum_in = 0, valIn = 0, idx = 0; | ||
// list = #[99, 98, 6, 38]; // the channels the 14-bit message (and it's ccNum) come in on | ||
// seq = Pseq(list, 1).asStream; // don't edit this yet... probably a more simple way to do this | ||
// MIDIFunc.cc({|val, num, chan, src| | ||
// if(num == list[idx]) { | ||
// switch(num) | ||
// {99} {ccNum_in = ccNum_in | (val << 7)} | ||
// {98} {ccNum_in = ccNum_in | val} | ||
// {6} {valIn = valIn | (val << 7) } | ||
// {38} { | ||
// valIn = valIn | val; | ||
// if(ccNum_in == ccNum) { | ||
// func.value(ccNum_in, valIn); | ||
// }; | ||
// ccNum_in = valIn = 0; | ||
// // seq.reset; // reset the sequence | ||
// idx = 0; | ||
// }; | ||
// idx = idx+1; | ||
// } { | ||
// // seq.reset; | ||
// idx = 0; | ||
// }; | ||
// }); | ||
// }; | ||
|
||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.