A technical support community for Apple Logic Pro users.

 
xmota
Topic Author
Posts: 4
Joined: Sat Jan 04, 2020 5:15 pm

Program Change / Bank Select script

Sun Jan 05, 2020 3:07 pm

Hi,

I am trying to make an Program Change/Bank Select script for Yamaha FB01 which is rather tedious to operate with just +/- buttons.

My problem is how to change the program banks (I have a slider in the Environment that sends the bank select sysex command to choose one of the 7 sound banks ... unfortunately Yamaha FB01 does not accept the MIDI cc 0 Bank MSB)

I have made "Bank Select" menu that sends Bank MSB command, but I don't know if it is possible to route the Scripter output to Environment object (slider).

The Script below:


// Bank selector

var BSL = ["USER 1", "USER 2", "ROM 1", "ROM 2", "ROM 3", "ROM 4", "ROM 5"];


// 1-48 ROM1 Bank


var R1 = [
 
"01 Brass'",       
"02 Horn",     
"03 Trumpet",         
"04 Lo Strings",       
"05 Strings",
"06 Piano",             
"07 New EPiano",       
"08 Electric Grand",     
"09 Jazz Guitar",     
"10 El. Bass",           
"11 Wood Bass",     
"12 E. Organ 1",
"13 E. Organ 2",   
"14 Pipe Organ 1",   
"15 Pipe Organ 2",       
"16 Flute",   
"17 Piccolo",   
"18 Oboe",    
"19 Clarinet",   
"20 Glockenspiel",   
"21 Vibes",    
"22 Xylophone",      
"23 Koto",    
"24 Zither",   
"25 Clavinet",    
"26 Harpsichord",     
"27 Bells",   
"28 Harp",   
"29 Smad Syn",      
"30 Harmonics",   
"31 Steel Drum",     
"32 Timpani",          
"33 Lo Strings 2",      
"34 Horn Lo",
"35 Whistle",
"36 zing Plp",
"37 Metal   ",
"38 Heavy",
"39 Funky Synth",
"40 Voices",
"41 Marimba",
"42 El. Bass 2",
"43 Snare Drum",
"44 Ride Cymbal",
"45 Tom Tom",
"46 Mars to",
"47 Storm",
"48 Wind Bell"];

// Preset name definition 
// 1-48 ROM2 Bank

var R2 = [
 
"01 Upright Piano'",       
"02 S piano",     
"03 Piano 2",         
"04 Piano 3",       
"05 Piano 4",
"06 Piano 5",             
"07 Ph Grand",       
"08 Grand",     
"09 Deep Grand",     
"10 LPiano 1",           
"11 LPiano 2",     
"12 El. Grand 2",
"13 Honky Tonk 1",   
"14 Honky Tonk 2",   
"15 Pf Bell",       
"16 Pf Vibe",   
"17 New EP2",   
"18 New EP3",    
"19 New EP4",   
"20 New EP5",   
"21 El.Piano 1",    
"22 El.Piano 2",      
"23 El.Piano 3",    
"24 El.Piano 4",   
"25 El.Piano 5",    
"26 High Tine",     
"27 Hard Tine",   
"28 Perc. Pf",   
"29 Wood Pf",      
"30 EP Strings",   
"31 EP Brass",     
"32 Clav 2",          
"33 Clav 3",      
"34 Clav 4",
"35 Fuzz Clav",
"36 Mute Clav",
"37 Mute Clav 2",
"38 Syn Clav 1",
"39 Syn Clav 2",
"40 Syn Clav 3",
"41 Syn Clav 4",
"42 Harpsichord 2",
"43 Harpsichord 3",
"44 Harpsichord 4",
"45 Harpsichord 5",
"46 Circust",
"47 Celeste",
"48 Squeeze"

];

// Preset name definition 
// 1-48 ROM3 Bank

