python-mingus icon indicating copy to clipboard operation
python-mingus copied to clipboard

can't write Bar to Midi file

Open mutil opened this issue 9 years ago • 1 comments

When I try to export a Bar to a file using MidiFileOut I get this error: AttributeError: 'Note' object has no attribute 'islower'

Writing a Note or NoteContainer works though. Example code:

from mingus.containers import NoteContainer
from mingus.containers import Bar
from mingus.midi import midi_file_out as MidiFileOut

nc = NoteContainer(["A", "B", "E"])
b = Bar()
b.place_notes(nc, 4)
MidiFileOut.write_NoteContainer("test.mid", nc) #works
MidiFileOut.write_Bar("test.mid", b) #doesn't work

mutil avatar Jun 03 '15 14:06 mutil

Thanks for reporting all these issues; it's much appreciated!

I haven't really kept up with the project for a couple of years and it looks like some changes made it in that haven't been tested thoroughly. I'm planning to consolidate the core and containers packages soon so hopefully that will also address issues like these, which are most likely caused by unexpected objects bubbling up (Key instead of Note for example).

bspaans avatar Jun 04 '15 11:06 bspaans