[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#72142] [PATCH v1] Fix formatting, boost not needed in python-rtmidi
From: |
jgart |
Subject: |
[bug#72142] [PATCH v1] Fix formatting, boost not needed in python-rtmidi |
Date: |
Thu, 18 Jul 2024 16:38:54 +0000 |
> + (inputs (list glibc python-cffi jack-2 rtmidi))
Hi, since this is a Python library, do we want to make the Python inputs
propagated?
Were you able to test in a shell that the following works fine when run from a
script or repl?
If not, can you test that and report back on the results. I'll give it a try
after.
Or, how have you gone about testing that this package works in a Guix
environment with all the system audio requirements?
```python
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")
with midiout:
note_on = [0x90, 60, 112] # channel 1, middle C, velocity 112
note_off = [0x80, 60, 0]
midiout.send_message(note_on)
time.sleep(0.5)
midiout.send_message(note_off)
time.sleep(0.1)
del midiout
```
all best,
jgart