pnlong / PDMX

PDMX: A Large-Scale Public Domain MusicXML Dataset for Symbolic Music Processing
https://pnlong.github.io/PDMX.demo/
MIT License
35 stars 2 forks source link

Issue with Converting PDMX JSON to MusicXML #2

Open KdaiP opened 1 week ago

KdaiP commented 1 week ago

Hi, thanks for your awesome work! I encountered an issue while trying to convert PDMX JSON files to MusicXML. The conversion doesn’t seem to work as expected.

I use the code below to convert:

for idx, json_file in enumerate(json_files):
    music = pdmx.load(json_file)
    music.write_midi(f'pdmx_test_{idx}.midi')
    music.write_musicxml(f'pdmx_test_{idx}.musicxml')

    score = music.to_music21()
    score.write('musicxml', f'pdmx_test_{idx}_21.musicxml')

And we get the result: Convert to midi: image image

Convert to music21/musicxml(muspy use music21 as backend to save musicxml file, so it get the same result): image image

It seems that there are some problem on converting to musicxml. I’ve also attached some example files for reference. Could you give some guidance on how to resolve this issue? Thank you for your help!

debug.zip

pnlong commented 1 week ago

The functionality that writes to MusicXML is not perfect (I spent most of my time focusing on writing to MIDI and WAV formats). I am currently working on improving this part of MusicRender -- it should be ready in about a week.