MIDI ProgramChange does not work

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Grumpy_Mike
 
Posts: 31
Joined: Thu Mar 22, 2018 2:46 am

MIDI ProgramChange does not work

Post by Grumpy_Mike »

I can't get the MIDI program change to work. This is a sample code that illustrates that I can send notes but not program change.

Code: Select all

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_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))
The last line produces an invalid message from MIDI Monitor
Screen shot from MIDI monitor
Screen shot from MIDI monitor
Midi monitor screen shot.png (82.86 KiB) Viewed 86 times
Further investigation shows that the Program Change call actually sends two bytes 0x0 and 0x7
Is there a way of cobbling up a Program Change message from individual bytes?

User avatar
tannewt
 
Posts: 3304
Joined: Thu Oct 06, 2016 8:48 pm

Re: MIDI ProgramChange does not work

Post by tannewt »

An issue for this is here and likely to get follow up: https://github.com/adafruit/Adafruit_Ci ... /issues/37

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”