3 ms·
This is very timely. I've been working for about 3 months now on a utility that transforms mp3's to midi files. It's a hard problem and even though I'm making s
by jacquesm 7y ago
This is very timely. I've been working for about 3 months now on a utility that transforms mp3's to midi files. It's a hard problem and even though I'm making steady progress the end is nowhere in sight. This will give me something to benchmark against with for instance voice accompanied by piano. Thank you for making/posting this.
For an idea how this project is coming along:
https://jacquesmattheij.com/toccata.mp3 https://jacquesmattheij.com/toccata.mp3
Yes, it's terrible :) This particular file the result of the following transformations:
midi file -> wav file (fluidsynth)
wav file -> midi file (my utility)
midi file -> wav file (fluidsynth once more)
wav file -> mp3 file (using lame)
Of course it also works for regular midi files (piano only for now). The reason why I use the workflow above is that it gives me a good idea how well the program works by comparing the original midi file with the output one.
But I did not yet have a way to deal with piano/voice which is a very common combination so this might really help me.
Possible applications: automatic music transcription, tutoring, giving regular pianos a midi 'out' port, using a regular piano as an arranger keyboard, instrument transformation and many others.
Having fun!
Edit: I've done a little write-up: https://jacquesmattheij.com/mp3-to-midi/ https://jacquesmattheij.com/mp3-to-midi/
- IAmGraydon 7y agoJust FYI in case you weren't aware - Ableton Live and several other DAWs have this capability built in. It's far from perfect, but great for humming a melody and then quickly turning it into MIDI.
- jacquesm 7y agoHow good is it (% accuracy) for polyphony? I can upload the toccata original if you want.
- viburnum 7y agoHow do you do this in Ableton?
- smcnally 7y agohttps://www.ableton.com/en/manual/converting-audio-to-midi/ https://www.ableton.com/en/manual/converting-audio-to-midi/ There are four options. > Convert Melody to New MIDI Track > This command identifies the pitches in monophonic audio and places them into a clip on a new MIDI track.
- jacquesm 7y ago> This command identifies the pitches in monophonic audio and places them into a clip on a new MIDI track. Neat. So, the big difference then is that I do fully polyphony but I'm still limited to 'just' piano but that's already hard enough for now.
- viburnum 7y agoThanks so much. I thought I had read through the manual but there's all kinds of stuff I've missed.
- alez 7y agoThere’s a pretty cool library from Googles Magenta team that does piano transcription pretty well. https://magenta.tensorflow.org/onsets-frames https://magenta.tensorflow.org/onsets-frames They say it’s only really good for piano, but I definitely use it for all kinds of samples. Great for inspiration
- jacquesm 7y agoOh cool, thank you for that, I did not know about this yet. That may come in very handy.
- jacquesm 7y agoSo, I used it to run the same toccata test, here are the results: The Magenta code: f_measure 71.56 precision 65.75 recall 78.49 accuracy 55.72 My little batch of code: f_measure 77.74 precision 93.40 recall 66.57 accuracy 63.58 Interpreting the results is tricky, they are obviously better on 'recall' but that is at the expense of being much less precise which gives a much better result for my code; besides it is nicer to listen to because there are far fewer spurious notes. My code also runs about 100 times as fast and uses very little in terms of resources. So, rather than being depressed it looks like I'm on to something :)
- alez 7y agoOh wow that's extremely promising! Yeah the magenta thing destroys my browser when I run it. Still feels like magic though haha. I would be extremely interested in some other options so good luck!
- jacquesm 7y agoThank you! If you have any files you want me to test with then feel free to send them, email is in my profile.