Jump to content

CC messages sends delay


Keyflow
 Share

Recommended Posts

Hello,

 

I'm using MainStage to send midi to an external midi device (Yamaha Motif XS). To send a program change for the master mode of the Yamaha I have to use SysEx.

When selecting a patch, I want to

1) send program change (midi file > SysEx)

2) send a CC74 (cut off message).

 

The problem is: the CC message is received BEFORE the SysEx PC, so the CC message isn't changed in the "new" selected sound. I read there is an option to use the midi Scripter. Is there a way to make a script to delay the "send CC messages"?

 

Hope you can help!

 

Thanx.

Link to comment
Share on other sites

If sending the CC via playback, have you consider postponing it either via the time grid position or the delay parameter on the region or track parameter?

LogicPro 10.7.4, MainStage 3.6,
MBPro 17", Core2Duo, 8G, OSX 10.12.6, MacPro, Xeon 6Cores, 64GB, OSX 10.16.1,
ULN8, MOTU MIDI TP-AV, C4, MCU Pro, KorgNano, Novation SLMkII, Several vintage gear
AAS, NI, Celemony, Spectrasonics, Korg, Arturia, etc..., PC, iPadPro 5th gen 12.9”(Duet D., V-Control & LogicRemote), AtariST(Notator SL),

Link to comment
Share on other sites

I like to use it in MainStage. There are no region or track parameter.
:oops:

My bad, read through too hastily...

LogicPro 10.7.4, MainStage 3.6,
MBPro 17", Core2Duo, 8G, OSX 10.12.6, MacPro, Xeon 6Cores, 64GB, OSX 10.16.1,
ULN8, MOTU MIDI TP-AV, C4, MCU Pro, KorgNano, Novation SLMkII, Several vintage gear
AAS, NI, Celemony, Spectrasonics, Korg, Arturia, etc..., PC, iPadPro 5th gen 12.9”(Duet D., V-Control & LogicRemote), AtariST(Notator SL),

Link to comment
Share on other sites

From this Logic Pro User Guide Script's tutorials:

 

  • Tutorial script 3: Transpose and Delay
    (Repeat notes up one octave with 100ms delay and pass all other events through.)
     
    Text following /* shows comments that explain the JavaScript code.
function HandleMIDI(event) {
event.send();    /* send original event */
if (event instanceof Note) {  /* if it is a note */
event.pitch += 12;   /* transpose up one octave */
event.sendAfterMilliseconds(100);  /* send after delay */
}
}

 

The solution could be obtained by some edition:

 

  • removing the "event.send(); /* send original event */ " line,
    since you don't need to repeat any MIDI events (notes, CC, SysEx, etc);
  • replace the "Note " by ControlChange.74, in the :"if (event instanceof Note) { /* if it is a note */ " line,
    since your target is CC74;
  • removing the "event.pitch += 12; /* transpose up one octave */ " line,
    as there is no need to transpose anything in your situation;
  • and finally setting the required delay value as needed (experimentation required) in the "event.sendAfterMilliseconds(100) " line.

 

The resulting code would normally look like this :

function HandleMIDI(event) {
if (event instanceof ControlChange && event.number == 74) {  /* if it is a CC74 */
event.sendAfterMilliseconds(500);  /* send after a delay of 0.5 second*/
}
event.send()
}

 

Nota: Not being at the studio, I didn't test the above script.

I just wrote same so you get the gist of how it is rather simple.

I wish you that some other more savvy could chime in...

LogicPro 10.7.4, MainStage 3.6,
MBPro 17", Core2Duo, 8G, OSX 10.12.6, MacPro, Xeon 6Cores, 64GB, OSX 10.16.1,
ULN8, MOTU MIDI TP-AV, C4, MCU Pro, KorgNano, Novation SLMkII, Several vintage gear
AAS, NI, Celemony, Spectrasonics, Korg, Arturia, etc..., PC, iPadPro 5th gen 12.9”(Duet D., V-Control & LogicRemote), AtariST(Notator SL),

Link to comment
Share on other sites

I think that all you have to do is removing "&& event.number == 74 " from the script. Since that part was specifying the CC74.

 

Be aware though that all the CC includes the modwheel (CC#1), therefore those modwheel wiggles will also be delayed...

 

If you want to keep the modwheel in sync (not delayed), from the original script try replacing "== 74 " with "!== 1 ".

LogicPro 10.7.4, MainStage 3.6,
MBPro 17", Core2Duo, 8G, OSX 10.12.6, MacPro, Xeon 6Cores, 64GB, OSX 10.16.1,
ULN8, MOTU MIDI TP-AV, C4, MCU Pro, KorgNano, Novation SLMkII, Several vintage gear
AAS, NI, Celemony, Spectrasonics, Korg, Arturia, etc..., PC, iPadPro 5th gen 12.9”(Duet D., V-Control & LogicRemote), AtariST(Notator SL),

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

 Share

×
×
  • Create New...