Jump to content

CC controller transformer


mrfinest

Recommended Posts

Hi Guys, I'm looking for a "transformer"-script which can transform controllers like a transformer can.

For ex. cc 23 to 53, 24 to 64 and so on; more than one cc should be possible.

Also channel shift and invert (value 1 -> 127; 2 -> 126 an so on) would be great.

For sure this is easy to do if someone knows how to...

 

Request for new default-scripts: the tasks the transformer can do in the environment should be also possible in MIDI-FX scripture. That would be great!

 

Thanks for help!!

 

Markus

Link to comment
Share on other sites

So what have you tried so far ?

 

Request for new default-scripts:

That's quite a daunting task because a Transformer can do so many structurally different things and also, a Transformer can create SysEx data which Scripter can't. But then, It might be useful to replicate not what a Transformer can do but to replicate an actual Transformer, minus the Sysex thing. I might have to think about that for a bit, write it and sell it.

  • Like 1
Link to comment
Share on other sites

For ex. cc 23 to 53

You can do that with the following script:

 

function HandleMIDI(event) {
   if(event instanceof ControlChange && event.number == 23) {
       event.number = 53 ;     
}
   event.send();
}

 

 

Wow, so simply and works perfectly -thanks, David!

I Trend to duplicate the text in the scripter to change more than one cc´s, but this didn't work. How would this script look like if we changed lets say three cc-numbers (23->53, 24-A54; ...), ? And who could I simply add / sub some values (for ex. cc 23 minus 3 = 20)

 

Thanks again :)

Markus

Link to comment
Share on other sites

David, this is so helpful, thank you!

 

How would this script look like if we changed lets say three cc-numbers (23->53, 24-A54; ...), ?

You can use a switch/case operator... see my answers in that thread: Force DRUMMER to use sidestick? [sOLVED]

 

This doesn't work here with controllers, I think I make something wrong changing the values...

 

So what I want to do: cc23->43; cc24->44 and so on, all in one script. That would make me really happy :))

Link to comment
Share on other sites

OK, i was not precisely: lets say change controllers

24 to 30 AND

25to 41 AND

so on. So it is not regularly +/-, it is like in your first script

 

function HandleMIDI(event) {

if(event instanceof ControlChange && event.number == 23) {

event.number = 53 ;

}

event.send();

}

 

but transformation with more than one cc.

Link to comment
Share on other sites

Mr finest, the general notion on this site is that you come with a question, state what you have tried so far and where you're stuck, and then folks help you figure out how to solve your problem. At the moment, you're the guy at Starbucks who has his chai latte be redone by the poor guy behind the counter for the third time because the chocolate shavings on top aren't the right shade, shape or density. Please show some effort other than refining your order. Thank you.
  • Like 1
Link to comment
Share on other sites

Mr finest, the general notion on this site is that you come with a question, state what you have tried so far and where you're stuck, and then folks help you figure out how to solve your problem. At the moment, you're the guy at Starbucks who has his chai latte be redone by the poor guy behind the counter for the third time because the chocolate shavings on top aren't the right shade, shape or density. Please show some effort other than re-stating your order. Thank you.

 

 

HI fuzzfilth, I never go to Starbucks ;-)

 

Sorry, this topic is SO complicated as a script doesn't work if only one digit is wrong. So I really try to explain what I want, to change several CCs within one script. Why, it is to use several libraries with one controller and without changing/resaving all the libraries´ instruments. I think this should be interesting to many users... Until now I used transformers and Midi-Cables, this was easy and I understood it :) But it has disadvantages, so I now try to find some scripts for the scripter.

 

I got some really helpful scripts from David (THANKS again!) and tried to combine them - but I failed, I can only use five scripted-plugs in one channel... That´s my situation, sorry. I spent several days with this but it is like learning a new , foreign language without being allowed to make mistakes...

All the best,

Markus

Link to comment
Share on other sites

Yes in that case then the example with the switch statement in the thread I linked to should work. If it does not, then paste the code you've tried so that we can troubleshoot it?

 

OK, i tried this to change 23 to 53 AND 24 to 55 (both values random), the other CCs should go through:

 

function HandleMIDI(event) {

if(event instanceof ControlChange && event.number == 23) {

event.number = 53 ;

 

if(event instanceof ControlChange && event.number == 24) {

event.number = 55 ;

}

event.send();

}

Link to comment
Share on other sites

The script should look something like this:

 

function HandleMIDI(event) {
   if(event instanceof ControlChange) {
         switch (event.number) {
            case 24:
               event.number = 30;
               break;
            case 25:
               event.number = 41;
               break;
         }
   }
   event.send();
}

 

 

YESSS, this is it! :idea: :idea: :D :D

 

Thanks a lot!

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.

Guest
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...