Jump to content

one to many CCs in Environment?

Go to solution Solved by fuzzfilth,

Recommended Posts



is there a way to transform one CC into many different ones without building a fader object for all of them?


I want to press a button on my controller it will send a CC CH DATA (CC 02 48 0) and I want an object to send 4 messages CC 02 48 0,CC 02 49 0,CC 02 50 0, CC 02 51 0.


To give it a real world example by pressing one button on my MidiFighter Twister to switch it to Primary mode it will also switch the other 3 to Primary - I have VCF ADSR on Primary and VCA ADSR on Secondary and this way I do not have to press 4 buttons to switch between them... if that makes sense :-)


I can build 4 faders in parallel to achieve that but I thought there might be a better way (was thinking about chord memoriser with transform on it but that is even more redic...)

Is there a way to use scripter in environment? Seems like a good match for what I want to do...




Link to comment
Share on other sites

that would work too but still have to create 2 objects... I think I will do more of these in the future so something more elegant would be better this can get complicated when we are expanding. I will probably send the ccs to a channel, put a scripter there and then send it back to environment :-))) I will make it my scripting channel
Link to comment
Share on other sites

  • Solution

Routing Scripter data back into the Environment is possible, but a royal PITA, so avoid it if you can.


You can achieve your goal with just one object in the Environment


- Create a Fader with Button Style

- Set its Out-Definition to SysEx. A list editor will pop up

- Change "Note" next to the plus sign to "Controller"

- Click the plus sign four times

- Set the four new CC messages to whatever you need

- Make sure none of the events is selected (else their dala value will change with the button value)

- Close the list editor



Edited by fuzzfilth
Link to comment
Share on other sites

You can cable anything into a channel strip in the environment, then to route something back to the environment is where it gets slightly more tricky, you'd have to use the External Instrument routed to an IAC bus that shows up on the Physical Input object and where you can cable it into your next object.
Link to comment
Share on other sites

The dudes who initially programmed this into Logic decades ago had a company named eMAGIC, so MAGIC indeed.


There will be applications of this concept where you need to ensure or change the order in which these events are sent. You do this in the Position parameter and it is good practice to have these sequential and at least 1 tick apart. The actual position and timing doesn't matter, it's just the relative position that determines the output order.

Link to comment
Share on other sites

Before giving up on Scripter entirely I'd like to make the following observation also...


When you use an environment solution, unfortunately its a bit annoying to re-use in different projects. You have to basically import environment stuff from one project to the next or always start with a starter template that has the environment stuff added to it.


Scripter on the other hand can have a script saved as a preset, or as part of channel presets or library patches..and easily reloaded onto any track of a new project.


There are two downsides of using Scripter for this kind of thing:


  1. Scripter comes last in the midi signal chain RIGHT BEFORE the actual instrument, in an instrument channel. So.. you can't record the output of Scripter into the sequencer to record the results to a track. It is considered a live, dynamic midi effect...post-sequencer....its part of the actual instrument channel
  2. For the same reason as above, its not possible to route the output of Scripter to multiple instrument channels in LogicPro.


Now, there are tricky work arounds to record the output from scripter over IAC, but pretty much its a PITA and you might end up having to mess with the environment anyway. Routing to multiple instruments from a single script is best handled by using some kind of sub-hoster, like PlogueBidule, Patchworks, Element, DDMF MetaPlugin, etc. That way you can put multiple Plugins inside a single LPX instrument channel...and thus receive all the output from the scripter script that is on that channel.


A script to do this task is relatively pretty simple to make, but the above pros and cons of environment vs scripter needs to be taken into consideration to decide which is the best way to go in any particular situation. Environment is best for pre-sequencer....and if you want to route the results of the environment transforms to multiple inst plugins without using a third party sub-hoster. Scripter is better when it doesn't fall into those two situations, because then you can save as a preset and reuse easily. Me personally, I also prefer using a script language much more then wiring environment circuits together, but then again...some people prefer the other way. Scripter can't handle sysex either.


So there are pros and cons both ways.

Link to comment
Share on other sites

Scripter comes last in the midi signal chain RIGHT BEFORE the actual instrument, in an instrument channel.

Unless, of course, you insert more MIDI FX plug-ins after Scripter.


yes, well more accurately from what I said before the MIDIFX section of LogicPro is RIGHT BEFORE the instrument...its part of the instrument channel.. How you order your midifx (including Scripter) is entirely up to you, but the same problem still exists which is that Scripter and other MIDIFX are post-sequencer...and are already inside a single instrument channel and can't be routed to another instrument channel.

Link to comment
Share on other sites

so for example, here is a simple Scripter script do do what the OP asked in post#1


function HandleMIDI(event) {

   // handle CC48 on midi channel 2
   if(event instanceof ControlChange) {
       if(event.channel == 2 && event.number == 48) {
           event.number = 49;
           event.number = 50;
           event.number = 51;
   // everything else


The above will do what is desired and you can put it on any instrument channels where you need the CC cloning to happen. Save as a Scripter preset, or with a channel preset, or save with library patch.. fine. The only drawback...the result is not saved to the midi track while recording..the CC48 has to be cloned dynamically every time you playback..only CC48 will be on the midi track...but the instruments would all receive all 4 CC events during playback, they will be inserted dynamically in the instrument channel processing.


The environment approach, alternatively, allows you to burn all four cc events into the recorded tracks as you record them.

Link to comment
Share on other sites

I think I found the ideal solution for me as I do not need to get the events back to environment after processing - I do some filtering/spliting in Environment then send some of it to Instrument Ch with Scripter and External instrument with desired Midi destination. It is oneway only once it leaves the environment but it works for me and I can build up that script quite easily if I need new functionality.


When worst come to worst I will loop some virtual interfaces.


Thanks Everybody!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...