Skip to content

This is a browser based music app that recreates the classic Roland TR-909 drum machine and TB-303 bass synth.

License

Notifications You must be signed in to change notification settings

Justin-Kase/BrowserMusic

Repository files navigation

๐ŸŽต Browser Music

A browser-based music application featuring recreations of the iconic Roland TR-909 Drum Machine and Roland TB-303 Bass Synthesizer. Create classic electronic music sounds directly in your browser with no installation required!

License React Tone.js TypeScript

โœจ Features

๐Ÿฅ TR-909 Drum Machine

  • 11 Drum Sounds: Kick, Snare, Hi-Hats (Open/Closed), Toms (Low/Mid/High), Rimshot, Clap, Crash, and Ride
  • 16-Step Sequencer: Classic step sequencer for programming drum patterns
  • Interactive Drum Pads: Play sounds in real-time by clicking or tapping
  • Synthesized Sounds: Authentic analog-style synthesis using Tone.js
  • Visual Feedback: See which steps are playing in real-time

๐ŸŽธ TB-303 Bass Synthesizer

  • Classic Acid Bass: Signature TB-303 sound with resonant filter
  • Multiple Waveforms: Sawtooth, Square, and Triangle oscillators
  • Filter Controls: Cutoff, Resonance, and Envelope Modulation
  • Envelope Shaping: Decay and Accent controls for dynamic expression
  • 16-Step Bass Sequencer: Program complex basslines with note, octave, accent, and slide
  • Interactive Keyboard: Play notes in real-time

๐ŸŽ›๏ธ Common Features

  • BPM Control: Adjustable tempo from 60-200 BPM
  • Master Volume: Independent volume control for each instrument
  • Play/Pause/Stop: Full transport controls
  • Pattern Management: Clear and create new patterns
  • Responsive Design: Works on desktop, tablet, and mobile devices
  • Touch Support: Optimized for touch interactions on mobile

๐Ÿš€ Quick Start

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn

Installation

  1. Clone the repository:
git clone https://github.com/Justin-Kase/BrowserMusic.git
cd BrowserMusic
  1. Install dependencies:
npm install
  1. Start the development server:
npm run dev
  1. Open your browser and navigate to http://localhost:3000

Building for Production

npm run build

The built files will be in the dist directory.

Preview Production Build

npm run preview

๐ŸŽฎ How to Use

TR-909 Drum Machine

  1. Switch to TR-909: Click the "TR-909" button in the header
  2. Play Drum Pads: Click or tap any drum pad to hear the sound
  3. Program Patterns:
    • Click steps in the sequencer grid to activate/deactivate them
    • Steps with beat markers (every 4th step) help with timing
    • Each row represents a different drum sound
  4. Start Sequencer: Click the "Play" button to start the sequence
  5. Adjust Tempo: Use the BPM slider to change the speed
  6. Clear Pattern: Click "Clear Pattern" to start over

TB-303 Bass Synthesizer

  1. Switch to TB-303: Click the "TB-303" button in the header
  2. Play Keyboard: Click the keyboard keys to play notes
  3. Adjust Sound:
    • Waveform: Choose between Saw, Square, or Triangle
    • Cutoff: Control the filter frequency (100-8000 Hz)
    • Resonance: Add filter resonance for that classic acid sound
    • Env Mod: Modulate the filter with the envelope
    • Decay: Control how long notes sustain
    • Accent: Set the accent intensity
  4. Program Patterns:
    • Click any of the 16 steps to select it
    • Choose the note, octave, accent, and slide for each step
    • "Rest" means the step will be silent
    • Accent (A) makes the note louder with more filter
    • Slide (S) glides from the previous note
  5. Start Sequencer: Click "Play" to hear your bassline

๐Ÿ› ๏ธ Technology Stack

  • React 18: Modern UI framework
  • TypeScript: Type-safe development
  • Tone.js: Web Audio framework for sound synthesis
  • Vite: Fast build tool and dev server
  • CSS3: Custom styling with gradients and animations

๐Ÿ“ Project Structure

BrowserMusic/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ audio/              # Audio engine implementations
โ”‚   โ”‚   โ”œโ”€โ”€ TR909Engine.ts  # TR-909 drum synthesis and sequencing
โ”‚   โ”‚   โ””โ”€โ”€ TB303Engine.ts  # TB-303 bass synthesis and sequencing
โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ Header/         # App header with instrument switcher
โ”‚   โ”‚   โ”œโ”€โ”€ TR909/          # TR-909 components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ TR909.tsx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ TR909Controls.tsx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ DrumPads.tsx
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Sequencer.tsx
โ”‚   โ”‚   โ””โ”€โ”€ TB303/          # TB-303 components
โ”‚   โ”‚       โ”œโ”€โ”€ TB303.tsx
โ”‚   โ”‚       โ”œโ”€โ”€ TB303Controls.tsx
โ”‚   โ”‚       โ””โ”€โ”€ TB303Sequencer.tsx
โ”‚   โ”œโ”€โ”€ App.tsx             # Main application component
โ”‚   โ”œโ”€โ”€ main.tsx            # Application entry point
โ”‚   โ””โ”€โ”€ index.css           # Global styles
โ”œโ”€โ”€ index.html
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ tsconfig.json
โ”œโ”€โ”€ vite.config.ts
โ””โ”€โ”€ README.md

๐ŸŽจ Features in Detail

Audio Engine

The application uses Tone.js to create authentic analog-style sounds entirely in the browser:

TR-909 Engine

  • MembraneSynth: Used for kick drum and toms with pitch envelope
  • NoiseSynth: Used for snare and clap with filtered noise
  • MetalSynth: Used for hi-hats, rimshot, crash, and ride with metallic timbres
  • Step Sequencer: 16-step pattern with per-drum-per-step programming

TB-303 Engine

  • MonoSynth: Single-voice synthesizer with filter envelope
  • Lowpass Filter: Resonant filter for classic acid sound
  • Frequency Envelope: Modulates filter cutoff over time
  • Pattern Sequencer: 16-step bass sequencer with note, octave, accent, and slide

Responsive Design

The application is fully responsive and works on:

  • Desktop: Full-featured experience with mouse interactions
  • Tablet: Touch-optimized with larger hit areas
  • Mobile: Optimized layouts with touch support

๐Ÿค Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Development Guidelines

  • Follow TypeScript best practices
  • Maintain the existing code style
  • Add comments for complex logic
  • Test on multiple browsers and devices
  • Ensure mobile responsiveness

๐Ÿ“ Roadmap

Future features planned:

  • Effects Chain: Add reverb, delay, and distortion effects
  • MIDI Support: Connect external MIDI controllers
  • Preset Management: Save and load patterns and settings
  • Pattern Chaining: Link multiple patterns together
  • Audio Export: Record and download your creations
  • More Instruments: Add more classic synthesizers and drum machines
  • Collaborative Mode: Real-time collaboration with other users

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Roland Corporation for the original TR-909 and TB-303 hardware
  • Tone.js for the excellent Web Audio framework
  • The electronic music community for inspiration

๐Ÿ“ง Contact

Justin Case - @Justin-Kase

Project Link: https://github.com/Justin-Kase/BrowserMusic

๐ŸŽต Made with โ™ฅ for Electronic Music

Recreate classic acid house and techno sounds. Happy music making!


Note: This is a recreation for educational and creative purposes. TR-909 and TB-303 are trademarks of Roland Corporation.

About

This is a browser based music app that recreates the classic Roland TR-909 drum machine and TB-303 bass synth.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages