3

I would like to know how can i send MIDI Control Change messages from a Python script to an application called rakarrack, which receives MIDI messages to change volumes, turn on/off FX's, etc. All this done via JACK/ALSA.

At this point i just try with the library python-rtmidi (the code i wrote is based on the example provided there), but when i try to send the messages, rakarrack doesn't do anything. I think because is not receiving anything. I already check the Preference in the application and the MIDI In device (which is created from Python) is listed as 'rtmidi' and selected.

import time
import rtmidi
midiout = rtmidi.MidiOut()
available_ports = midiout.get_ports()
if available_ports:
 midiout.open_port(0)
else:
 midiout.open_virtual_port("My virtual output")
control = [0x74, 116, 124] 
midiout.send_message(control)
del midiout

As you can see, I'm trying to send one control message [0x74, 116, 124] , I took those numbers from here: http://rakarrack.sourceforge.net/midiic.html

asked Aug 23, 2013 at 0:01

1 Answer 1

3

I need to send a "Chan 1 Control/Mode Change" message as the first byte, which is "0xb0", then 0x74 which is the control that i want change, and finally the value "124", which is turn on/off FX:

control = [0xb0, 0x74, 124]
answered Aug 23, 2013 at 21:12
1
  • Stumbled across the same problem. The rtmidi lib has constants for those. You can from rtmidi.midiconstants import CONTROL_CHANGE which equals to 0xB0, for example. There are many more useful constants in there. Commented Aug 28, 2023 at 10:20

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.