Audio Unit : from audio to MIDI

Hi,


I'd like to create a kind of MIDI effect which uses audio input : you play a chord on the keaybord, and the MIDI out uses these notes but with the rythm of the audio source.


I tried to add to the AUMIDIPassThru exemple an audio render, but Logic does not detect the audio input (the side chain control does not appear as it does for the vocoder for exemple). I tried to subclass both AUMIDIEffect and AUEffect, but the the compilation is refused. How do you think that I should do?


Thanks for your help!

Going from audio to MIDI is like going from Photoshop to Illustrator or Low Res graphics are to High Res graphics - the latter has more inherent structure and information depth than the former - which is a harder conversion than the reverse in a nondeterministic way. With the right DSP knowledge you might get partly there (but quite possibly NOT in real-time) but even this not easy and generally to be avoided if you can.


If you manage to achieve the DSP (do you have an engineering degree? :-/) then you probably have to write the AU from the MIDI AU base class. Because note scales are exponential (i.e. octave based, just like the human ear), you've probably have to consider something like a Patterson-Holdsworth filter - a regular FFT has linear frequency instead so it is prone to errors all tones/frequencies other than one selected frequency. Perhaps not surprisingly, people at Apple have been doing R&D on this - you'll notice the kind of math required - each note has its own octave so that would be 12 "gammatone" filters:


https://engineering.purdue.edu/~malcolm/apple/tr35/PattersonsEar.pdf


A slower technique only suitable to off-line use is described here (half English/Spanish): http://wave2mid.sourceforge.net/index-en.html

Audio Unit : from audio to MIDI
 
 
Q