dlab23 Posted September 15, 2020 Share Posted September 15, 2020 Hi, 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... Thanks! D Quote Link to comment Share on other sites More sharing options...
David Nahmani Posted September 15, 2020 Share Posted September 15, 2020 You could use a couple Transformer objects with Mode = "Copy matching events and apply operation": 1st Transformer: you copy CC#48 and add +2 to the CC# => CC48 and CC50 2nd Transformer: you copy CC ><48,50 and add +1 to the CC# => CC48, 49, 50, 51 Did that make sense? Quote Link to comment Share on other sites More sharing options...
dlab23 Posted September 15, 2020 Author Share Posted September 15, 2020 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 Quote Link to comment Share on other sites More sharing options...
David Nahmani Posted September 15, 2020 Share Posted September 15, 2020 I hear you. Unfortunately there's no way to use Scripter in the environment so yes, consider routing the data to a channel strip only to be processed by Scripter. If you don't mind, when you've written your script, attach it here! In case someone else is trying to do the same thing in the future. Quote Link to comment Share on other sites More sharing options...
dlab23 Posted September 15, 2020 Author Share Posted September 15, 2020 have to RTFM first but will do! Quote Link to comment Share on other sites More sharing options...
Solution fuzzfilth Posted September 15, 2020 Solution Share Posted September 15, 2020 (edited) 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 Done. Edited September 15, 2020 by fuzzfilth Quote Link to comment Share on other sites More sharing options...
David Nahmani Posted September 15, 2020 Share Posted September 15, 2020 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. Quote Link to comment Share on other sites More sharing options...
dlab23 Posted September 15, 2020 Author Share Posted September 15, 2020 @fuzzfilth MAGIC!!! Thanks a lot!! Quote Link to comment Share on other sites More sharing options...
fuzzfilth Posted September 15, 2020 Share Posted September 15, 2020 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. Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted September 15, 2020 Share Posted September 15, 2020 You can always make a macro too if you want it to look clean and simple in the enviornment Quote Link to comment Share on other sites More sharing options...
David Nahmani Posted September 15, 2020 Share Posted September 15, 2020 Indeed very cool solution by FuzzFilth, I have never used a SysEx fader and didn't know that was possible, so I learned something here, which is always FUN! And Steve you read my mind I was going to mention the possibility of a macro as well... good point. Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted September 15, 2020 Share Posted September 15, 2020 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: 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 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. Quote Link to comment Share on other sites More sharing options...
David Nahmani Posted September 15, 2020 Share Posted September 15, 2020 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. Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted September 15, 2020 Share Posted September 15, 2020 Oh I also want to make another point...which is that the Scripter drawback #2 I mentioned above, can also be worked around by simply putting duplicate copies of Scripter on each of the destination instrument channels. Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted September 15, 2020 Share Posted September 15, 2020 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. Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted September 15, 2020 Share Posted September 15, 2020 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.send(); event.number = 49; event.send(); event.number = 50; event.send(); event.number = 51; event.send(); return; } } // everything else event.send(); } 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. Quote Link to comment Share on other sites More sharing options...
dlab23 Posted September 16, 2020 Author Share Posted September 16, 2020 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.