As my first project with a microcontroller I'm having a go at https://learn.adafruit.com/grand-centra ... n/overview
I've built a prototype board and successfully got the Grand Central working and running code. I'm using CircuitPython 6.1.0 and the matching library bundle downloaded today. However I'm having problems with the example code for this project. To get it to start running I had to add
Code: Select all
import usb_midi
Code: Select all
midi = adafruit_midi.MIDI(midi_out=usb_midi.ports[1], out_channel=5)
This now runs to almost the end of the code but I get an error (I'm using Mu) reported as "Traceback (most recent call last): File "code.py", line 85, in <module> AttributeError: 'MIDI' object has no attribute 'control_change'" In my version (with the edits above) lines 84 and 85 are 82 and 83 in the example code:
Code: Select all
for n in range(knob_count):
midi.control_change(n, cc_value[n][0] + cc_range[n][0])
Code: Select all
for n in range(knob_count):
print(n)
# midi.control_change(n, cc_value[n][0] + cc_range[n][0])
Can anyone reproduce this error or suggest a solution?
Cheers
EDIT BTW the Simple Test code at https://circuitpython.readthedocs.io/pr ... amples.html works OK for me after adding in_channel=0 to line 14 - it plays the note in VCV Rack.
Code: Select all
midi = adafruit_midi.MIDI(midi_out=usb_midi.ports[1], in_channel=0, out_channel=0)