View Single Post
Old 11-19-2019, 09:01 AM   #6
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
Default

Quote:
Originally Posted by MusoBob View Post
Script: mpl_Remove selected takes MIDI ProgramChange.lua
Script: mpl_Remove MIDI ProgramChange.lua

I'd like to know how to get the first program number with script.
No guru here, but looking at the'Remove MIDI ProgramChange' script, seems you can get the Program value from 2nd item in that msg,..

Code:
in function FilterMIDIData... 
...
if msg:len() > 1 then 
  if msg:byte(1)>>4 == exclude_msg_type then
    print(msg:byte(2)) -- Get Program value
    --msg = "" --< ignore for this test
  end 
end
...
Edgemeal is offline   Reply With Quote