This project uses Tone.js, a powerful framework for creating interactive music in the browser, and p5.js, a JavaScript library that makes coding accessible for artists, designers, educators, and beginners, to create an interactive audio-visual experience.
The project creates drone sounds using Tone.js and visualizes them using p5.js. Drones are continuous musical notes or intervals that are sustained or repeated throughout a piece of music. They are often used in ambient music and sound healing.
The project creates multiple drones at different frequencies using Tone.js. Each drone is an oscillator connected to a gain node, which controls the volume of the drone. The gain of each drone is modulated by a low-frequency oscillator (LFO), creating a dynamic, evolving sound.
The drones are visualized using p5.js. The volume and frequency of the drones affect the visuals, creating a direct link between the sound and the visuals.
- Start the drones by calling the
startDrones
function. This function starts the Tone.js context, sets the master volume, and initializes the drones.
startDrones();
- Modulate the drones by calling the
modulateDrone
function in your draw loop. This function adjusts the volume of the drones based on thex
andthickness
parameters.
modulateDrone(x, thickness);
- Stop the drones by calling the
stopDrones
function. This function fades out the drones smoothly and then stops them.
stopDrones();
This project is licensed under the MIT License.
- Tone.js for providing the framework for creating interactive music in the browser.
- p5.js for making coding accessible for artists, designers, educators, and beginners.
inspiration https://openprocessing.org/sketch/1481222