What's new

Logic Scripter—multiport track delay compensation?

marclawsonmusic

Senior Member
Hi @kmaster, did you ever figure out a solution for negative track delay in Logic? I just rebuilt an entire template only to realize that negative track delay does not work with External MIDI tracks. Lucky me!

PS - I am on 10.4.8, but going to upgrade to 10.5.1 and see if that helps.

Surely there's a solution? John Powell is on Logic / VEP and I know he uses negative track delays for everything.

Also paging @Dewdman42 in case he has any insight.

Thanks in advance
 

Dewdman42

Senior Member
try changing the external midi tracks to use the external instrument plugin instead of the environment. That should make the negative track delay functional.
 

marclawsonmusic

Senior Member
try changing the external midi tracks to use the external instrument plugin instead of the environment. That should make the negative track delay functional.
Thanks for the quick reply. In order to use this plugin, I guess I need an instrument track instead of a MIDI Instrument from the environment, right?
 

Dewdman42

Senior Member
Probably the easiest way would be

  1. Create a new instrument track
  2. put ext instrument on it
  3. right click to reassign the existing track you have with midi data on it...to the new ext inst instrument track instead of being assigned to environment midi instrument object.
  4. After that the audio from your ext synth will be coming into the ext inst instrument channel if you want or you can just leave your existing audio/aux or whatever you were using for the ext audio. Doesn't matter, but ultimately you could have the audio come back to that ext inst channel instead...and then some latency compensation will be a little easier to manage too.

Hope that makes sense.

External instrument plugin gives proper latency correction with PDC since its hosted in the mixer...and you can adjust how much latency needs to be accounted for, etc.. Then you should be able to also set negative track delay as needed.
 
Last edited:

marclawsonmusic

Senior Member
I'm sorry, I'm not following 100%.

Currently, I have...

