1
0
Fork 0
This repository has been archived on 2019-12-23. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
arduinisten/projekte/soundz/midifnord/midi/example_print_file.py
2010-03-31 21:20:08 +02:00

19 lines
511 B
Python

"""
This is an example that uses the MidiToText eventhandler. When an
event is triggered on it, it prints the event to the console.
It gets the events from the MidiInFile.
So it prints all the events from the infile to the console. great for
debugging :-s
"""
# get data
test_file = 'test/midifiles/minimal-cubase-type0.mid'
# do parsing
from MidiInFile import MidiInFile
from MidiToText import MidiToText # the event handler
midiIn = MidiInFile(MidiToText(), test_file)
midiIn.read()