StreamByter: Set Channel by Note

Here’s a StreamByter script for changing channels from a keyboard that doesn’t have onboard channel change, such as the NanoKEY Studio. Play a note from A7 to C8 to change the channel.

# Script to change midi channel from keyboards that
# don’t have the ability to change it on-board
# A7 = ch1, A#7 = ch2 ... C8 = ch16

  ASS L0 = 0 #Start with no channel offset
  SET LB0 S—
  SET LB1 S—

# Detect note A7 or higher
IF M0 >= 80
  IF M0 <= 9F
    IF M1 >= 69
      # Set channel to offset above A7
      MAT L0 = M1 - 69 #L0 = offset from A7
      MAT L1 = L0 + 1 #to display channel starting at 1
      SET LB0 SCH.
      SET LB1 L1 +D
      XX = XX +B #block A7 or above from sounding
    #Display the note and channel if below A
    IF M1 < 69
      SET LB0 M1 +N
      SET LB1 L1 +D

# Add the channel offset
MAT M0 = M0 + L0

# Display cc and value if cc message
IF MT == B0
  SET LB0 M1 +D
  SET LB1 M2 +D
  • streambyter_set_channel_by_note.txt
  • Last modified: 2019/11/05 10:44
  • by spookyzoo