Skip to content

Commit 146d0fb

Browse files
author
Kevin J Walters
committed
midi_intest1.py refresh, needed messages imported. #3
1 parent 621fded commit 146d0fb

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

examples/midi_intest1.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,23 @@
22
import usb_midi
33
import adafruit_midi
44

5-
### 0 is MIDI channel 1
5+
# A subset of messages/events
6+
# pylint: disable=unused-import
7+
from adafruit_midi.timing_clock import TimingClock
8+
#from adafruit_midi.channel_pressure import ChannelPressure
9+
from adafruit_midi.control_change import ControlChange
10+
from adafruit_midi.note_off import NoteOff
11+
from adafruit_midi.note_on import NoteOn
12+
from adafruit_midi.pitch_bend import PitchBend
13+
14+
15+
# 0 is MIDI channel 1
616
midi = adafruit_midi.MIDI(midi_in=usb_midi.ports[0], in_channel=0)
717

8-
print("Midi test II")
18+
print("Midi input test with pauses")
919

1020
# Convert channel numbers at the presentation layer to the ones musicians use
1121
print("Input channel:", midi.in_channel + 1 )
12-
print("Listening on input channel:", midi.in_channel + 1)
1322

1423
# play with the pause to simulate code doing other stuff
1524
# in the loop

0 commit comments

Comments
 (0)