ideoforms / AbletonOSC

Control Ableton Live 11 via Open Sound Control (OSC)
MIT License
429 stars 70 forks source link

Add "Master" track #84

Open markmarijnissen opened 1 year ago

markmarijnissen commented 1 year ago

Get/set/listen properties in the master track:

The master track is simply added tot the track list, so if you have 8 tracks going from [0...7], then master is number 8.

ideoforms commented 1 year ago

Hey @markmarijnissen, apologies for the slow reply on this! Thanks for your changes. My main concern is that indexing the master track based on the number of tracks is brittle to changes in the number of tracks in the set. A more robust approach would be to replace the integer track ID with the string "Master", which could be used in place of the numeric ID — e.g.:

/live/track/set/volume "Master" 0.5

Would this work in your situation?

Coupe70 commented 1 year ago

As live/song/get/num_tracks only counts the midi/audio tracks (no return tracks, no master) I agree that the master does not belong in the track list as additional track. How is the master actually accessed in the Live API (and how about the return tracks)? Should be done the same way in AbletonOSC.

ideoforms commented 1 year ago

@Coupe70 Re namespace for send tracks:

I've just looked at the Live API docs, and here's how it works internally. The Song object has three properties:

One approach to doing the same in the AbletonOSC namespace:

This is OK, although it does mean that the master get/set take one less parameter. It also adds slight confusion between /live/track/set/send (to set the send/return level of a track) and /live/track/send/set/.. (to set properties of a given send track).

Another approach:

Unifies the namespace, and means that all track getters/setters are handled with the same parameter sequence (track_id, ...). It does mean that the first argument is sometimes an int and sometimes a string, and iterating the characters corresponding to multiple sends ("A", "B", "C", ...) is a bit gross.

I think I come down on the side of the latter. Other suggestions welcomed.

Coupe70 commented 1 year ago

@ideoforms I was hoping to find some inspiration in the OSC list of LiveOSC. https://github.com/dinchak/LiveOSC/blob/master/OSCAPI.txt

LiveOSC does not make a difference between set/get. If there are parameters, it's set, if there are no parameters, it's get. But that's a different story.

LiveOSC does not put all kinds of tracks under "track". A "track" is just a "normal" audio/midi track, others are "send", "return", "master". So that would be /live/master/set...

I also noticed a mistake in your approach to set a send.

/live/track/send/set/volume 0 0.5

This would work for a return track volume, but is missing a third parameter for sends and should be

/live/track/send/set/volume trackID sendID value and /live/track/set/volume trackID A 0.5

In the end I think like the first approach better.

ideoforms commented 1 year ago

Yeah, I did think about "action-less" setters when first designing the API, but I wanted symmetry/consistency between get, set, start_listen, stop_listen (plus there are other actions like /live/clip/add/notes), so I concluded that having an explicit get/set was overall more consistent.

I don't think there was an error in my example, but maybe an interpretation issue: between send tracks and send levels. (In the Live API terminology, a return track is always referred to as a send track, so I'm keen to keep this terminology in AbletonOSC)

There's already a getter/setter for the send levels of an ordinary (audio) track:

/live/track/set/send trackID sendID value

"volume" is really used to explicitly set the output volume of a track (not for send levels). The example that I'm illustrating below is setting the output volume level of the first send track (i.e., Send A):

/live/track/send/set/volume 0 0.5

I wonder whether questions like this would crop up a lot if we did go with the namespace of /live/track/send/set/volume to refer to send tracks... /live/track/send/set/volume (to set the output level of the first send track) is extremely easily confused with /live/track/set/send (to set the send level of a given audio track)!

Coupe70 commented 1 year ago

Ok, I understand. It's not the send knob, it's the volume fader of the "FX track". I understand the problem with the terminology as with a hardware mixer you have clearly definied the send -> outboard equipment -> return while in Live you are straight SENDing into a track which contains the FX.

While I understand this, "send track" is still very confusing to me - as you said the term "send" appears at two different spots. So here are my arguments no matter how it is called in the API:

Even if you might call it a send track in a DAW (you would never do this with a hardware mixer) the volume fader is AFTER the FX, so it is the volume RETURNING to the mix. But my main point, not only applying to the fader: When you open the info view in the lower left corner of Live and hover over the "FX track" the info view says RETURN track in german and english language setting. And the german manual calls it RETURN track, too. So for whatever reason they did this in the API, they are calling it return track themselves.

I think calling it 'return' in AbletonOSC would avoid a lot of confusion.

ziginfo commented 5 months ago

Hello Folks is there finally an OSC-command to control the Master-Volume ?? I tried the three different ways you where talking about... but they seem not to work !!?? or did I oversee something ?? thanks in advance... :)

zbynekdrlik commented 5 months ago

All of us are waiting for this, so please .....