Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple output articulation sets cause 'Incompatible articulation set' error #9

Open
eakwarren opened this issue Aug 10, 2024 · 1 comment
Assignees
Labels
help wanted Extra attention is needed

Comments

@eakwarren
Copy link
Owner

LAS doesn't support multiple output entries in the Output tab of Logic's articulation editor. However, just unchecking the box at the bottom of the window after multiple outputs were created doesn't rewrite the .plist file completely. It leaves nested <array> </array> tags. Removing those tags fixes the error message.

@eakwarren eakwarren added the wontfix This will not be worked on label Aug 10, 2024
@eakwarren eakwarren self-assigned this Aug 10, 2024
@eakwarren
Copy link
Owner Author

eakwarren commented Aug 22, 2024

Multiple key switch outputs aren't supported in LAS right now due to multiple MB1 keys in the art set .plist file, which LAS can't programmatically parse.
Screenshot 2024-01-08 at 3 46 36 PM

In LAS.scpt:

set g_artSetMode to 0

In theory, leaving g_artSetMode at 0, should trigger the art set's Switches entry for an art, which then should fire all the associated Output tab midi commands to the instrument, but that may not be the case. Since I only have VSL's free BBO instruments, I'm unable to really test properly.

For reference, the handler function that generates the art list is getArtList(). The line:

if exists property list item "MB1" of property list item "Output" of property list item i of property list item "Articulations" then

tests to see if an MB1 item exists. But I'm unaware of a method to test for multiple MB1s. What would it do with them anyway? It should be triggered by the entry in the Switches tab of Logic's art set editor. The fact that art sets can be built with just Switch entries, or just Output entries complicates the parsing logic. g_artSetMode attempts to address that.

LAS.json (in Open Stage Control) accounts for the various Type possibilities in the Switches tab sent via midi:OSC-Midi port to Logic.

if (artMode === 0) {
// send proper switch to Logic
if (type === 'Note On') { //NoteOn in Logic Studio instruments
if (valueStart === null) { //Babylon Waves note on arts don't set values
send('midi:OSC-Midi', '/note', g_channel, selector, 127)
} else {
send('midi:OSC-Midi', '/note', g_channel, selector, valueStart)
}
send('midi:OSC-Midi', '/note', g_channel, selector, 0)
} else if (outputType === 'Controller') {
send('midi:OSC-Midi', '/control', g_channel, selector, valueStart)
} else if (outputType === 'Poly Aftertouch') { //pressure is legacy name
send('midi:OSC-Midi', '/key_pressure', g_channel, selector, valueStart)
} else if (type === 'Program') {
send('midi:OSC-Midi', '/program', g_channel, (valueStart - 1)) //-1 since Logic value 0 based
} else if (type === 'Pitch Bend') {
send('midi:OSC-Midi', '/pitch', g_channel, valueStart)
} else if (type === 'Aftertouch') {
send('midi:OSC-Midi', '/channel_pressure', g_channel, valueStart)
} else if (type === 'Note Off') {
send('midi:OSC-Midi', '/note_off', g_channel, selector, 0)
//} else if (type === 'Velocity') {
//send('midi:OSC-Midi', '/???', g_channel, valueStart)
}

Note the above code is separate from the code sent to MidiPipe to trigger the AppleScript function to change arts on existing notes on the piano roll via UI interaction. That method is handled here:

// send button number to MidiPipe for editing articulation on
// individual notes in Logic's piano roll via UI AppleScript
var midiPipeChannel = 16
var midiPipecc = 110
var buttonNumber
var values = getProp(this, 'values')
if (Array.isArray(values)) {
// if values is written as an array (["a", "b"])
buttonNumber = values.indexOf(value)
} else {
// if values is written as an object ({"label a": "a", "label b": "b"})
// +3 to bring 0 index to start at 3 for Logic menu UI (1:"-", 2:divider line)
buttonNumber = Object.values(values).indexOf(value) + 3
}
//console.log('value pressed buttonNumber ' + buttonNumber)
send('midi:OSC-Midi', '/control', midiPipeChannel, midiPipecc, buttonNumber)

It's a Logic issue if changing the art via Logic's dropdown editor doesn't (re)send all the Output midi triggers to the instrument.

@eakwarren eakwarren added help wanted Extra attention is needed and removed wontfix This will not be worked on labels Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant