diff options
author | Eddy Pedroni <epedroni@pm.me> | 2024-11-09 20:35:56 +0100 |
---|---|---|
committer | Eddy Pedroni <epedroni@pm.me> | 2024-11-09 20:35:56 +0100 |
commit | cda8197669409689be291660f93cb288ab2d31b3 (patch) | |
tree | 81db9b0c7c0491e0737cbffb39af6b935c0dfeb8 /midi_wrapper_mido.py | |
parent | a2257a900d4fffd6f94b73f1c48c62370ed1d684 (diff) |
Migrate to project-based structure
Diffstat (limited to 'midi_wrapper_mido.py')
-rw-r--r-- | midi_wrapper_mido.py | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/midi_wrapper_mido.py b/midi_wrapper_mido.py deleted file mode 100644 index bf3aa85..0000000 --- a/midi_wrapper_mido.py +++ /dev/null @@ -1,21 +0,0 @@ -import mido - -class MidiWrapper: - def __init__(self): - self._inPort = None - self._outPort = None - self._callback = None - - def setCallback(self, callback): - self._callback = callback - - def connect(self, deviceName): - self._inPort = mido.open_input(deviceName) - self._inPort.callback = self._callback - self._outPort = mido.open_output(deviceName) - - def sendMessage(self, note, velocity, channel): - if self._outPort is not None: - msg = mido.Message('note_on', channel=channel, velocity=velocity, note=note) - self._outPort.send(msg) - |