PageRenderTime 403ms CodeModel.GetById 201ms app.highlight 2ms RepoModel.GetById 199ms app.codeStats 0ms

/src/echonest/support/midi/example_print_file.py

http://echo-nest-remix.googlecode.com/
Python | 19 lines | 5 code | 3 blank | 11 comment | 0 complexity | 22900f3e44b05192f246d05b77cca44c MD5 | raw file
 1"""

 2This is an example that uses the MidiToText eventhandler. When an 

 3event is triggered on it, it prints the event to the console.

 4

 5It gets the events from the MidiInFile.

 6

 7So it prints all the events from the infile to the console. great for 

 8debugging :-s

 9"""
10
11
12# get data

13test_file = 'test/midifiles/minimal-cubase-type0.mid'
14
15# do parsing

16from MidiInFile import MidiInFile
17from MidiToText import MidiToText # the event handler

18midiIn = MidiInFile(MidiToText(), test_file)
19midiIn.read()