This is a quick and dirty pitch detection COMP that returns the fundamental frequency in Hz and associated note name for a vocal input. It simply looks for the first spectral peak over the ‘Peak Threshold’. It outputs when the RMS of the input signal is over the ‘Trigger Threshold’. These parameters are of course both dependent on your microphone/audio input.
Needed one for testing and didn’t see anything in the forum. It’s all OPs and commented. Hopefully it’s of use!
Update v.2:
Tested with additional microphones. Made a few minor tweaks to the data output.
Now returns additional note information via out1 CHOP:
freq - frequency in Hz
note - note number within octave
octave - octave number
midi - midi note number
@deseipel it seems to be working with this configuration; as soon as I added an audiodevin it linked it automatically. It looks like the link to the other part was severed. Try starting from the original file again.
Thanks. I’m new and thought I didn’t need the perform op. What I’d like to do is use this as a way to either pitch correct/augment and or send MIDI. It’s a starting point maybe
Glad it’s still useful! I just opened it for the first time in a long time and seems to still be operable.
@deseipel it looks from the latest screenshot that you have it hooked up properly. You may need to adjust your threshold values and check the gain on your input.
I love this very much! I just have a question: Are you using the calculation for equal temperament? When I sing 220Hz, it calculates G#, when 220Hz in equal temperament is actually A, and 110Hz calculates G, when it is actually A.
I was trying to adjust the calculations based equal temperament references, but I am still fairly new to advanced math in TD.
I just did a bit more snooping and it turns out the calculations are working just fine. In the ‘freq_to_note/limit2’ chop, I changed the maximum to 12 (as opposed to 11), and it ended up working as I would expect. Since there are 12 notes, the 13th note would be the start of the next loop (the 12th when index based).
Would anyone reccomend a way of holding notes for longer? Like a quantising threshold that could be used to snap to a certain key? Thanks for any info!