Capture melody notes via microphone
I’m trying to detect melody notes via mic using fiddle and then convert to midi pitch, but the result is not satisfactory especially from string instruments. I need to do this in real time performance in the field. Any ways to do this? At least 80 to 90% accurately converted? Thanks
What do you mean by ‘not satisfactory’?
I never used fiddle~ nor any other pitch following, sorry if all this does not work in practice
> You are trying to follow the fundamental pitch, not the harmonics (nor the possibly noisy attack), so adding a non-resonant lowpass filter should help reducing the weight of the harmonics in the analysis. Set the cutoff frequency slightly above the fundamental frequency of the highest note you want to follow. Try to experiment with different filter slopes (filter order).
> I have no idea why you are using MIDI inside pitch following. Are you using Max for pitch detection and then send the pitch data to a hardware sound generator via MIDI?
> What does fiddle~ output exactly? A frequency in Hertz? or in another unit? Maybe the complete analysis result? Sorry I cannot find a version to download for Windows and I don’t have my old OSX laptop here.
have a look at sigmund~ which is the big brother of fiddle~. might give you some better results. if not, we need some more details about how you use the object and the circumstances of the performance maybe… you say in the field, does that mean an outside concert or just live concert hall concert…
Actually my work involves Chinese ethnic minority music and the field will be villages where performances take place. They usually play "Erhu", a two-stringed Chinese fiddle. I need to record the melody they play and convert to midi pitch to generate variations in the system. I tried fiddle~ in a small room with a erhu player, but only a few notes can be detected in say 6-7 seconds piece. I don’t expect correct notes duration, but hope to capture as many notes as possible correctly.
To start with, maybe you should first experiment with a WAVE sound file instead of a microphone. Background noise, bad microphone position, bad preamplifier settings, etc can lead to additional errors, so you should add them only when it works perfectly with a sound file.
What happens if you play back something like http://www.youtube.com/watch?v=hsvzzolvwMo&playnext=1&list=PL6A4B31C11ED25ADD or http://www.youtube.com/watch?v=OJwkc2pg1CE into sigmund~ (or fiddle~)?
Use a clean recording for this, not something with lots of background noise nor encoded with too destructive parameters.
Check the fiddle~ / sigmund~ parameters too. For example, if the FFT window is too big and there is only one overlapping analysis, you may miss some fast notes because of averaging on too big a portion of time. A 4096-sample window corresponds to about 93ms at 44100Hz sample rate, which means maximum 10 notes per second if you are using only one overlapping.
With sigmund~, "npts" (window size) and "hop" (overlapping) are 2 important parameters. I would set hop to the same as signal vector size (64, 128 or 256 usually) for best time performance, and npts to 2048 or 4096 for best resolution. Sorry I cannot try it in practice, and never did it before, I only tell this from a theoretical point of view.
Which audio buffer size and signal vector sizes are you using (DSP Status window)? If it works with 64 and 64, it will provide you with 1.5ms time resolution at 44100Hz.
Again, what is the purpose of MIDI in this system? Sorry I cannot get it at all :)
For me MIDI is not good for pitch following, especially in traditional music when it uses non-western scales (as it usually happens in Asia, Africa or Indonesia) or gliding/portamento.