Open GoogleCodeExporter opened 9 years ago
Original comment by Rhijnauwen@gmail.com
on 19 Jan 2009 at 5:17
The value module needs to be used as well.
Original comment by Rhijnauwen@gmail.com
on 24 Feb 2009 at 3:19
I looked at the mingus MIDI loading support and realized it had absolutely zero
support for running status, which is where midi events are chained together. A
sequencer I'm using uses these for controller change events. I added some
support and
have uploaded a new MidiFileIn.py.
It's not pretty but it works. I haven't been able to find exact documentation,
but I
think controller change events that are specified in running status don't have
time
deltas.
Original comment by iamm...@gmail.com
on 8 Jan 2010 at 3:11
Attachments:
Original comment by Rhijnauwen@gmail.com
on 18 May 2011 at 7:30
Any plans on committing running status support?
Original comment by gokcen.eraslan@gmail.com
on 6 Feb 2012 at 8:39
Loading other MIDI files doesn't work for
a variety of reasons. Just bumping this Issue to
get some attention. Tried to load some MIDI files
from: http://www.schristiancollins.com/generaluser.php
Original comment by prolo...@shortcircuit.net.au
on 1 Oct 2012 at 11:08
I too ran into the running status problem. I wish I had come here first, but
alas, I coded up my own "fix" based on Will Ware's midi.py
(http://groups.google.com/groups?hl=en&selm=3C0F67FE.96E7CAE8%40alum.mit.edu)...
see the runningStatus parts.
It is a little smaller than the one posted in comment 3 above. It addresses
the following block in a way that prevents the block from being hit.
" # I don't know what these events are supposed to do, but I keep finding them.
# The parser ignores them.
if event_type < 8:
raise FormatError, "Unknown event type %d. Byte %d." % (event_type, self.bytes_read)
"
While trying to figure out midi in python I ran across this link
(http://www.daniweb.com/software-development/python/code/216979/embed-and-play-m
idi-music-in-your-code-python) which contains a midi file (FishPolka.mid) that
mingus can not parse (also attached).
The error is below...
m, bpm = mf.MIDI_to_Composition("FishPolka.mid")
File "/usr/local/lib/python2.7/dist-packages/mingus/midi/MidiFileIn.py", line 64, in MIDI_to_Composition
header, track_data = self.parse_midi_file(file)
File "/usr/local/lib/python2.7/dist-packages/mingus/midi/MidiFileIn.py", line 367, in parse_midi_file
events = self.parse_track(f)
File "/usr/local/lib/python2.7/dist-packages/mingus/midi/MidiFileIn.py", line 257, in parse_track
event, chunk_delta = self.parse_midi_event(fp)
File "/usr/local/lib/python2.7/dist-packages/mingus/midi/MidiFileIn.py", line 285, in parse_midi_event
raise FormatError, "Unknown event type %d. Byte %d." % (event_type, self.bytes_read)
mingus.midi.MidiFileIn.FormatError: Unknown event type 4. Byte 123.
Original comment by shao...@gmail.com
on 9 Oct 2012 at 5:19
Attachments:
There was an indent problem with a last minute edit in the version attached
above. Sorry!
Original comment by shao...@gmail.com
on 9 Oct 2012 at 5:56
Attachments:
Original issue reported on code.google.com by
Rhijnauwen@gmail.com
on 29 Dec 2008 at 1:01