A Node.js application that creates a musical instrument using Tone.js, responding to MIDI input from a Playtronica Touch Me controller. The instrument features piano and click sounds with reverb, delay, and compression effects.
- Piano Sound: Playable on MIDI channel 1
- Click Sound: Playable on MIDI channel 2
- Effects: Built-in reverb, delay, and compression
- Web Interface: Simple web interface to control audio context
- Node.js (v14 or higher)
- npm (comes with Node.js)
- A MIDI controller (Playtronica Touch Me or any other MIDI device)
- Clone this repository or download the files
- Install dependencies:
npm install
- Connect your MIDI controller to your computer
- Start the application:
node index.js - Open your web browser and go to:
http://localhost:3000 - Click the "Start Audio" button to initialize the audio context (required by modern browsers)
- Play notes on your MIDI controller:
- Channel 1: Piano sound
- Channel 2: Click sound
- Start Audio: Initializes the audio context (required before playing)
- Stop Audio: Stops all audio playback
- The application automatically detects MIDI inputs
- Make sure your Playtronica Touch Me is connected before starting the application
- If using a different MIDI controller, you may need to configure the MIDI channels in the code
index.js: Main application file with server and MIDI handlingpublic/: Directory for static files (currently empty)package.json: Project configuration and dependencies
tone: Web Audio framework for creating interactive musiceasymidi: Simple MIDI I/O for Node.jsexpress: Web server framework
MIT