"grab" a Launchpad control ?

chapelier fou's icon

Hi,
I'd like to "grab" the whole bottom row of my LP Mini so in any context (in session mode) they behave like 8 stop button and 1 "stop all clips" button.
How is that doable ? How to target the row ?
Thanks !

Evan's icon

What script does that use?
I'm not sure that the grab/release control functionality is present in any other controller but Push/Push 2, so you might have a bit more work ahead of you.

chapelier fou's icon

That's why i put the "" before "grab" !
It's standard Launchpad script.

I've dig into the controls and figured out they are controls 58 to 65 plus 82.

This is the list i get from getinfo :
print: info type ConfigurableButtonElement
print: info description Special button class that can be configured with custom on- and off-values
print: info child canonical_parent Launchpad
print: info property mapping_sensitivity float
print: info property name str
print: info property num_delayed_messages int
print: info property optimized_send_midi bool
print: info property proxied_interface ProxiedInterface
print: info property resource StackingResource
print: info property send_depends_on_forwarding bool
print: info property suppress_script_forwarding bool
print: info function begin_gesture
print: info function clear_send_cache
print: info function clear_value_listeners
print: info function connect_to
print: info function disconnect
print: info function end_gesture
print: info function force_next_send
print: info function identifier_bytes
print: info function install_connections
print: info function is_momentary
print: info function is_pressed
print: info function mapped_parameter
print: info function message_channel
print: info function message_identifier
print: info function message_map_mode
print: info function message_sysex_identifier
print: info function message_type
print: info function needs_takeover
print: info function notify_ownership_change
print: info function notify_value
print: info function original_channel
print: info function original_identifier
print: info function receive_value
print: info function release_parameter
print: info function reset
print: info function reset_state
print: info function script_wants_forwarding
print: info function send_midi
print: info function send_value
print: info function set_channel
print: info function set_enabled
print: info function set_feedback_delay
print: info function set_force_next_value
print: info function set_identifier
print: info function set_light
print: info function set_needs_takeover
print: info function set_on_off_values
print: info function set_report_values
print: info function turn_off
print: info function turn_on
print: info function use_default_message
print: info function value_listener_count

The function is_pressed gives me its state but it's not relevant because i would need to call it. It don't get how to "observe" its state.

Also i'd like to observe what Mode is selected so this would be a special button behavior only when session mode is selected.

Evan's icon

All buttons have a 'value' property.
Check the 'mode_index' of the MainModesComponent of the script.

Max Patch
Copy patch and select New From Clipboard in Max.

There's not an easy way (that I know of off the top of my head) to disable the native functionality of a button in the LP script. So it will still trigger the clip, along with whatever functionality you define. You might need to dig a bit into the script find the id of that clip slot of the matrix and disconnect it that way. Or something...Good luck!

chapelier fou's icon

Many thanks !

I might go the easy way and make a UI to manually map those 9 buttons. That would save me a lot of programming and it will still be quite fast to map. And i can save it to my default liveset as well !

Evan's icon

Yeah, that's a possibility. But with the M4L way, you could do some meaningful stuff with the LEDs.
You could do some javascript code to make this all pretty quick and neat.

chapelier fou's icon

I think MIDI mapping them disables their component action but they can still be accessed by M4L. Didn't try yet.

Evan's icon

Ah yes, you're right. I wonder how that's handled from the script side...that functionality must be available from the API, but it's not important enough to me for me to keep digging ;)

Good luck!

chapelier fou's icon

Well, it appears that when a matrix button is MIDI mapped to something, i cannot change it's led state anymore.....
Annoying since if there is any clip in the 8th scene when i load the set, it lit's their buttons in the LP. And i'd like to have this bottom row unlit, or all the same color. Any hint ?

chapelier fou's icon

Here's the device, in case you'd like to help...

ClipStopController.amxd
amxd
Evan's icon

Honestly I'd probably just modify the script. It would be pretty trivial to remove those buttons from clip launching, and make them stop buttons.

chapelier fou's icon

Damn you're right.
But i have no clue how to do this...

Evan's icon

EEK! Neither did I at one point. The trick is getting the decompiled script from github: https://github.com/gluon/AbletonLive9_RemoteScripts
to not throw any errors, and then it's just changing a few lines of code to remove the lower row of buttons from being assigned to clips, and then assigning them to the buttons in the script, or leaving them unassigned. and you can do the mappin in M4L.

chapelier fou's icon

Damn i hate this feeling when i get some very partial understanding, just looking at the code, but have no clue where to begin...
(i'd drop a few bucks if you'd make this custom script, with some explanations. Don't know how to send a private message here).

Evan's icon

Yeah we should be able to work something out. I'm getting off the grid till Sunday, but we'll reconnect then and figure something out.

chapelier fou's icon

Wonderful. Enjoy your weekend then.

Myr's icon

Hi Chapelier,

It's very possible to make the patch / max for live device you're after. And not too tricky a task.

You want to send "call set_enabled 0" to each button to disable it's standard behaviour. You then want to set up a [live.observer] property to monitor the button presses.

You can set the LEDs by setting the "send_value" function of each button.

You'll also want to monitor, but not disable, the left and right buttons of the top row of buttons. The ones which let you move the Session Highlight Ring / Track focus left and right. This is how you'd make sure the Track Stops are stopping the correct Tracks.

You would also want to set up a metronome to regularly get the Session Highlight box position to make sure you have the right Track index / offset. This is because if you enable MIDI map the Session Highlight Ring will be set back to 0 0, so you're calculations based on the top row button presses may be off. You can find this in the Session_Control component, the "track_offset" function.

Hope this helps. I'd be happy to help you program further, edit your device, or make the device for you for a fee for my time.

Either way hope you get it working how you want! :)

Myr's icon

Ahh forgot to mention you monitor the button presses by using a [live.observer] with the propery "value", the ID of [live.observer] set to the ID of the button to be monitored.

chapelier fou's icon

That's so helpful. Many thanks for taking the time to explain. I think i should sort it out by myself now.

Myr's icon

No worries. Good luck! Hope it goes well :)