var R3 = [
 
"01 Horn 2'",       
"02 Horn 3",     
"03 Horns",         
"04 Flugel Horn",       
"05 Trombone",
"06 Trumpet 2",             
"07 Brass 2",       
"08 Brass 3",     
"09 Hard Brass 1",     
"10 Hard Brass 2",           
"11 Hard Brass 3",     
"12 Hard Brass 4",
"13 Huff Brass",   
"14 Perc Brass 1",   
"15 Perc Brass 2",       
"16 Strings 1",   
"17 Strings 2",   
"18 Strings 3",    
"19 Strings 4",   
"20 Solo Violin",   
"21 Rich Strings 1",    
"22 Rich Strings 2",      
"23 Rich Strings 3",    
"24 Rich Strings 4",   
"25 Cello 1",    
"26 Cello 2",     
"27 Lo Strings 3",   
"28 Lo Strings 4",   
"29 Lo Strings 5",      
"30 Orchestra",   
"31 5th Strings",     
"32 Pizzicato 1",          
"33 Pizzicato 2",      
"34 Flute 2",
"35 Flute 3",
"36 Flute 4",
"37 Pan Flute",
"38 Slow Flute",
"39 5th Flute",
"40 Oboe 2",
"41 Bassoon",
"42 Reed",
"43 Harmonica 2",
"44 Harmonica 3",
"45 Harmonica 4",
"46 Mono Sax",
"47 Sax 1",
"48 Sax 2"

];

// Preset name definition 
// 1-48 ROM4 Bank

var R4 = [
 
"01 Funky Synth 2'",       
"02 Funky Synth 3",     
"03 Syn Organ",         
"04 Syn Feed",       
"05 Syn Harm",
"06 Syn Clar",             
"07 Syn Lead",       
"08 Huff Tak",     
"09 So Heavy",     
"10 Hollow",           
"11 Schmooh",     
"12 Mono Syn",
"13 Cheeky",   
"14 Syn Bell",   
"15 Syn Pluk",       
"16 El. Bass 3",   
"17 Rub Bass",   
"18 Solo Bass",    
"19 Plucked Bass",   
"20 Upright Bass",   
"21 Fretless Bass",    
"22 Flap Bass",      
"23 Mono Bass",    
"24 Synth Bass 1",   
"25 Synth Bass 2",    
"26 Synth Bass 3",     
"27 Synth Bass 4",   
"28 Synth Bass 5",   
"29 Synth Bass 6",      
"30 Synth Bass 7",   
"31 Marimba 2",     
"32 Marimba 3",          
"33 Xylophone 2",      
"34 Vibe 2",
"35 Vibe 3",
"36 Glockenspiel 2",
"37 Tube Bell 1",
"38 Tube Bell 2",
"39 Bells 2",
"40 Temple Gong",
"41 Steel Drum",
"42 Electric Drum",
"43 Hand Drum",
"44 Syn Timpani",
"45 clock",
"46 Heifer",
"47 Snare Drum 2",
"48 Snare Drum 3"

];

// Preset name definition 
// 1-48 ROM5 Bank

var R5 = [
 
"01 Jazz Organ 1",       
"02 Jazz Organ 2",     
"03 Church Organ 1",         
"04 Church Organ 2",       
"05 Electric Organ 2",
"06 Electric Organ 3",             
"07 Electric Organ 4",       
"08 Electric Organ 5",     
"09 Electric Organ 6",     
"10 Electric Organ 7",           
"11 Electric Organ 8",     
"12 Small Pipe",
"13 Big Pipe",   
"14 Mid Pipe",   
"15 Soft Pipe",       
"16 Organ",   
"17 Guitar",   
"18 Folk Guitar",    
"19 Pluck Guitar",   
"20 Brite Guitar",   
"21 Fuzz Guitar",    
"22 Zither 2",      
"23 Lute",    
"24 Banjo",   
"25 Soft Harp",    
"26 Harp 2",     
"27 Harp 3",   
"28 Soft Koto",   
"29 Hit Koto",      
"30 Sitar 1",   
"31 Sitar 2",     
"32 Huff Syn",          
"33 Fantasy",      
"34 Synth Voice",
"35 VSAR",
"36 Racing",
"37 Water",
"38 Wild War",
"39 Ghostie",
"40 Wave",
"41 Space 1",
"42 SpChime",
"43 SpTalk",
"44 Winds",
"45 Smash",
"46 Alarm",
"47 Helicopter",
"48 Sine Wave"

];

