This is a simple audio visualizer project using the p5.js library. It generates a dynamic visual pattern based on the amplitude of an audio file. The visual pattern can be controlled using the keyboard.
In this project, we create a canvas that displays particles that move and change their pattern based on the loudness of the audio. You can use the 'play' button to start or stop the audio, and press the '2' key to toggle between different visual patterns.
To run this project, follow these steps:
-
Create a 'data' folder and place your audio file ('Damscray_DancingTiger.mp3') inside it.
-
Create an HTML file and include the p5.js library
-
Create a 'sketch.js' file and copy the provided code into it.
-
Set up a local web server or use an online code editor to view the visualization. You can use tools like Visual Studio Code with the Live Server extension or p5.js Web Editor.
Open your web server and access the HTML file you created.
Press the 'play' button to start or stop the audio.
The visual pattern is created by particles that move and change based on the audio's loudness.
Press the '2' key to toggle between different visual patterns.
You can customize this project by changing the audio file or adjusting various parameters in the code, such as the number of particles, loudness threshold, or particle appearance.
This project is built with the p5.js library.
The audio file ('Damscray_DancingTiger.mp3') is used for visualization.