wheelStopTime = wheelLastTime;
// MIDI out channel selector (back of the device)
// velocity is the channel
- MIDIdef.noteOn(\chanrot++name, {|...args|
+ MIDIdef.noteOn((\chanrot++name).asSymbol, {|...args|
channel = args[0];
chanrot.value(*args);
}, 14, srcID: idin);
"Шаҫиху готов к использованию 😊".postln;
}
+ free {
+ [
+ \chanrot, \mode,
+ \rangeControl, \biRangeControl,
+ \rotaryControl, \wheelControl,
+ \buttonDown, \buttonUp,
+ \wheelStart, \wheelStop
+ ].do{|prefix|
+ var defName = (prefix ++ name).asSymbol;
+ MIDIdef(defName).free;
+ };
+ }
+
// == LED control
led {|control, value=true|
value = ledValues[value] ? value;
+++ /dev/null
-// MIDI pedals handler
-// by Eugene Zuelum
-
-(
-~pedalFactory = {
- var pedal = Environment[
- \version -> "33.7.3.4"
- ];
-
- pedal.know = true;
-
- // Sustain pedal on/off
- MIDIdef.cc(\midiPedalSustain, { |...args|
- if (args[0] != 0, {
- pedal.suDown(*args);
- }, {
- pedal.suUp(*args);
- });
- },
- 65, 3);
- // M-Audio Exp-M pedal (values range from 0 to 118 only)
- MIDIdef.cc(\midiPedalExpression, { |...args|
- var normed;
- // m-audio
- normed = args[0].linlin(0, 118, 0, 1);
- pedal.xePres(normed, *args);
- },
- 64, 3);
-
- pedal.freeDefs = { |zi|
- MIDIdef(\midiPedalSustain).free;
- MIDIdef(\midiPedalExpression).free;
- };
-
- "Нычосё и Щюҙуԉы готовы к использованию 😊".postln;
-
- pedal;
-};
-)
-
-//============================================================================= Testing
-
-// Test incoming MIDI messages
-/*
-(
-MIDIdef.cc(\testcc, {|...args|
-(["cc"] ++ args).postln;
-});
-MIDIdef.noteOn(\testnoteon, {|...args|
-(["note on"] ++ args).postln;
-});
-MIDIdef.noteOff(\testnoteoff, {|...args|
-(["note off"] ++ args).postln;
-});
-MIDIdef.touch(\testtouch, {|...args|
-(["touch"] ++ args).postln;
-});
-MIDIdef.polytouch(\testpolytouch, {|...args|
-(["polytouch"] ++ args).postln;
-});
-MIDIdef.bend(\testbend, {|...args|
-(["bend"] ++ args).postln;
-});
-MIDIdef.sysex(\testsysex, {|...args|
-(["sysex"] ++ args).postln;
-});
-)
-*/
-
-// Test library
-/*
-~pe = ~pedalFactory.value;
-~pe.suUp = {"up".postln};
-~pe.suDown = {"down".postln};
-~pe.xePres = {|zi, val| val.postln};
-*/