Getting Track names from Logic!


I'm trying to use the code posted by Sylvain to get the track names from Logic using Mackie control protocol.

I've managed to get the full track name from logic on the virtual MCU lcd.
Problem is getting it correctly...

With cubase, the track name always start at the same position on the LCD and the actual code to get the track name is simple :

// update text widget
set("lcd_MODIFIED", locals.text.slice(72,101).join(""))}

With logic, MCU LCD look like this :
Track 1 "yourtrackname" channel strip
Track 258 "yourtrackname1234567890123" channel strip
Track 12 "yourtracknameotherlenght" channel strip

My first issue is with the starting slice :
after Track 9, the track name will be sliced at the wrong place as it will start one step further, more issues after the Track 99...

what code should I use to remove " at the beginning of the track name string and to also remove Space" while keeping the start if the string doesn't begin with " or Space" ?

Second issue is at the end of the track name, depending on its length, "channel strip" will be more or less closer.

Any idea of script slicing everything from the last " at the end of the track name will also be greatly appreciated.

I'm sorry, I'm not the best coder :wink:

I've managed to get the full length Logic track names from touch OSC in OpenStageControl (and it is really easier), but I'd rather use the MCU way as it is directly implemented in Logic and it should be a cleaner solution than using bridge and touch OSC as a Logic controller and as a relay to OpenStageControl on the top

Thanks for your help !

I'm progressing !

Just have to remove "channel" at the end of the name.
Will post the code when done

It does work !

LogicTrackName.json (7.7 KB)

For your OSC MIDI setup :
sysex Mackie:virtual

in logic add a Mackie control Pro Control Surface with Mackie IN/OUT for MIDI ports

The only thing is you don't have to give more than 31 letters to your track name

Just have to solve how to work with .json files to get a great screen controller for my articulations !!!!!

Great work! I tried using MCU Pro using my previous Cubase's code but all I get is "- Pan Pan Pan Pan Pan" or some weird strings value. I directly inject js in OSC as a custom module but I'm having a hard time get track name or correct feedback from Logic.

EDIT: I tried with a blank Logic project and just your JSON, but it doesn't work.

Sorry to hear that.
It does works for me on my MacBook and my Mac studio.

Anything displayed on the display?

FYI, it worked for me. AMAZING job @pieca! Thanks so much!

Even on my template with more than 800 tracks and closed track stacks. Remarkable!

Now I would only have to create or get access to an articulation panel that can read the articulation set *.plist files from Logic. Otherwise, as I'm moving over from Patchboard (, which cannot see AUv3 multiport tracks), I would have to redo about 600 articulation panels (with some containing more than 100 arts). OUCH!