Open nathanlong85 opened 1 year ago
Here's some quick and dirty Ruby to calculate the number of banks and preset range per bank for a given number of PC buttons
PC_COUNT = 5
num_banks = 127.0/PC_COUNT
banks = (0..num_banks).to_a
banks.each do |bank|
min = bank * PC_COUNT
max =
if min == 127
127
else
m = min + (PC_COUNT - 1)
m > 127 ? 127 : m
end
puts "Bank #{bank}: #{min} - #{max}"
# (0...PC_COUNT).each do |preset_multiplier|
# preset = preset_multiplier + (bank * PC_COUNT)
# break if preset > 127
#
# puts preset
#end
end
This will just be for sending PC messages initially.
LOW
before sending the MIDI message to change preset. No CC MIDI messages should be sent when switching state.