ChannelSwitcher: fast sound switching

Kontakt, Sampletank and other big synths offer multichannel setups.
A great way to switch sounds fast is to address those different layers from within MG. You can have 16 sounds on standby this way, every midi channel 1 sound.
This midi machine will allow to switch the midi channel by remote. While switching the active notes are all stopped to prevent hung notes.

Knobs:
StartCC choose the CC which is used by your footcontroller.
Program you controller’s pedals to send a value from 1 to 16 on the chosen CC.

Thanks to our prog god Paul B. for letting me dig out this script. I got tons of scripts, if you need a special one, chances are big I have it here or can make it for you fast!

ChannelSwitcher.lua (1.3 KB)

2 Likes

Hello,

Is there a compressor midi machine out there? I’m having trouble programming it.

You set a high range and low range knobs. If the velocity played is higher than high range it becomes high range value, if lower than low range it becomes low range value. This is my code below. It seems to produce an infinite sustain type effect for some reason.

range_high = 70
range_low = 50

function OnNote(channel, pitch, ivelocity)
– for any note played, send out the exact same note
if ivelocity > range_high then
Note(channel, pitch, range_high)
elseif ivelocity < range_low then
Note(channel, pitch, ivelocity)
else
Note(channel, pitch, ivelocity)
end
end

function OnFrame(notes)
end

function OnStart(info)
– assign a description to be displayed in the header
info.description = “Fix any note into a solid velocity”
info.link = “http://jamorigin.com/midi-machine”

-- create widgets in the user interface
Knob("range_low", 0, 1,127,1)
--List("my_parameter_2", 1, "option 1","option 2","option 3")
Knob("range_high", 0, 1,127,1)
--List("my_parameter_2", 1, "option 1","option 2","option 3")

end

Also, what midi machines do you have? I’m interested in them! If you could share the lua files, I’d greatly appreciate it.

hi Rocky,
the noteoffs also pass here you need to catch ivelocity==0
if ivelocity<1 then
Note(channel, pitch,0) – this is a noteoff
elseif
– the rest of your handling

Best,
Paul