salu133445 / muspy

A toolkit for symbolic music generation
https://salu133445.github.io/muspy/
MIT License
435 stars 51 forks source link

trying to save as ABC fails #61

Closed kaosbeat closed 3 years ago

kaosbeat commented 3 years ago

Hi,

Trying to save a valid muspy Music object to abc notation fails. I get

import muspy
muspyseq = muspy.read_midi("tmp.mid")
print(muspyseq)

Music(metadata=Metadata(schema_version='0.0', source_filename='tmp.mid', source_format='midi'), resolution=220, tempos=[Tempo(time=0, qpm=120.0)], time_signatures=[TimeSignature(time=0, numerator=4, denominator=4)], tracks=[Track(program=0, is_drum=False, notes=[Note(time=1126, pitch=61, duration=2200, velocity=41), Note(time=1144, pitch=37, duration=673, velocity=13), Note(time=1144, pitch=49, duration=673, velocity=25), ...])])

when I call muspy.write_abc("tmp.abc", muspyseq)

the contents of 'tmp.abc' is <music21.stream.Score 0x7fed953c8990>

salu133445 commented 3 years ago

Hi, could you upload the MIDI file here? Thanks!

kaosbeat commented 3 years ago

I had to zip it, cause github does not support .mid uploading bott2.mid.zip

salu133445 commented 3 years ago

It seems that music21 does not actually support ABC output. As MusPy has no native ABC support, it cannot write to ABC files for now. Sorry for the incorrect information.

salu133445 commented 3 years ago

I am closing this issue for now. There is no plan to build native supports for ABC format in the near future. (Related issue: #28)