var U1 = [
 
"01 Deep Grand",       
"02 Upright Piano",     
"03 Honky Tonk",         
"04 Ivory Ebony",       
"05 Phase Grand",
"06 Electric Grand",             
"07 Pianobe",       
"08 AcousEl",     
"09 Old Electric",     
"10 New Electric",           
"11 High Tines",     
"12 Hard Tines",
"13 Perco Piano",   
"14 Wood Piano",   
"15 Vibrabe",       
"16 Pianobr",   
"17 Click Organ",   
"18 Jazz Organ",    
"19 Ham<n>E",   
"20 Drawbar",   
"21 Club Organ",    
"22 <6 Tease",      
"23 GentleP",    
"24 Full Ran",   
"25 Strings",    
"26 Silk Cel",     
"27 Orchestra",   
"28 Solo Violin",   
"29 Box Cell",      
"30 Rich Strings",   
"31 5th Strings",     
"32 Pizzcato",          
"33 Horns",      
"34 Brite Brass",
"35 Flugel Horn",
"36 Trombone",
"37 Hard Brass",
"38 Power Brass",
"39 BC1 Horn",
"40 BC1 Trumpet",
"41 Pluck Guitar",
"42 Bright Guitar",
"43 Soft Har",
"44 Sitar",
"45 Jazz Guitar",
"46 Old Banjo",
"47 Kotokot",
"48 Folk Guitar"

];

var U2 = [
 
"01 Solid Bass",       
"02 Pluck Bass",     
"03 Synthe Bass",         
"04 Mono Bass",       
"05 Flap Bass",
"06 Electric Bass",             
"07 Upright Bass",       
"08 Fretless Bass",     
"09 Racing Car",     
"10 Heicopter",           
"11 Alarm Call",     
"12 Ghostie",
"13 Dopplar",   
"14 Storm Wind",   
"15 SpaceTa",       
"16 Birds",   
"17 Diesel",   
"18 Holein 1",    
"19 <<Smash",   
"20 FMSQUAR",   
"21 FMPULSE",    
"22 FMSAWTO",      
"23 LFONOIS",    
"24 PINKNOI",   
"25 Windbell",    
"26 Syn Vox",     
"27 Punkfun",   
"28 Whistle",   
"29 Voices",      
"30 ZingPlo",   
"31 ValvePl",     
"32 Marsto?",          
"33 Fantasy",      
"34 Wild War",
"35 Harmony",
"36 Harmony",
"37 -",
"38 -",
"39 -",
"40 -",
"41 -",
"42 -",
"43 -",
"44 -",
"45 -",
"46 -",
"47 -",
"48 -"

];

var PluginParameters = [

{name:"Portamento", type:"menu", valueStrings:["Off", "On"], minValue:126, maxValue:127, defaultValue:126,numberOfSteps:1},
{name:"Porta Time", minValue:0, maxValue:127, numberOfSteps:127, defaultValue:0,type:"linear"},

{name:"Bank Select", type:"menu", valueStrings: BSL, defaultValue:0,   minValue:0, maxValue:7, numberOfSteps:7},

{name:"ROM 1", type:"menu", valueStrings: R1, defaultValue:0,   minValue:0, maxValue:48, numberOfSteps:48},
{name:"ROM 2", type:"menu", valueStrings: R2, defaultValue:0, minValue:0, maxValue:48, numberOfSteps:48},
{name:"ROM 3", type:"menu", valueStrings: R3, defaultValue:0, minValue:0, maxValue:48, numberOfSteps:48},
{name:"ROM 4", type:"menu", valueStrings: R4, defaultValue:0, minValue:0, maxValue:48, numberOfSteps:48},
{name:"ROM 5", type:"menu", valueStrings: R5, defaultValue:0, minValue:0, maxValue:48, numberOfSteps:48},
{name:"USER 1", type:"menu", valueStrings: U1, defaultValue:0, minValue:0, maxValue:48, numberOfSteps:48},
{name:"USER 2", type:"menu", valueStrings: U2, defaultValue:0, minValue:0, maxValue:48, numberOfSteps:48},                        
];

