View Single Post
Old 07-05-2022, 08:17 AM  
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,378
Default

Quote:
Originally Posted by STOP View Post
Is it the same issue with sstillwell/randomizer ?
Yeah, I think so.

Quote:
Originally Posted by STOP View Post
I added the DarkStar script.
Last post here:
https://forum.cockos.com/archive/ind.../t-171197.html

... and now the sstillwell/randomizer script work with my keyboard.
Nice!

Should anyone want to fix this, so it works with any MIDI controller out of the box, then you could change stillwell/randomizer like this:

Code:
@block
  while(
    midirecv(mpos, msg1, msg2) ? (
-     (msg1 & 240) == note_on ? (
+     (msg1 & 240) == note_on && (velocity = (msg2 & 65280)) ? (
        ((msg1 & 15) == chan) || chan==-1 ? (
          (msg2 & 255) == note ? (
-           velocity = msg2 & 65280;
            newnote = floor(rand(end-start)) + start;
            newnote == prevnote ? newnote == end ? newnote = start : newnote += 1;
            midisend(mpos, msg1, velocity | newnote);
            prevnote = newnote;
          );
        ) : (
          midisend(mpos, msg1, msg2);
        );
-     );
-     (msg1 & 240) == note_off ? (
+     ) :
+     (msg1 & 240) == note_off || (msg1 & 240) == note_on ? (
        ((msg1 & 15) == chan) || chan==-1 ? (
          (msg2 & 255) == note ? (
            midisend(mpos, msg1, newnote);
            prevnote = newnote;
          );
        ) : (
          midisend(mpos, msg1, msg2);
        );
      );
    );
  );
Tale is offline   Reply With Quote