Device Lock in Canvas

Hi! I’m creating my first Canvas and digging all of the possibilities here. One issue I’m running into at the moment is that I’m trying to duplicate the lock button behavior from Performance and Setlist views in my Canvas so that it’s tied to that specific device. I don’t want to lock all devices from one, and I don’t want to have to specify each device’s lock state from the Canvas editor. Is this possible?

  • OS and Version: macOS Ventura 13.4.1
  • Version of AbleSet: 3.0.6
  • Version of Ableton Live: 11.3.42

Also, @leolabs - I’m just now testing 3.0.6 after staying back on 2.7.5 for a long while, and it’s awesome to try all of the new features you’ve introduced since then. Really excellent work, as always!

Hey @patvalley,

You’ll always need to specify the device name(s), IP(s), or aliases if you don’t want the command to affect all devices.

Here’s a button you can try for that purpose:

Lock Button.json (853 Bytes)

Here’s the code in case anybody finds it useful:

Button type → Script
Script on press:

const locked = shared("locked", false);

if (locked) {
  sendOsc("/devices/unlock", "drummer-ipad");
  setShared("locked", false);
} else {
  sendOsc("/devices/lock", "drummer-ipad");
  setShared("locked", true);
}

Label:

${shared("locked", false) ? "🔒 Device Locked" : "🔓 Device Unlocked"}

Background color (set to Dynamic):

${shared("locked", false) ? "red-600" : "red-950"}

That should keep the button state in sync across all devices that have that Canvas open.

Also, if you want to target devices that don’t have a custom name set, you can use "Unnamed". AbleSet automatically assigns that alias to any device without a specific name.

Would that work for your use case?
I’m looking forward to your reply!

Hey, thanks so much for all of this super-helpful information, I really appreciate it!

I think I’ll take a different approach to using Canvas here. The Setlist and Performance views both work so well as-is for admin/control functions, so I’m going to change my Canvas to be for user/viewer use only. On that note, is there a way to make the Canvas automatically “locked” without having a button? Basically, I’m trying to still include the song progress bar and the setlist embed, but I don’t want Canvas devices to be able to control playback. Is that currently possible?

Thanks again!

Hey @patvalley,

Glad to hear that helped!

Right now, the lock system works per device, not per page or per Canvas.

So there isn’t currently a way to have a Canvas automatically “locked” while still allowing other views (like Performance or Setlist) on the same device to control playback differently. The lock state applies to the entire device, regardless of which page is open.

And thanks a lot for the suggestion! Feedback like this is really valuable and helps us keep improving the workflow.

Hope that clarifies things!

I see - thanks so much for your explanation here! With my new approach here, any device that has Canvas open (a user/viewer only - no show control) would be one I’d want locked in any view. I’ll just plan on locking the device in Setlist or Performance view before I switch that device over to the Canvas view (unless there’s any way to disable interaction with the setlist embed or the song progress bar in Canvas).

Thanks again!

There isn’t currently a way to disable interaction with elements like the setlist embed or the song progress bar directly in Canvas, so using device lock like this is the best approach for now.

If it helps, one way to streamline this is to name those devices something like "Canvas", and then handle it automatically.

For example, you could use a Lock +OSC Track and send this at the start of each song:

/devices/lock "Canvas"

That way, any device you’ve labeled as "Canvas" will always be locked as soon as a song starts, without needing to do it manually each time.

Hope that helps!

1 Like

Another suggestion which may or may not be helpful - I’ve had some success using CSS on a per-canvas level to lock certain elements using “pointer-events: none” however this is fixed and not toggled on or off with a button - but you could use scripting to achieve this! :slightly_smiling_face:

2 Likes

Thanks @agustinvolpe and @zacjohnsnz - I appreciate your help here!

2 Likes