StreamByter provides easy MIDI channel remapping and cloning.
But what if you want to quickly change the remapping or cloning on the fly? You could edit the SB code, have multiple SB profiles saved, or use MDP2 to control the code.
This version provides ability to remap any channel to another, or clone any channel to one other channel.
First figure shows the MIDI architecture. Second shows it implemented in MIDI Fire on a Mac, with both Mac and iPad MDP2 connections.
The SB code goes in MIDI Fire or stand alone StreamByter, so there is not a layout with this code included.
A page of sample controls is provided. You can save preset configurations, could even control changing remotely via MIDI if desired.
This version only clones to one channel. I am working a version that can clone to multiple (sequential) channels. The remap code is an extension of this code - the challenge is simply handling which channels require all notes off when the cloning is changed.
SB code:
## Clone / Remap Midi Channels
## Aug 25 2022
## Red Heron Music, redheronmusic.com
# Control Message
# Header F0 00 01 7E (Confusion Studios SysEx ID)
# M04 = 12 (Type ID - Remap)
# M05 = Channel (00- 0F)
# M06 = Remap Value (00 - 1F)
# F7
# Remap -
# Set to channel value = off
# Set to other channel value 00 -0F, remap to that channel
# Set to 10-1F, clone to specified channel
# Applies to all channelized messages
# When do hanging notes have to be cleared?
# Was Now
# Off Off No action - captured by check for no change
# Off Cloned No action
# Off Mapped ANO prior
# Mapped Mapped ANO prrior
# Mapped Cloned ANO prior
# Mapped Off ANO prior
# Cloned Cloned ANO prior
# Cloned Mapped ANO prior
# Cloned Off ANO prior
# Variables
# L00 - L0F, channel remap status
# L10 Temp
If Load
Define Header F0 00 01 7E
Alias L10 Temp
Ass L00 = 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
End
# Process channelized messages
If MC < F0 # Channelized message detected
If LMC == MC
# Do nothing
Else
If LMC < 10 # Remap
Math M00 = MT + LMC # Replace M00 with updated type and channel
Else # Clone
Math Temp = LMC - 10 # first remove the 10
Math Temp = Temp + MT # add the message type
Snd Temp M01 M02 # Send cloned message
End
End
End
# Process control messages
If M00 == Header
If M04 == 12 # Store Remap Value detected
If M05 < 10 # valid channel 00 - 0F
If M06 < 20 # valid remap value 00 - 1F
If LM05 == M06 # Check for no-change case
# Do nothing
Else
If LM05 == M05 # Previously Off
If LM06 < 10 # Remap case
Math Temp = LM05 + B0
Snd Temp 7B 00 # All notes off
End
Else
If LM05 > 0F # Previous clone case
Math Temp = LM05 + A0 (B0 - 10)
Snd Temp 7B 00 # All notes off
Else # Prior Map Case
Math Temp = LM05 + B0
Snd Temp 7B 00 # All notes off
End
End
Ass LM05 = M06 # Store new value
End
End
End
Block # Finished with this message
End
End