Midi Remote Script: How to send a midi-message to an external device?

Share your favorite Ableton Live tips, tricks, and techniques.
Post Reply
lophMusic
Posts: 12
Joined: Thu Feb 11, 2021 9:23 pm

Midi Remote Script: How to send a midi-message to an external device?

Post by lophMusic » Sun Dec 18, 2022 12:56 am

Hello Forum,

right now I try to send a midi-CC message to the external midi-device of the current midi-track using a 'Midi Remote Script' (in python).

I can manage to get to the name (and port) of the current device using:

Code: Select all

	cur_track = self.song().view.selected_track
	cur_midi_device = cur_track.current_output_routing		# string of the device name
	cur_midi_channel = cur_track.current_output_sub_routing		# string of the device port
So far so good.
But what I actually want to do is sending a Midi-CC message (CC 7) to that device, whenever the value_listener() of a fader gets new values.

That's where I'm stuck right now, because I really don't know where to send the bytes to. I think self._send_midi( ... ) seems to send the midi-message back to the controller-device, but that's not what I want. Looking through API-functions, I didn't find anything that might actually send data to the current output_routing of a midi track.

I find self._c_instance.set_cc_translation( ... ) a bit suspicious, but honestly I'm running out of ideas here, so any help is greatly appreciated

Post Reply