What's new

Introducing LAS, the Logic Articulation Switcher (v1.2 released 2/7/24)

eakwarren

Eric Warren Hobbyist Composer
Introducing LAS, the Logic Articulation Switcher. LAS is a lightweight articulation switcher solution with bi-directional feedback for Logic Pro using free and open-source software that runs in a browser on any device. I hope you find it useful! :) View the project on github.



2/7/24 v1.2 released
  • Added support for multiple art types (controller, program, aftertouch, pitch bend, note off)
  • Added support for Per Channel Strip MIDI Channels in art sets
  • Added library code option to build pic URL from art set name
  • Added sendosc universal binary
  • Added support for large art sets (≤ 50 arts)
  • Optimized Logic queries and processing
  • Fixed bug when right panels open in Main Window
 
Last edited:
First, this is great and it's particularly nice of you to package it up and distribute it as open source. Well done!

My only disappointment is that Apple hasn't (yet) built this into the Logic Remote. It seems like such a natural extension. Instead, you can get (typically ugly, mostly useless) smart controls. But unless and until they do, your solution is clever and device agnostic! I especially liked the cheeky Apple Watch in your photo.
 
Last edited:
impressive! It's great that you've made it a web app to interface with iPad... in my experience the web apps (like patchboard) are way more robust/ reliable.
 
Hugely great effort and if I were on a Mac and used Logic, I'd be all over this. Hope you posted the code with a tip jar, this was quite the task. 👍
 
Huge congrats to you Eric.
I had the privilege to watch the project growing from a baby project to a serious product.
I hope the best for this unique product.
 
Yeah, this looks very interesting. Will test it later today.

Is there any way to change how it reads the info for the pictures? I have started using suffixes instead, like "Horns [CB]" (inspired by John Powell's template).

Edit: Can't seem to get it to work. OSC says "Articulation Set not found in folder".

I've tried putting the articulation set file in the root articulation set folder and naming both the track and the articulation set exactly the same (I tried with "BBC Horn"). The picture loads up though.

The "getPList" function returns 1 in this code:

AppleScript:
on getPlist(artSetNew) #global get .plist path
    set p to do shell script "find '/Users/" & userName & "/Music/Audio Music Apps/Articulation Settings' -type f -name '" & artSetNew & ".plist'"
    if p contains return then #carriage return means multiple matched plists
        set p to my findAndReplaceInText(p, return, "</br>")
        set pfile2 to p #send paths to Msg
        set p to 0
    else if p is "" then
        set p to 1
    end if
    return p #if p "" then no artSet found
end getPlist

So something seems to make the path empty.


Edit 2: It seems the artSetNew that is being passed there is an empty string.

Will report back after more testing... :)


