Jump to content

Mute but passthru incoming Midi


Recommended Posts

I'm trying to figure out how to mute incoming midi via a software instrument, but still have that midi recorded to the track. I.e. nothing is heard when you initially play via your keyboard, but the notes ARE heard on playback. I realize the brute force way to do this is to simply mute/unmute the track, but I'm trying to write a midi script which would do it automatically. Any thoughts?
Link to comment
Share on other sites

I'm back at my computer, I can write better now...

 

This might be best served with an environment thing...

 

First, for the op... The routing in LogicPro of midi kinda goes like this....

 

midi.in-->environment-->sequencer-->track-->mix channel-->Scripter-->VI plugin

 

So, you can block the midi from hitting the instrument in several places, we can start with Scripter since you asked about that first...

 


function HandleMIDI(event) {
   if(GetParameter(0)==1) {
       event.send();
   }
}

var PluginParameters = [
   {
       name: "Thru",
       type: "checkbox",
       defaultValue: 1
   }
];

 

So then the above you can tick or untick the "Thru" box on the scripter UI and midi will be sent on to the instrument (or not). The arriving midi will always be recorded to the track whether you can hear it or not.

 

The above kind of works, but you might as well just mute the mixer channel when you don't want to hear it while you're laying the track...

 

There is no way in Scripter to automatically detect whether the note is originating from a track or not. There is no way to know in scripter whether the transport is recording or not. You can know if the transports is moving...but you still won't know if the events are coming from the track or from your midi controller, you'll only know that the playhead is moving.

 

You might be able to do some clever stuff in the environment, but an exact solution is not coming to me right now.

 

What problem are you trying to solve?

Link to comment
Share on other sites

This is super informative, thank you!

 

My specific problem is this - I'm trying to add an "overlay" staccato articulation to the new Symphonic Motions from spitfire. I want to overlay with fluid shorts from Performance samples, but they have a very long "head" to the sample (very realistic sounding because you can hear the whole natural attack, but not the most "playable"). So when I play the two articulations at once, they are hitting at very different times and makes it very difficult to perform. My hope was to mute the overlay while performing, but still have it heard on playback.

 

I see now from your logic midi signal flow chart that scripter probably is not the right solution for this problem. Unless...is there a way to assign a controller or key command to that thru button?

Link to comment
Share on other sites

you can make it automatable, which means it can be controlled via smart controls. you could also right a script that changes the thru setting from a midi message of course.

 

I still don't entirely understand how you are hoping to solve your problem. I think you will need to put the the start time of the overlays on a different point in time then the main sample, in order to get that long juicy attack sample to start playing earlier and line up...right?

 

Explain the library you are working with a little better, we might be able to help you figure out how to work through it in some manner.

Link to comment
Share on other sites

Oh, that's the easy part of the problem. I just have the two different articulations on different tracks and set the track with the overlay to a negative delay.

 

Forgive my ignorance, I'm still new to logic midi scripting... How do you go about assigning a midi message to that thru button?

Link to comment
Share on other sites

For example, here's a simple example where the script listens for CC99 and if the value is 0, turn off thru, any positive value turns thru back on.

 

function HandleMIDI(event) {
   if(event instanceof ControlChange 
           && event.number == 99 ) {
   
       if(event.value==0) {
           SetParameter(0, 0);
       }
       else {
           SetParameter(0,1);
       }
       
       return;
   }

   if(GetParameter(0)==1) {
       event.send();
   }
}

var PluginParameters = [
   {
       name: "Thru",
       type: "checkbox",
       defaultValue: 1
   }
];
Link to comment
Share on other sites

You can alternative assign the GUI parameter to automation...like this..

 

function HandleMIDI(event) {
   if(GetParameter(0)==1) {
       event.send();
   }
}

var PluginParameters = [
   {
       name: "Thru",
       type: "checkbox",
       defaultValue: 1,
       disableAutomation: false
   }
];

 

if you do that, then you will be able to control the state of the UI control via automation lane or via smart controls.

 

auto.thumb.jpg.542427963389bbc569c7bdb8334c97d5.jpg

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