I utilized the p5 DOM sound library for my first DOM assignment. I had not worked with sound before so wanted to work with this feature. Feeling a little nostalgic, I opted to load some ‘ole-school’ dancehall for my listening enjoyment.
In this sketch I utilized the following functions:
- Frequency Spectrum
- CSS styling
The song is preloaded, which takes a while as the track is about 1 hour long. By pressing play, you can start or stop the song. While the song is playing, its frequency is displayed. CSS was used to style the header and play button.