tl;dr: You hum into the kazoo, and a perfectly pitched note (quantized to a scale of your choosing) comes out in just-about-real-time!
- An ESP-32-S3 runs an implementation of the "Yin" Fundamental Frequency Estimation Algorithm.
- Audio input comes from an I2S microphone, which is sealed so that it can be placed directly in your mouth while playing (to isolate/eliminate feedback).
- Processed audio (secretly just a synthesized sawtooth wave) gets piped out via I2S to a MAX98357 DAC/amplifier, and then through a small speaker hidden in the kazoo's port.
- The pitch detection / synthesis can be used independently, meaning you can use this as either a Bluetooth MIDI controller OR MIDI controlled synthesizer.