60FPS Music Visualizer (esp32-oled-spectrum) [2021 Update]
ฝัง
- เผยแพร่เมื่อ 6 ก.ย. 2024
- Tested with Blinding Lights by The Weeknd. 60 8k FFTs per second into a Constant Q library to make a smooth music spectrum visualizer, all just on an ESP32! I happened upon this project again, and I ended up making a huge improvement on it.
Details and code on GitHub: github.com/col...
I used a MAX9814 as an audio input and tested with a tone generator all seems to work fine. Thanks for this awesome work!
Thats awesome❤ i might have to look into that.
Maximum and minimum frequency range?
As of right now, it's 40Hz to 14kHz. I intend to update this project again some day, and it may change then.
holy! this is sm00000thhhh 👍
How can i stem out what im seeing on the screen.
Or how can i draw it out to make it a preset for an eq settings
can you pls make a video or provide code which takes input from microphone connected to esp
Hi! Unfortunately, this project is only designed to run from a wire. Music visualizers with a microphone really need a circuit called "automatic gain control" to look correct, and this project just doesn't have it.
hi coukd be run in ESP 8266 ?? Code is the sane ?
Compilation error: macro "swap" requires 2 arguments, but only 1 given ,into buffer.h
I'm not sure what's doing that to your compile, since I can still get it to work. However, my best guess would be that "swap" got defined in a really old version of Adafruit's libraries. Could you make sure that Adafruit_GFX, Adafruit_BusIO, and Adafruit_SSD1306 are updated to their latest versions in your library manager and that the ESP32 is at v2.0.9 in your boards manager?
can the video be output via hdmi to a tv?
Unfortunately not, this project is designed to just output to an OLED display via I2C or SPI.
How do you capture it tho
Now that i see it i want to save it
If its accurate
Muito maneiro
Hi, what pins on the esp32 are you connecting the oled to?
It's just the usual pins for I2C on the ESP32.
@@colonelwatch9220 Thanks, I thought It was but it wasn't working, I figured it out in the end. It turned out that I needed to downgrade my esp32 library to 1.0.4 as 1.0.5 and 1.0.6 weren't working and kept making the esp32 repeatedly restart itself, I tried all suggestions about changing flash frequency and upload speed ect. but in the end had to settle with 1.0.4 and is working fine.
Love the speed of this thing, very nice project. Thank you for sharing, would still love to know why my esp32 doesn't like those newer library's.
hi thanks for the share!!!
Through which pin is the audio going in?
That would be pin 36
@@colonelwatch9220 I have implemented your design and it is working good if I directly connect to speaker output.
But I can’t do that so I’m using a opamp circuit for line in with gain of 4.3, still I can’t get any spectrum activity when the volume is low. Only after 50% volume the spectrum shows..
it seems like the low dB if cut off.
I have changed the min_dB to negative value too still no big difference.
Is there any other value that can make low volume signal also to show in spectrum?
@@merwynvincent Unfortunately, this project can't be very sensitive or else the output gets noisy. So if you're dropping the volume before the line out, I can see how that won't work.
I don't know how much help I can be then, but I see couple ways this can be dealt with: (1) tweak the gain of the op-amp circuit as needed with a potentiometer or (2) set the volume to 100%, plug a Y splitter into the line out, then control the volume another way.
@@colonelwatch9220 ok I get it.
But noise won’t be a problem in my set. I’m shielding everything. And using icepower modules. So noise won’t be a problem.
If I want to increase the sensitivity is there any other value that I can tweak in the code?
Thanks for the reply!!
@@merwynvincent Well, in that case I suppose you can try setting fft_mag_cutoff lower. I hope that helps
Im getting a " I2S_COMM_FORMAT_STAND_I2S" was not declared in this scope error when i try to upload the code
At first i didnt have the driver/i2s library so i ended up installing the latest i2s library from espressif and then the driver/i2s.h not found error went away. But got this instead. I tried changing the
I2S_COMM_FORMAT_STAND_I2S to I2S_COMM_FORMAT_I2S_MSB and then it just says compiling error for esp32.
Edit : update your esp32 boards package to the latest, as when I'm writing its version 2.0.11 ( by esspressif systems )
Not sure how you arrived at that bug, but the I2S API has changed a lot from version to version. In fact, I know the one I originally used, "driver/i2s.h", was broken on some versions.
You could try the latest version, which is v2.0.14 as of writing. It still has it the "driver/i2s.h" library, though they're publicly using the I2S standard library that Arduino published, which is the "i2s.h" library. Tried it, and I can confirm that it still compiles and works on the latest version.
@colonelwatch9220 hello thanks for the reply , so basically what I should do is to exclude the driver/is2.h and include the arduino i2s.h library instead? Because I did install the latest driver/i2s.h library which gave me the error.
@@colonelwatch9220lemme look up my esp32 package , maybe it's outdated. I will check and let you know. I will leave these comments so someone else having the same issue can troubleshoot by reading these
@@orange_tweleve Not that, you still need to use the "driver/i2s.h" library. It should have been preinstalled actually, so you might need to uninstall that library.
@colonelwatch9220 hello again , good news it complied : ) . All I had to do was update the esp32 boards to the latest one which like you said included the libraries required . Thank you so much again !