// Event Monitor
                       
function HandleMIDI(event)
{
   event.trace();
   event.send();


function ParameterChanged(param, value)


// Portamento

{if(param == 0){
      var pto = GetParameter("Portamento")*127;
        var cc = new ControlChange;   
      cc.number = 65;
      cc.value = pto
      cc.send();
      cc.trace();
      
       }
      
{if(param == 1){
      var ptt = GetParameter("Porta Time");
        var cc = new ControlChange;   
      cc.number = 5;
      cc.value = ptt
      cc.send();
      cc.trace();
      
       }


// Bank Change
{if(param == 2){
      var bankNr = GetParameter("Bank Select");
        var cc = new ControlChange;   
      cc.number = 0;
      cc.value =bankNr
      cc.send();
      cc.trace();
      
       }
      
// Program changes
                     
{ if(param == 3){
      var program = GetParameter("ROM 1");
        var pc = new ProgramChange;   
      pc.number = program;
      pc.send();
      pc.trace();
      
       }
      
       { if(param == 4){
      var program = GetParameter("ROM 2");
        var pc = new ProgramChange;   
      pc.number = program;
      pc.send();
      pc.trace();
       
  }
    
           {
  if(param == 5){
      var program = GetParameter("ROM 3");
        var pc = new ProgramChange;   
      pc.number = program;
      pc.send();
      pc.trace();
       
  }
               {
  if(param == 6){
      var program = GetParameter("ROM 4");
        var pc = new ProgramChange;   
      pc.number = program;
      pc.send();
      pc.trace();
       
  }   
 
                 {
  if(param == 7){
      var program = GetParameter("ROM 5");
        var pc = new ProgramChange;   
      pc.number = program;
      pc.send();
      pc.trace();
       
  }   
                   {
  if(param == 8){
      var program = GetParameter("USER 1");
        var pc = new ProgramChange;   
      pc.number = program;
      pc.send();
      pc.trace();
       
  }   
  }
                   {
  if(param == 9){
      var program = GetParameter("USER 2");
        var pc = new ProgramChange;   
      pc.number = program;
      pc.send();
      pc.trace();
       
  }   
  }
  }
  }   }  } }}} }
 
User avatar
Dewdman42
Posts: 2519
Joined: Tue Sep 09, 2014 3:01 pm
Location: Park City, UT

Re: Program Change / Bank Select script

Sun Jan 05, 2020 10:39 pm

its not possible to route scripter output through the environment unless you send it out over IAC and back into LogicPro again, then hit the environment there.

Scripter can also not send sysex.

The FB01 won't respond to normal bank messages?
5,1 MacPro 3.46ghz x 12 128gb ram, OSX 10.14, Logic Pro 10.4.8, Mainstage3, Cubase10, StudioOne, Reaper, DP9, VEP, VSL, too many plugins to list
 
xmota
Topic Author
Posts: 4
Joined: Sat Jan 04, 2020 5:15 pm

Re: Program Change / Bank Select script

Mon Jan 06, 2020 3:13 am

Hi,

FB01 does not respond to bank messages (unfortunately it is not the only synth that works this way). It is a pity that the sysex is not supported (there would be great possibilities for sysex use - the Environment is mighty weapon, but little bit outdated way of doing things)

The IAC way may be a solution. How would you suggest to modify the script and the entire routing to the Environment object?

Thank you

Tom

Thanks
 
User avatar
Dewdman42
Posts: 2519
Joined: Tue Sep 09, 2014 3:01 pm
Location: Park City, UT

Re: Program Change / Bank Select script

Mon Jan 06, 2020 10:33 am

You might be better off doing the entire thing in the environment.

If you want to route from scripter to the environment, then basically you put scripter on a channel strip with external instrument as the instrument. Choose and IAC midi device. All IAC devices are fed back into LogicPro. So then you have to open the environment and isolate that particular IAC device port on its own cable where you can add SysEx. You could for example, have scripter generate maybe a CC message of some kind and then in the environment use that CC message to determine how to construct the SysEx message. Wire that environment circuit up to the Midi instrument object that pertains to your FB01, and it should all be working.

As to how to transform a CC message into SysEx, I don't know enough about the environment to comment bout that, but there are some real environment gurus on this forum, ask in the main LogicPro subforum.
5,1 MacPro 3.46ghz x 12 128gb ram, OSX 10.14, Logic Pro 10.4.8, Mainstage3, Cubase10, StudioOne, Reaper, DP9, VEP, VSL, too many plugins to list
 
User avatar
fuzzfilth
Posts: 3702
Joined: Mon Aug 03, 2009 2:31 am
Location: Germany

Re: Program Change / Bank Select script

Mon Jan 06, 2020 1:01 pm

xmota wrote:
the Environment is mighty weapon, but little bit outdated way of doing things

It's funny when you say that while sitting on an FB01 which is from, wait...1986 or so ?

Anyway, did you look into the Environment's Multi-Instruments with their Custom Bank Messages, which is an outdated way of doing things with outdated gear ? After setting up, this lets you select sounds by bank- and name-menus, from the Main Window.
Christian Obermaier
Contact me for private Logic Consulting, Training, Troubleshooting via Skype, Zoom or Teamviewer

1 x MacPro 6core 2010 24Gb RAM
2 x MacBookPro i7 2012 16Gb RAM
OSX.14.6. Mojave, Logic X.4.4 & 5.1
 
xmota
Topic Author
Posts: 4
Joined: Sat Jan 04, 2020 5:15 pm

Re: Program Change / Bank Select script

Thu Jan 16, 2020 8:28 am

Hi,

The IAC works great. I made the bank select fader in the environment, linked to the midi cc from scripter. The program menu select is now sending both program change and the cc.

Is there a way to send the commands to a various midi channels? I might use the synths in multi mode.

Tom
 
joe23at
Posts: 1
Joined: Mon Jun 29, 2020 12:43 pm

Re: Program Change / Bank Select script

Mon Jun 29, 2020 12:54 pm

Hi, not sure if this is still helpful but I figured out how to do the bank changes easily in Logic Pro X using SysEx data with custom bank messages.
It's fairly easy if you know what to do. :-)
You need the SysEx data for a bank change of the FB-01 which is F0 43 75 01 18 04 xx F7 (xx = 00 to 06 for the seven banks in the FB-01). (I have to say that this is thanks to the monitor function in the FB-01 plugin of Midiquest). Otherwise I wouldn't know what the bank change Sysex data for the FB-01 would have been.
Then convert this Hex Code into Decimals: 240 67 117 1 24 4 x 247 (x = 0 to 6)
Then go to "Define custom bank messages" in the Midi Environment of the Multi-Instrument (FB-01).
Delete all Control Bank messages.
Add a SysEx message. Paste the above decimal code. (the final 247 gets converted into EOX automatically).
Lather, rinse, repeat for all banks.
Done.
At the end it should look like this:
Attachments
Screenshot 2020-06-29 at 21.40.43.png
Screenshot 2020-06-29 at 21.40.43.png (416.27 KiB) Viewed 225 times