Best WordPress Hosting
 

A Guide To Audio Visualization With JavaScript And GSAP (Part 1)

via smashingmagazine.com => original post link

A while back I got approached by friend Kent C. Dodds to help out with his site rebuild. Besides adding a little whimsy here and there, there was one part, in particular, Kent wanted a hand with. And that was audio visualization. One feature of Kent’s site is being able to “record a call” and then he’d respond via a podcast episode.

So today, we’re going to look at how you can visualize audio input with JavaScript. Although the output demos are in React, we aren’t going to dwell on the React side of things too much. The underlying techniques work with or without React. It’s the case that I needed to create this in React as Kent’s site uses Remix. We’ll focus on how you capture audio from a user and what you can do with that data.

Note: To see the demos in action, you’ll need to open and test directly them on the CodePen website. Enjoy!