mod-audio / mod-desktop

MOD Audio for the desktop
https://mod.audio/
GNU Affero General Public License v3.0
169 stars 9 forks source link

[Question] MIDI controller using Mido #50

Open vvatelot opened 8 months ago

vvatelot commented 8 months ago

I am trying to make a small controller using mido. While the output MIDI port is detected by Jack (for example), it does not work with MOD Desktop.

Here is a small sample:

import time

import mido

port = mido.open_output("loopMIDI Port 1", virtual=True)

while True:
    msg = mido.Message("control_change", value=127, control=1)
    print(msg)
    port.send(msg)
    time.sleep(1)

    msg = mido.Message(
        "control_change",
        value=0,
        control=1,
    )
    print(msg)
    port.send(msg)
    time.sleep(1)

I am trying to set those changes to a pedal controller, but it is not recognized... Am I doing something wrong ? Missing something ? :thinking: