Open tooh opened 12 months ago
I don't have ableton installed currently but may still be able to help. Can you add a print statement on line 53 of midi_to_iot.py
?
The function should look like this:
def process_message(message):
print(message)
if message[0] != CC_CODE:
# only care about MIDI CC messages for now
return
if message[1] not in CC_ACTION_MAP:
# only use messages for which we have a defined action
return
CC_ACTION_MAP[message[1]](message[2])
Save the file and run it again. This will print out all the messages that are being received by the script. It may be a bunch - so make sure you try to figure out which ones are being sent when you are starting and stopping playback. If you drop the output back here in a file it would be helpful.
Hi Guy,
Thanks for your reaction. I added your debug print message and this resulted in this log
I could isolate the Recording , Stop and Play events.
I used the MackieControl Classic setting in Ableton as control surface.
MIDI to IOT monitor running. Press Control-C to exit.
[242, 0, 0]
[250]
[252]
[242, 0, 0]
[250]
[252]
I suspect that it is not entering the logic because of
if message[0] != CC_CODE:
# only care about MIDI CC messages for now
return
And the receive codes ( CC's?) are not in the
CC_ACTION_MAP = {
118: on_record_enabled,
117: on_play_changed
Is this something you can work with?
BTW if the basic logic is working I want to add/modify/replace the IFTTT webhooks.
I'm using a Hue light with a hub and I know I can send HTTP requests to the hub.
Something like this
https://<bridge ip address>/api/1028d66426293e821ecfd9ef1a0731df/lights/1/state
Body {"on":true, "sat":254, "bri":254,"hue":10000}
Method PUT
Is it possible to use this in Ableton Live?
i’m not a programmer but with some hints from you I can do some changes and tests.
The m-audio control surface does not exist on my Ableton Live. I see that your script reacts on CC values. Other solutions suggest to use the Mackie classic control surface, but as far as I know then Note on/off is used instead of CC.
The script is running but never receives the expected CC’s