X-Git-Url: https://scm.cri.minesparis.psl.eu/git/minwii.git/blobdiff_plain/346a9b8e1fcfe30629f0d1ee4675e9e8f89890cf..4c4732c6ed8cb0aaa70fb2d4c6e5a958868c5349:/src/mxmMidi/example_print_channel_0.py diff --git a/src/mxmMidi/example_print_channel_0.py b/src/mxmMidi/example_print_channel_0.py deleted file mode 100644 index 2dbe3e4..0000000 --- a/src/mxmMidi/example_print_channel_0.py +++ /dev/null @@ -1,23 +0,0 @@ -from MidiOutStream import MidiOutStream -from MidiInFile import MidiInFile - -""" -This prints all note on events on midi channel 0 -""" - - -class Transposer(MidiOutStream): - - "Transposes all notes by 1 octave" - - def note_on(self, channel=0, note=0x40, velocity=0x40): - if channel == 0: - print channel, note, velocity, self.rel_time() - - -event_handler = Transposer() - -in_file = 'midiout/minimal_type0.mid' -midi_in = MidiInFile(event_handler, in_file) -midi_in.read() -