Page 1 of 1

Guitar-to-MIDI (or, adventures in pitch tracking with free software)

Posted: Thu Jun 20, 2019 6:50 pm
by Basslint
I've been playing with guitar-to-MIDI conversion for a while. I will share my humble hobbyist research here.

The most reliable and widely available implementation for pitch tracking right now is inside Aubio, which includes a number of algorithms (monophonic only - no chords!). (Rakarrack also does it, for the record.)

Right now aubio can automatically convert guitar signals to MIDI Note On messages via

Code: Select all

aubionotes -j
(it even creates all the needed JACK ports!).

This can be optimized both in terms of latency and precision (a bit of a trade-off, isn't it :lol:) by filtering the input signal and picking the right tracking algorithm.

But notes generated by aubionotes are discrete. The guitar is not a discrete instrument, you can bend notes. So, it would be better to use something different than other than aubionotes.

Thankfully, aubio provides aubiopitch, a proper pitch tracker which outputs the frequency in Hz. The problem I've found with this one is that it doesn't send any data on the MIDI out channel (I connected it to QMidiRoute to verify), when it would be enough to send this frequency as a SysEx message and let some other program do the conversion to a Note On (nearest pitch) + Pitch bend event (MIDI also has a way to do microtonality, which would be a better solution, but many synths don't support it, while pitch bend is pretty much universal. And OSC would make it even easier, but not many synth support it, sadly).

Another useful thing to do would be map the amplitude of guitar signals to MIDI velocities, to have more dynamics.

Someone wants to come in and share their experiences, or give some suggestions as to how to make this straightforward? I've thought about using Pure Data to make a program which does all but the pd-aubio packages sadly segfaults on my system.

Re: Guitar-to-MIDI (or, adventures in pitch tracking with free software)

Posted: Sat Jun 22, 2019 3:48 pm
by joe-b
I've used Rakarrack for guitar-to-MIDI before. I gave it up. The latency seemed really inconsistent, so with the time I spent fixing all the notes, it was just easier to manually input them.

Pitch bend and velocity detection would be great though.

Re: Guitar-to-MIDI (or, adventures in pitch tracking with free software)

Posted: Sun Jun 23, 2019 12:49 am
by Babarosa
The software "waon - a wave-to-notes transcriber" works fine for my needs. Get information at "http://waon.sourceforge.net/" including a demo video. You can download an executable file compiled from the latest code on my website "www.stockinger.org".

Re: Guitar-to-MIDI (or, adventures in pitch tracking with free software)

Posted: Sun Jun 23, 2019 8:41 pm
by joe-b
WaoN is very interesting, thanks for that. Amazingly it has polyphony, pitch bend, and velocity detection. Unfortunately my preliminary tests have shown a lot of problems. In particular there are a lot of artifacts/false notes detected. I'm going to play around and see if I can get better results.

GPL as well. I'm surprised I've never seen it before, or that no one else has developed it further.

Re: Guitar-to-MIDI (or, adventures in pitch tracking with free software)

Posted: Tue Jun 25, 2019 11:12 am
by English Guy
I will be very interested to hear how you get on.

Re: Guitar-to-MIDI (or, adventures in pitch tracking with free software)

Posted: Sat Jun 29, 2019 1:19 am
by joe-b
Well, I've played with different parameters in the program and rolling off some of the higher frequencies on the guitar wav file (which I think are responsible for a lot of the artifacts/false notes). I cannot get decent results, much less the amazing results he gets in that video.

If any one else has any ideas, I'd like to hear them.