I'm starting a project where I want to take incoming audio (music) and move a servo based off the note detection. I.E. Whenever a B note is detecting in the incoming audio (digital), move servo B 90 degrees and back to 0.
What is the simplest way to accomplish this? I have Arduino's and Pi's, but am a complete audio noob. The research I've done just leaves me more confused...
Would appreciate any feedback/advice
What you want to do is not simple, and Arduinos like the Uno are not capable of handing complex audio.
The Arduino-compatible Teensy is fast enough to analyze audio signals and has a reasonable audio library, so I suggest to start there, and first learn how to perform note detection.
I know a bit about audio but I haven't done this...
It's tricky and it seems that most people making guitar with the Arduino tuners fail.
As you may know, musical instruments have harmonics & overtones so there is isn't a single frequency. And cords & multiple instruments make things more complicated.
Audacity has a way of viewing the audio spectrum (from a file so you might have to record first, which Audacity can do). That will allow you to see the fundamental note along with harmonics & overtones and everything else so you can get an idea of what you're dealing with.
Typically, you get the frequency components of an audio signal using FFT and there is an FFT library for the Arduino. (Technically with digital it's DFT.). There is something similar called HFT which I believe is computationally simpler. I think there is also an HFT library.
There is also something called autocorrelation which I don't know much about but the rumor is that this is the best way to detect notes...
Or... If you happen to be using MIDI, MIDI "knows" the note(s) being played. Or, if the whole thing is "programmed" and you know exactly when each note is played, it's easier to program the motor movements with timing rather than reacting to the music.
The Raspberry Pi might be better... It's got a "soundcard". Or maybe both with the Arduino running the servo.
Can the whole rig be hooked up to your PC? If so, you might find your answers using Processing on your computer, connected to an Arduino to just wait for chars coming in the Serial buffer that correspond to your desired servo movements. Don't forget to power your servos externally (tons of people do so thought I'd remind you).
Arduino was inspired by Processing, you should find it quite familiar to work with if you've used Arduino before.
In the Sound library for Processing 4, there is an example sketch called "Sampler" you can try out to see if that maybe is the sort of thing you're after. https://processing.org/reference/libraries/sound/index.html
Fun fact: Arduino named its programs "sketches" as a kind of nod to Processing. Processing is like an artist's sketchbook for your computer, free and open source, also designed with the goal of helping creators from various backgrounds and experience, to get imaginative projects up-and-running relatively quickly.