Live Audio to MIDI pitch and chord recognition

T Lee D's icon
Max Patch
Copy patch and select New From Clipboard in Max.

My patch uses the pitch~ object to read live audio input and output it to MIDI to be read by the quickthresh object to read chords. The problem is that the whole process is very finicky and doesn't output consistent pitches or chords. It is not precise either, giving the same MIDI numbers for three successive notes on my real keyboard. I've tried at this problem with artificial tango and analyzer and bark and all of that too, but the original problem can be seen in this patch. I need to use real instruments, and not just MIDI ones. If anyone has any ideas on the precision issue it'd be a great help.

Tj Shredder's icon

It is not as easy as you might think! If you simply play with the help file of pitch~ and try to make it recognize chords with two phasors, you'll see, that it mostly misses the correct interpretation of the simple sounds...
There is an external from Arshia Cont, which might be able to do it with piano sounds, but only because the spectrum of a piano is known to the external...
The only commercial software which is able to do that, but not in realtime is Melodyne, it recently was published, with two years delay after its announcement... (It can do much more than just analyzing of course...)

Never underestimate the skills of your ear...

If you get it going, let us know...;-)

Stefan

Anthony Palomba's icon

Actually, polyphonic sounds is not the issue here. The problem is that
pitch~ does not seem to even detect monophonic sound sources in a reliable way.

Gregory Taylor's icon

Have you had any success with filtering your input to reduce the possibility of false detections based on stuff above the fundamental of highest pitch you expect to find? While I personally favor other pitch-detection solutions, a little lowpass filtering on the front end has often improved matters considerably there - perhaps it would help here, also.

Beep's icon

I've just started using an object called sigmund~ to perform pitch tracking, maybe this might perform better for you if your not happy with pitch~?

Music_SDP's icon

It seems that fiddle~ and sigmund~ are the way to go for pitch detection. Just out of curiosity, are you using Max 5? I have been trying to get artificial tango up and running on 5 and it seems impossible

T Lee D's icon

Thanks everybody for responding! I have tried some filtering but the difference is not substantial enough. Even when I was using Soundflower and an internet "tuning fork" the MIDI output still couldn't land a perfect note every time.

Skryabin:

I am using Max 5, I have Artificial Tango working only because I have the entire FTM Library version 2.3.5 installed. It won't work with the new FTM library which is annoying because the new version has some interesting objects, but Artificial Tango has some fun ones too. I've wondered if the reason Artificial Tango hasn't been updated since then is because there is a better object or library out there.

Has anyone used quickthresh much? I had never heard of it before I found it accidentally, but it is a regular Max object and looks pretty interesting. I will go mess around some more and post more if something happens. :)