This is a mini MIDI game designed to work with the Novation Launchpad X. The game lights up a pad on the Launchpad, and the user must press the correct pad within a certain time limit. The game continues for a set number of steps and calculates the total time taken by the user.
mini-midi-game/
│
├── index.html
├── css/
│ └── styles.css
├── js/
│ ├── app.js
│ ├── midi.js
│ ├── game.js
│ └── sounds.js
└── assets/
├── sound1.mp3
├── sound2.mp3
├── sound3.mp3
└── sound4.mp3
- Lights up pads on the Launchpad X.
- User must press the correct pad within a certain time limit.
- Plays a sound when a pad is pressed.
- Tracks the user's score and total time taken.
- Includes a reset button to clear the lights and reset the game.
- Can start the game by pressing pad 99 on the Launchpad X or using the start button.
-
Install
http-server
(if not already installed):npm install -g http-server
-
Navigate to your project directory:
cd path/to/your/mini-midi-game
-
Start the HTTP server:
http-server
-
Open the game in your browser:
Open your browser and go to the address
http://localhost:8080
(or another port if specified).
- index.html: The main HTML file that sets up the structure of the game.
- css/styles.css: Contains the styling for the game.
- js/app.js: Initializes the MIDI connection and sets up event listeners for the buttons.
- js/midi.js: Handles the MIDI connection and messages.
- js/game.js: Contains the game logic, including sequence generation, pad lighting, and scoring.
- js/sounds.js: Plays sounds when pads are pressed.
- assets/: Contains the sound files used in the game.
- Colors: You can change the colors of the pads by modifying the
getRandomColor
function ingame.js
. - Sounds: You can add or replace sound files in the
assets
directory and update thesounds.js
file accordingly.
This project is licensed under the MIT License.