External MIDI Track (let's say Oboe 1) -> MIDI Instrument (Environment) -> Instrument Channel Strip with VEPro AU3 (Environment).

I add a new Software Instrument Track (in Tracks view, not Environment), and add the External Instrument plugin. (Not sure how to configure that plug-in, though... just leave it as-is?)

Then, I reassign my External MIDI Track (Oboe 1) to the Software Instrument Track with the External Instrument plugin. However, that signal chain is incomplete (nothing is talking to VEPro), so I cabled the Software Instrument Track with External Instrument to my VEPro AU3.

And it still doesn't interpret delay.

This might be a Logic version issue? Like I said, I'm on 10.4.8.
 

Dewdman42

Senior Member
ahhhhhh.. sorry I didn't realize you were talking about VePro when you said "External".

this is a bigger problem and you may not be able to solve it easily. Really the negative delay is not working that way?
 

marclawsonmusic

Senior Member
Here is a project that demonstrates this... The only track that works correctly is the Software Instrument with the instrument plugin directly on the track (yellow track). The multi-timbral doesn't work consistently, and the external MIDI doesn't work at all (the light on the track is pinging with the early delay - but the audio doesn't return early).
 

Attachments

  • Negative Delay Testing.logicx.zip
    190.1 KB · Views: 1

Dewdman42

Senior Member
Just ran a little test, sorry my previous deleted comment was wrong. the negative delay seems to only work on instrument tracks not on external midi tracks feeding instrument tracks. You can put one huge negative delay for the entire instrument channel still....but that is almost certainly not what you want..

That's really annoying actually, might be a bug....
 

marclawsonmusic

Senior Member
Upgrading to 10.5.1 didn't do anything. I'm running out of options... I will submit a bug report, but I'm curious how someone like John Powell manages this.

@kmaster, did you ever find a solution?
 

Dewdman42

Senior Member
I think that's a bug. Even the docs for LogicPro seem to say that track delay can be used for "tracks", there is no mention that it can't be used for external midi tracks. I think this is probably a bug in LogicPro, so make sure to report it. Here's one hypothesis....

In the scenario you are using, there are two relevant objects in the environment. There is the midi instrument object and there is the inst channel strip object that it is cabled to. Both of those two objects have their own delay parameter. In this case if you change the value of the delay on the strip object, that actually takes precedence and works, while the delay on the midi inst object, which is also the one that is displayed on the track properties inspector from the arrange page....that value appears to be ignored in this case, I think because somehow the delay in the inst stip is overriding it, internal programming bug as far as I'm concerned. The one shown on the Track inspector should be the one being used, right?

Anyway, please make sure to submit a bug report. I will have to update the AU3 template docs I made to point out that track delay won't work right with that setup.

how many tracks do you have in your template?

My thoughts are that either you have to go to the other template approach, which allows only 127 midi tracks per VePro Instance, but would avoid this particular problem.....or.... you need to find a different solution for negative track delay. I have a Scripter solution but its not easy to setup
 

Dewdman42

Senior Member
if you want to try scripter solution, go get this script: https://gitlab.com/dewdman42/artalign/-/blob/master/ArtAlign.js. (look in the top right corner for the copy to clipboard icon and use that to get the script on clipboard and then paste it into scripter.

Here are instructions: https://gitlab.com/dewdman42/artalign/-/wikis/ArtAlign.js
  1. Put this script onto the channel where VePro.AU3 is hosted.

  2. you have to tweak the script with the specific channels that have latency.

  3. once you have done that, the Scripter GUI will display the largest latency out of all the channels you configured. you need that value to go configure negative track delay.

  4. go to the environment and select the channel strip object that is hosting VePro.AU3. Set the negative track delay to the value that was displayed in the scripter GUI. (or use expert sleepers latency fixer which is in some ways easier and more reliable)

That should work, try it.

What this will do is to delay ALL your tracks by that max amount, and the global negative delay will offset all tracks back to where they should be, but the script will adjust just the ones you configured to have a little more negative offset as you configured them.

I am working on a more comprehensive solution for this problem that would be easier to use, but unfortunately its no where near done and not a super huge priority for me... but the above should get you through the issue.
 
Last edited:

marclawsonmusic

Senior Member
Thanks a bunch, @Dewdman42. I just submitted a bug report, but I saw some old posts from 2015 where this was an issue back then. I wonder if it will ever get fixed.

I have about 250-275 tracks in the template. My impetus for doing this new setup was to support the track delays - separate delays for longs, shorts and legatos. I have the VEP side sorted, and even the AU3 has been pretty stable. In fact, everything is setup and working perfectly - with very low CPU usage. But if I can't get the track delay thing working, it's a lost cause.
 

Dewdman42

Senior Member
not entirely a lost cause....

Like I said, two options.....

  1. use three VePro instances...with no more than 127 midi tracks each. You can use the other template I made that has 1270 tracks on 10 VePro instances, to get started. The downside is...your mix is separated in three seperate VePro instances.

  2. Try the script from my last post.
 

marclawsonmusic

Senior Member
not entirely a lost cause....

  1. ... You can use the other template I made that has 1270 tracks on 10 VePro instances, to get started. ...
I did some testing tonight and think I can use a bunch of Instrument channel strips (instead of MIDI Instruments). I can clone the VEP channel strip over and over, changing ports and channels and then reassign all my External MIDI Instrument tracks to those channel strips.

It appears that delay is recognized on the channel strips, but not on External MIDI Instruments (as we found).

Your 1270 template pointed me in the right direction. At the moment, I am relieved. Thanks, @Dewdman42!
 

Dewdman42

Senior Member
I prefer using this other approach in general also.. But....

Make sure you read the instructions on that template thread about how to manually create those kinds of tracks, there is a little so called "tap-dance" you have to do for each transition to each next port, you can't just clone them all...

it should be pretty straightforward for you though. With that option the negative track delay will work

I also want to point out one more thing though..the scripter script I sent you will actually do a better job of handling the negative delay, then the negative track delay. If you're up for setting it up, which isn't really that hard honestly..but anyway, it will negative delay only NoteOn's, PC and CC instrument switches that you specify as such. NoteOff, PitchBend, AfterTouch and all other CC's are left without being sent early..which is what you want!

you can use that script with the Instrument track approach too though...
 

marclawsonmusic

Senior Member
Yes, I cloned them in the Environment.

On the plus side, delay works! On the not-so-plus side, I'm back to where every track is linked to the main VEP instrument - so if I mute / solo / fader one of them, it affects them all. That's the whole reason I went with External MIDI tracks in the first place LOL. So that's not going to work.

Your script could be an option, but unfortunately it will be on 24/7. Which means I need to disable while playing in a part, and reactivate during playback. Also, keeping track of the JSON is tricky if I want to make edits to the delays...

And I'm doing all this because I can't set a delay on External MIDI Tracks - a feature that should just work in Logic. Unreal.

Cubase is starting to look appealing! Or, I just have to go back to the old AU2 way of setting up tons of VEPro instances. What a nightmare.
 

Dewdman42

Senior Member
It’s a dilema I agree. There is no perfect solution only a choice of what to compromise

Here is another trick you can try. Inside vepro put an instance of expert sleepers latency fixer as an audio fx plugin of every channel that is making late sound. This will report that as latency to vepro and vepro’ pdc engine will do the rest.

With that you don’t need the script and you don’t need negative track delay. Use the environment based template if you want, doesn’t matter
 
Top Bottom