r/learnjavascript • u/[deleted] • Jun 24 '20
I made a highly customizable Audio Visualizer!
5
Jun 24 '20
Loved your project! I'm on my way into learning js. Could you please share how you initialy started this project? Where did you begin?
18
Jun 24 '20
yeah, of course, I'm glad you like it!
It essentially was an iterative proccess. Initially, I wanted to build an audio visualizer but there were so many variables so I simplified the problem - instead of using the microphone i downloaded a song and tried to visualize just that. MDN is your best friend when it comes to web dev and I eventually stumbled upon the WebAudio API. So, I had my building blocks - a song, and WebAudi API, I just had to visualize it.
First i made a simple rectangular canvas and visualized the audio as a series of rectangular audio bars. Once I did that I kept adding features till I reached a point I felt satisfied to stop at.
So, I guess the gist is, establish the core aspects of your project and start there. You can then build off it. Good luck with JS, it's a really fun journey!!
4
4
u/RusskiRoman Jun 25 '20
This is dope! I built something similar a while back but with manipulating the audio midi files to change the visualizer. I love this kinda stuff. Great work!
3
Jun 25 '20
Wow, I just checked it out and that's really well built! I love the animations you've made for your visualization.
Do you have any plans to make updates in the future? Anyway, great job man, starred it on github!
4
u/RusskiRoman Jun 25 '20
Thanks man! Yeah if I get some time, my next goal is to create a MIDI uploader so youโre not limited to Beethoven or Tetris. The mobile experience is garbage, so I wanna build knobs that work on mobile too.
If you havenโt heard of it, check out Pts.js, itโs a library that makes canvas manipulation and animation a breeze. I used it in React which had its challenges, but their vanilla documentation is great.
4
Jun 25 '20
well I checked it out on mobile and the UI looked pretty good, so good job on responsiveness! Yeah, that's a good idea, it'd be great if you could upload your own files to visualize too!
Okay, thanks I'll look into it. I like making canvas visualizations so looks like it will a very useful library!
2
2
2
2
2
u/cnyte Jun 25 '20
Suuper dope dude. Really cool concept and idea. Iโve always loved visualizer and never even thought about the fact you can make one on your own.
Gotta say I fucking love the things I find on Reddit and the people who post cool shit ๐๐ฟ๐๐ฟ
1
Jun 25 '20
Thank you so much, I'm really glad you like it! I was fascinated with audio visualizers as well but couldn't find one for spotify so I thought why not just work on building one instead!
If you end up using it regularly, I'd love to hear your input on features you'd like to see and I'd work on implementing them! Again, thanks!
2
2
u/younlok Jun 25 '20
this is really impressing
i always wanted to know how this sound viz works
can you give a small explanation ??
2
u/ishanfx Jun 25 '20
Really cool
1
Jun 25 '20
thanks!
1
u/Diligent_Scallion_24 Jan 22 '24
The visualizer seems to be inactive; or there are no clear operating instructions.
2
u/drumsXgaming Jun 25 '20
Nice
0
u/nice-scores Jun 25 '20
๐ท๐ฒ๐ฌ๐ฎ โ(๏พใฎ๏พโ)
Nice Leaderboard
1.
u/RepliesNiceat 10096 nices2.
u/Manan175at 7108 nices3.
u/DOCTORDICK8at 7101 nices...
245371.
u/drumsXgamingat 1 niceI AM A BOT | REPLY !IGNORE AND I WILL STOP REPLYING TO YOUR COMMENTS
1
12
u/[deleted] Jun 24 '20 edited Jun 24 '20
Hi guys! I made this audio visualizer using HTML5 canvas and Web Audio API. Please try out the visualizer at least once and let me know what you think: Audio Visualizer.
It uses the device microphone to steam audio to the visualizer. I built it so that when I am chilling with my Spotify, Youtube playlist, I have some cool visuals instead of a boring plain view. So just turn on a song and let the visualizer run!
You can find the source of the project here. Feel free to fork the repo and make pull requests if you want something changed, I would love the feedback and any suggestions on how to improve my code! Thanks guys, I hope you like it!