Audioreactive visuals that react differently to preset notes

Hi everyone,

I’m a design student and also new to TD. For an assignment, I’m trying to create an audio-reactive visual performance that works in real time. The audio input would be a microphone that’s used to pick up the sound of me playing on a handpan (a musical instrument with 9 notes).
I’ve already got my head around basic audio-reactive set ups where the visuals react to the low frequencies, for example.

My question is: how would I get TD to recognise each note/frequency as I play it? (and get the visuals to react differently to each note). The difficulty for me is that the frequencies of each note are so close to each other, so it’s not as simple as eliminating the mids and highs.

I haven’t made up my mind on what type of visual aesthetic I want but I want it to look organic and fluid. I don’t know how relevant that is to this post though.

Hello,
Recognizing a note precisely ist quite difficult (I would say impossible?) in TD. In Max/Msp, you have some tools to do that but even there it is easier with very precise note, as played with piano, violin or flute. With a percussive instrument, it is very difficult because you have so much harmonics, making not easy to recognise the tune. One way to do it would be to use contact microphone on each note region of the instrument, so you would have an very precise information about the gesture, without the difficulty to analyse the sound.

A quick but kind of dirty way would be to use the audio filter chop for each pitch that you need to detect. Set the audio filter to bandpass mode, the cutoff units to frequency, figure out the frequency you need, and probably crank the roll-off dB to 24. If you need to chain multiple audio filters to get a sharper roll-off, do it. Increasing the resonance parameter can help too. Then use the loudness detection techniques you’re already using.

For visualization, triggering the Event CHOP from Python can be useful. The createEvent function has an argument for samples, and you can pass the pitch that was played.