Mic Audio Graphic Equalizer
I've started recording blog posts to turn them into mp3s. I want to post them to YouTube too, but I'm not interested in having to make myself presentable every time I want to record. I made this graphic equalizer display so I don't have to. It takes the audio input from a mic and turns it into pretty looking bars.
Click "Start" to request access to the mic and start showing the output full screen. (You can also set title and subtitle text which show when the display is in full screen mode)
JavaScript
let mic
let fft
let totalBands = 32
let widthOfBands
let baseWidth = 200
Details
- I'm using p5.js creative coding javascript library for the heavy lifting. I played around with the WebAudio API directly before and it's way nicer to just have p5 take care of everything
-
Most of the code is straight from the Coding Train and Frequency Spectrum Examples below. The main thing I did was
make it full screen with this technique - I also added the title and subtitle text so I can show the name of the post I'm recording and the link to it. It's not sophisticated and would break on longer lines. I'll probably address that when I run into it
-
I'm using a few functions (`getValue
and `getInt
) from myYAGNI JS collection . If you don't recognize them, that's why.
-- end of line --