Skip to content

Commit

Permalink
Merge pull request #9 from kevinjwalters/master
Browse files Browse the repository at this point in the history
Implementation of a parser for MIDI events (messages) and alternative send interface
  • Loading branch information
tannewt authored Apr 9, 2019
2 parents 8d10fda + d507b42 commit 5a7dc9d
Show file tree
Hide file tree
Showing 26 changed files with 2,449 additions and 158 deletions.
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# See https://github.com/adafruit/circuitpython-build-tools for detailed setup
# instructions.

# CUSTOMISED to run tests
#
dist: xenial
language: python
python:
Expand Down Expand Up @@ -42,7 +44,9 @@ install:
- pip install --force-reinstall pylint==1.9.2

script:
- pylint adafruit_midi.py
- ([[ -d "tests" ]] && py.test)
- pylint adafruit_midi/*.py
- ([[ -d "tests" ]] && pylint --disable=missing-docstring,invalid-name,bad-whitespace,trailing-whitespace,line-too-long,wrong-import-position,unused-import tests/*.py)
- ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace examples/*.py)
- circuitpython-build-bundles --filename_prefix adafruit-circuitpython-midi --library_location .
- cd docs && sphinx-build -E -W -b html . _build/html && cd ..
16 changes: 8 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,21 @@ Usage Example
import time
import random
import usb_midi
import adafruit_midi
midi = adafruit_midi.MIDI(out_channel=0)
midi = adafruit_midi.MIDI(midi_out=usb_midi.ports[1], out_channel=0)
print("Midi test")
print("Default output channel:", midi.out_channel)
print("Listening on input channel:", midi.in_channel)
print("Default output MIDI channel:", midi.out_channel + 1)
while True:
midi.note_on(44, 120)
midi.note_off(44, 120)
midi.control_change(3, 44)
midi.pitch_bend(random.randint(0,16383))
time.sleep(1)
midi.note_on(44, 120)
midi.note_off(44, 120)
midi.control_change(3, 44)
midi.pitch_bend(random.randint(0,16383))
time.sleep(1)
Contributing
Expand Down
143 changes: 0 additions & 143 deletions adafruit_midi.py

This file was deleted.

Loading

0 comments on commit 5a7dc9d

Please sign in to comment.