summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Mikulicz <szymon.mikulicz@posteo.net>2019-05-23 19:05:54 +0200
committerSzymon Mikulicz <szymon.mikulicz@posteo.net>2019-05-23 19:05:54 +0200
commitadd71c862c5923ba71b1bef1ed5fecfcaa11511e (patch)
treea5fd198da6a4a24fd0b8a64cfec55621e2b10dea
parenta8681eb1b0571d36608649a5d9409fe20859b3a0 (diff)
A small JSFX to use MPDHEADmaster
-rw-r--r--reaper_midi_only_one_note/Stop on NoteOn23
1 files changed, 23 insertions, 0 deletions
diff --git a/reaper_midi_only_one_note/Stop on NoteOn b/reaper_midi_only_one_note/Stop on NoteOn
new file mode 100644
index 0000000..d0f497b
--- /dev/null
+++ b/reaper_midi_only_one_note/Stop on NoteOn
@@ -0,0 +1,23 @@
+desc:Stop on NoteOn
+
+slider1:0<0,127,1>Low Note;
+slider2:127<0,127,1>High Note
+
+@init
+prevNote = 127;
+
+@slider
+lowNote = slider1;
+highNote = slider2;
+
+@block
+while (midirecv(offset, msg1, msg2, msg3)) (
+ msg1==$x90 &&
+ (highNote >= msg2) &&
+ (lowNote <= msg2) &&
+ (prevNote != msg2) && (
+ midisend(offset, $x80, prevNote, 0);
+ prevNote = msg2;
+ );
+ msg1!=$x80 && midisend(offset, msg1, msg2, msg3);
+)