;Situation: In OMB you have an XG synthesizer connected to channel 9 thru 16. ;Channel 8 is connected to a device that has a high quality piano. ;This program will search for tracks that contain a piano patch and then change the ;destination channel to 8 and specify the bank controllers and patch for this piano. Define PianoTrack Numeric ForEachStyle PrintLine StyleName ForEachTrack ;Determine wether this is a track played with a piano patch Let PianoTrack = 0 If DrumTrack = 0 ForEachPart ForEachEvent If EventType = 4 ;patch If DataByte1 < 8 ;patch 0-7 is piano Let PianoTrack = 1 EndIf EndIf NextEvent NextPart EndIf If PianoTrack = 1 ;Replace destination channel, bank and patch ForEachPart Let TrackChannel = 8 ForEachEvent If EventType = 3 ; Controller If DataByte1 = 0 ;Bank DeleteEvent EndIf If DataByte1 = 32 ;Bank DeleteEvent Endif Endif If EventType = 4 ; Patch DeleteEvent Let EventType = 3 ;Controller 0 Let DataByte1 = 0 Let DataByte2 = 0 ; *** CUSTOMIZE HERE **** InsertEvent Let EventType = 3 ;Controller 32 Let DataByte1 = 32 Let DataByte2 = 17 ; *** CUSTOMIZE HERE **** InsertEvent Let EventType = 4 ;Patch Let DataByte1 = 0 ; *** CUSTOMIZE HERE **** InsertEvent EndIf NextEvent NextPart EndIf NextTrack SaveStyle NextStyle