Skip to content

Gamzawe/Drum-machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


🥁 React Drum Machine

A vibrant and interactive drum machine built with React that brings rhythm to your fingertips! This project features a responsive button grid for playing drum sounds, digital controls to manage power and volume, and a display screen to showcase the current sound or setting.


✨ Features

  • Dynamic Drum Pads 🎹
    Play a variety of drum sounds by clicking the on-screen buttons or using your keyboard.

  • Power Toggle 🔌
    Easily turn the drum machine on and off.

  • Volume Control 🔊
    Adjust the volume with an intuitive slider.

  • Digital Display 🖥️
    See real-time updates on the current sound, volume level, or power state.

  • Smooth UI & Animations 🎨
    Enjoy responsive design and engaging animations with each interaction.


🎬 Demo

image


🛠️ Technologies Used

  • React: For building the interactive user interface.
  • JavaScript (ES6): To create dynamic and responsive functionality.
  • CSS: Custom styles in drum_style.css and App.css for an engaging user experience.

🚀 Installation

  1. Clone the Repository:

    git clone https://github.com/your-username/react-drum-machine.git
    cd react-drum-machine
  2. Install Dependencies:

    npm install

    This command installs all required packages for the project.

  3. Start the Development Server:

    npm start

    The application will open in your default browser at http://localhost:3000.


📖 Usage

  • Play Sounds:
    Click on the drum pads or press the corresponding keys (Q, W, E, A, S, D, Z, X, C) to play different drum sounds.

  • Power Toggle:
    Use the power switch to enable or disable the drum machine.

  • Volume Control:
    Adjust the volume using the slider. The current volume or sound name is displayed on the digital screen.

  • Digital Display:
    The screen updates to show the current sound being played, volume level changes, or power status.


📂 File Structure

react-drum-machine/
├── public/
│   └── index.html
├── src/
│   ├── drum/
│   │   ├── button_grid.js     // Drum pad grid component
│   │   ├── controls.js        // Power and volume control component
│   │   ├── digital-screen.js  // Display screen component
│   │   └── drum_style.css     // Drum-specific styles
│   ├── App.js                 // Main App component
│   ├── App.css                // Global styles for the app
│   └── index.js               // Entry point rendering App component
├── .gitignore
├── package.json
└── README.md

🔍 Code Overview

Main Components

  • ButtonGrid:
    Handles the display of drum pads and triggers audio playback when buttons are clicked or keys are pressed.

  • Controls:
    Manages power toggling and volume adjustments. Updates the display screen based on user interactions.

  • Screen:
    Displays the current state, including the active sound name or volume level.

  • App:
    Integrates all components and maintains the overall state for power, volume, and display text.

For detailed implementation, check out the source files in the src/drum/ directory.


🤝 Contributing

Contributions are welcome! Feel free to open issues or submit pull requests for improvements or new features.


📄 License

This project is licensed under the [MIT License].


🙏 Acknowledgements


Happy Drumming 🥁

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors