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

Programming applications for making music on Linux.

Moderators: khz, MattKingUSA

Basslint
Established Member
Posts: 174
Joined: Sun Jan 27, 2019 2:25 pm
Location: Italy

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

Postby Basslint » Thu Jun 20, 2019 6:50 pm

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.
The community of believers was of one heart and mind, and no one claimed that any of his possessions was his own, but they had everything in common. [Acts 4:32]

joe-b
Established Member
Posts: 10
Joined: Sun Jun 02, 2019 7:25 pm

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

Postby joe-b » Sat Jun 22, 2019 3:48 pm

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.

User avatar
Babarosa
Established Member
Posts: 19
Joined: Sun Feb 23, 2014 10:16 pm

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

Postby Babarosa » Sun Jun 23, 2019 12:49 am

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".

joe-b
Established Member
Posts: 10
Joined: Sun Jun 02, 2019 7:25 pm

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

Postby joe-b » Sun Jun 23, 2019 8:41 pm

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.

User avatar
English Guy
Established Member
Posts: 468
Joined: Wed Oct 17, 2012 7:28 pm
Location: England

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

Postby English Guy » Tue Jun 25, 2019 11:12 am

I will be very interested to hear how you get on.

joe-b
Established Member
Posts: 10
Joined: Sun Jun 02, 2019 7:25 pm

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

Postby joe-b » Sat Jun 29, 2019 1:19 am

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.


Return to “Developer's Section”

Who is online

Users browsing this forum: No registered users and 1 guest