Edit 3: After banging my head against the wall with this I stumbled upon something: It seems to only work with articulation sets that have Switches set up in the Articulation Set (first tab in Logic's Art Set editor window). Just populating that list and resaving makes them pop up in LAS.

I often use articulation sets without any Remote switching set up (the BBCSO ones didn't have them). I guess I'll have to just add a bunch of those for the time being.
 
Last edited:
Just noticed another thing; I can change articulations of existing notes from Logic and it updates the view on my iPad, but I can't change the articulation from LAS. It just jumps back to the previous articulation. For example, having notes set to "Long" selected and trying to press the Marcato button just makes it jump back to Long.
 
I think this is very clever, kudos to you Eric, but for me, it just introduces another layer to the process that potentially could go wrong in the future, so I am more likely to continue to trigger.
articulation changes from my 88 note keyboard.

That said, though, I may give it a try with an open mind and see if that changes my assumption.
 
Is there any way to change how it reads the info for the pictures? I have started using suffixes instead, like "Horns [CB]"
It’s likely possible. I’ll look into it.

It seems to only work with articulation sets that have Switches set up in the Articulation Set (first tab in Logic's Art Set editor window). Just populating that list and resaving makes them pop up in LAS.
For example, having notes set to "Long" selected and trying to press the Marcato button just makes it jump back to Long.

DM me the art set .plist in question and screenshot of your entire screen please. A short vid would be even better. :)

I may give it a try with an open mind and see if that changes my assumption.
Totally get that the switcher might not be for everyone. If you don’t find it useful, I’ll send you a refund. :roflmao:
 
Is there any way to change how it reads the info for the pictures? I have started using suffixes instead, like "Horns [CB]"
This is a great enhancement! Thanks for asking.

Add the following global under the artColorSetting global:
AppleScript:
# libCode options
# 0 - library code prefixes track name (VSL track name)
# 1 - library code suffixes track name (track name VSL)
global libCode
set libCode to 0

Next, edit the if trackNameNew code block around line 331 to:
AppleScript:
        #send track name
        if trackNameNew ≠ trackNameOld then
            my sendOSC("/trkName ", "s ", trackNameNew)
        
            #send picName
            set pic_list to my splitText(trackNameNew, space)
            set e_pic_list to length of pic_list
            if libCode = 0 then
                set picName to item 1 of pic_list
            else if libCode = 1 then
                set picName to item e_pic_list of pic_list
            end if
            my sendOSC("/picName ", "s ", picName)
        end if

Finally, add the following handler in between the sendOSC and stripText handlers at the end of the script:
AppleScript:
on splitText(theText, theDelimiter)
    set AppleScript's text item delimiters to theDelimiter
    set theTextItems to every text item of theText
    set AppleScript's text item delimiters to ""
    return theTextItems
end splitText

Download the updated script from GitHub.
 
Last edited:
Hi!
any idea why i get this error when running LAS.scpt ?

AppleScript:
tell application "System Events"
    get running of process "Logic Pro X"
        --> error number -1728 from running of process "Logic Pro X"
end tell
tell current application
    do shell script "whoami"
        --> "ravez"
end tell
tell application "System Events"
    get title of window 1 of process "Logic Pro X"
        --> "En: Sus"
    get title of window 1 of process "Logic Pro X"
        --> "En: Sus"
    get title of window 1 of process "Logic Pro X"
        --> "En: Sus"
    get value of pop up button 1 of window "En: Sus" of process "Logic Pro X"
        --> "Articulation 1"
end tell
tell current application
    do shell script "~/Documents/LAS/Apps/sendosc 127.0.0.1 9000 /message2 s ''"
        --> error "sh: /Users/ravez/Documents/LAS/Apps/sendosc: Bad CPU type in executable" number 126
    do shell script "find '/Users/ravez/Music/Audio Music Apps/Articulation Settings' -type f -name '.plist'"
        --> ""
end tell
tell application "System Events"
    get value of property list item "Articulations" of property list file 1
        --> error number -1719 from property list file 1
end tell
tell current application
    do shell script "~/Documents/LAS/Apps/sendosc 127.0.0.1 9000 /message5 s ''"
        --> error "sh: /Users/ravez/Documents/LAS/Apps/sendosc: Bad CPU type in executable" number 126
Result:
error "sh: /Users/ravez/Documents/LAS/Apps/sendosc: Bad CPU type in executable" number 126
 
Last edited:
@ravez Install sendosc via Homebrew to compile it as x86_64 architecture. Note that you'll then need to change the path to sendosc in LAS.scpt to:
AppleScript:
global sendoscPath
set sendoscPath to "/usr/local/Cellar/sendosc/1.0.3/bin/sendosc " #<-- Set path to sendosc if needed. Trailing space is required!
 
Thanks, that worked :)
Now the other issue is when i click on an articulation in OSC it pops up the articulations pop-up menu but doesn't select the chosen articulation, it just keeps it open
 
I noticed I had, in the backround behind all apps, one of those dialogs requesting access to something on my computer, from the MIDI app. After giving it permission, same thing is happening as what @ravez is describing. I press an articulation to change an existing one and the dropdown menu opens but it doesn't select anything. I'm suspecting there's another permission thing needed that I've missed.

BTW, amazing work with that new change to enable suffixes! Will try it out.
 
Would you both please DM me a project file and a full screenshot or video of Logic?
 
Last edited:
Top Bottom