Natooz / MidiTok

MIDI / symbolic music tokenizers for Deep Learning models 🎶
https://miditok.readthedocs.io/
MIT License
665 stars 81 forks source link

Docs and code bug #135

Closed oiabtt closed 8 months ago

oiabtt commented 8 months ago

in docs(https://miditok.readthedocs.io/en/latest/examples.html), you pass list

midi_paths = list(Path("path", "to", "dataset").glob("**/*.mid"))
augment_midi_dataset(
    midi_paths,

but in code, it's different https://github.com/Natooz/MidiTok/blob/e6bdebda9d75b4aa5484d46be2000460b1f6672c/miditok/data_augmentation/data_augmentation.py#L17 https://github.com/Natooz/MidiTok/blob/e6bdebda9d75b4aa5484d46be2000460b1f6672c/miditok/data_augmentation/data_augmentation.py#L38

data_path: Path | str,

and ".midi" is ignored

https://github.com/Natooz/MidiTok/blob/e6bdebda9d75b4aa5484d46be2000460b1f6672c/miditok/data_augmentation/data_augmentation.py#L76

Natooz commented 8 months ago

Hi, thank you for the catch! Indeed this should be fixed! For the file extensions we can use miditok.constants.MIDI_FILES_EXTENSIONS Do you want to make the code contribution or should I do it?

oiabtt commented 8 months ago

Hi, thank you for the catch! Indeed this should be fixed! For the file extensions we can use miditok.constants.MIDI_FILES_EXTENSIONS Do you want to make the code contribution or should I do it?

you could do it