Open
Description
When using the Program Change call it sends 0x0 followed by the patch number.
Example code:-
import usb_midi
import adafruit_midi
from adafruit_midi.note_off import NoteOff
from adafruit_midi.note_on import NoteOn
from adafruit_midi.program_change import ProgramChange
import time
midi = adafruit_midi.MIDI(
midi_in=usb_midi.ports[0], in_channel=0, midi_out=usb_midi.ports[1], out_channel=0 )
midi.send(NoteOn(65,100))
time.sleep(0.6)
midi.send(NoteOff(65,0))
time.sleep(0.6)
midi.send(ProgramChange(0x7))
I notice in the unit test test_MIDI_unittests.py this call is not tested despite the import list described as the "full monty".
Is there a temporary fix to send this message? I have been tying to specify the data bytes and sent those, but I keep getting error messages like "AttributeError: 'NoneType' object has no attribute 'channel'".
Metadata
Metadata
Assignees
Labels
No labels