@David-san
I’m not scripting literate, here is the lua script:
channel_1 = 38 – preset Midi channel 1, pitch 38 is dropped D on low string of a 6-String guitar, lowest possible note for Midi Guitar 2
channel_2 = 52 – preset Midi channel 2
channel_3 = 64 – preset Midi channel 3
channel_4 = 76 – preset Midi channel 2
oct_2 = 0
oct_3 = 0
oct_4 = 0
function OnNote(channel, pitch, velocity)
if pitch >= channel_1 and pitch < channel_2 then
Note(1, pitch, velocity)
end
if pitch >= channel_2 and pitch < channel_3 then
Note(2, pitch + oct_2 * 12, velocity)
end
if pitch >= channel_3 and pitch < channel_4 then
Note(3, pitch + oct_3 * 12, velocity)
end
if pitch >= channel_4 then
Note(4, pitch + oct_4 * 12, velocity)
end
end
function OnStart(info)
info.description = “Split fretboard in 4 channels + transposer for each region”
info.link = “http://jamorigin.com/midi-machine”
Knob(“channel_2”, 0, 38, 89, 1) – pitch 89 is the highest note on high e-string of a 24 fret guitar
Knob(“oct_2”, 0, -1, 2, 1)
Knob(“channel_3”, 0, 38, 89, 1)
Knob(“oct_3”, 0, -2, 2, 1)
Knob(“channel_4”, 0, 38, 89, 1)
Knob(“oct_4”, 0, -3, 1, 1)
if channel_2 < 52 and oct_2 <= 0 then
oct_2 = 0
end
if channel_3 < 52 and oct_3 <= -1 then
oct_3 = 0
end
if channel_3 >= 52 and channel_3 < 64 and oct_3 <= -2 then
oct_3 = -1
end
if channel_4 < 52 and oct_4 <= -1 then
oct_4 = 0
end
if channel_4 >= 52 and channel_4 < 64 and oct_4 <= -2 then
oct_4 = -1
end
if channel_4 >= 64 and channel_4 < 72 and oct_4 <= -3 then
oct_4 = -2
end
end