📖 Table of Contents
This project is a web-based sound board application1 that allows users to play various sound effects by clicking on buttons. The project utilizes the p5.js library2 for rendering the canvas and handling sound playback.
To run this project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/Laura-LeeHollande/interactive-soundboard.git
-
Navigate to the project directory:
cd sound-board
-
Open
index.html
in your preferred web browser.
Once the project is set up and running, you will see a web page with several buttons. Each button corresponds to a different sound effect. Click on any button to play the associated sound.
The project consists of the following key files:
index.html
: The main HTML file that sets up the structure of the web page.sketch.js
: The main JavaScript file that contains the p5.js setup and draw functions, as well as the logic for loading and playing sounds.p5.min.js
,p5.sound.js
,p5.sound.min.js
: The p5.js library and its sound extension.
The index.html
file sets up the basic structure of the web page, including linking to the necessary CSS and JavaScript files.
The sketch.js
file contains the core logic for the sound board. Here's a brief overview of its structure:
- Setup Function: Initializes the canvas and loads the sound files.
- Draw Function: Continuously updates the canvas (though in this project, it might not be used extensively).
- Sound Loading: Uses the
loadSound
function from the p5.js library to load sound files. - Button Creation: Dynamically creates buttons for each sound effect and assigns a click event to play the corresponding sound.
The project includes a styles.css
file to handle the visual styling of the web page. Key elements styled include:
- Buttons: Styled to be visually appealing and easy to click.
- Canvas: Ensures the canvas is properly sized and positioned.
If you would like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.
Thank you.
- p5.js - The library used for rendering and sound playback.
- Favicon.io - For providing icons used in the project.
- Mixkit - For providing sound effects used in the project.
- Codedex - For providing the project idea and structure.