iO-808 Documentation
repository·master·Indexed 20 days ago
https://github.com/vincentriemer/io-808iO-808 is a web-based recreation of the TR-808 drum machine (version 2.0.0) that synthesizes sounds using the Web Audio API instead of samples. Built with React and Redux, it features a functional interface for drum machine operations, including tempo and volume control, instrument parameter configuration, and step sequencing. The project utilizes WAAClock for scheduling, seamless-immutable for high-performance state management of over 12,000 steps, and a custom KnobOverlayManager for UI interactions.
What's inside io-808
- iO-808 is a web-based recreation of the TR-808 drum machine. It uses the Web Audio API to synthesize drum sounds (rather than using samples) and provides a functional interface for drum machine operations. The project is built using a modern React/Redux stack to manage complex state and high-performance UI updates.
Tools and Libraries used in iO-808
masteriO-808 relies on several key libraries to handle audio synthesis, state management, and UI styling:
- Web Audio API: Used for all sound synthesis. The library
WAAClockis used specifically for scheduling drum hits. - React: Powers the user interface.
- Redux: Manages application state, using
redux-localstoragefor state persistence andreact-reduxto connect components to the store. - seamless-immutable: Used as the primary data structure for the Redux store to ensure high performance when mutating a large state (which includes over 12,000 steps).
- reselect: Used for efficient computation of values derived from the Redux store to optimize UI performance.
- radium: Handles styling for React components via inline styles, providing support for pseudo-selectors like
:hoverand automatic vendor prefixing.
- Web Audio API: Used for all sound synthesis. The library
Clear patterns
masterTo wipe the contents of a pattern:
- Set the mode knob to
PATTERN CLEAR. - Select the pattern to clear using the step buttons.
- Check the BASIC VARIATION switch to ensure you are clearing the correct variation (A or B).
- Press the
CLEARbutton.
Note: This clears the drum hits/triggers for both the
1st PARTand2nd PART, but it does not reset the pattern lengths.- Set the mode knob to
Program drum patterns in 1st PART mode
masterTo program the first 16 steps of a pattern:
- Set the mode knob to
1st PART. - Ensure the basic variation switch is in the
Aposition. - Select a pattern by clicking one of the step buttons (the blinking light indicates the currently selected pattern).
- Set the INSTRUMENT-SELECT knob to the desired drum (e.g.,
BDfor Bass Drum). - Click step buttons to add or remove drum hits. Illuminated buttons represent active triggers.
Note on the Accent Instrument: Selecting the
Accentinstrument does not produce sound. Instead, it sequences volume changes. TheLEVELknob for theAccentinstrument determines the volume difference between active and inactive steps; increasing it makes inactive steps quieter, adding swing/feel.- Set the mode knob to
Set pattern lengths for 1st and 2nd parts
masterPattern lengths determine how many steps are played in a part.
To set the length:
- Select the desired part via the mode knob (
1st PARTor2nd PART). - Select the pattern using the step buttons.
- Drag the
CLEARbutton (located below the mode knob) to the specific step button representing the desired length.
Behavioral Rules:
- Setting the length of the
1st PARTautomatically sets the2nd PARTlength to 0. - Setting the length of the
2nd PARTdoes not affect the1st PARTlength.
- Select the desired part via the mode knob (
Program drum patterns in 2nd PART mode
masterEach pattern can have a second 16-step part (for a total of 32 steps). To edit it:
- Set the mode knob to
2nd PART. - Select the desired pattern using the step buttons.
- Note that while editing, the sequencer will play the
1st PARTfollowed by the2nd PARTin a loop.
Important: By default, the
2nd PARThas a pattern length of 0. You must set a length (see Setting Pattern Lengths) before you can hear or program it effectively.- Set the mode knob to
Play patterns in MANUAL PLAY mode
masterTo turn programmed patterns into a song:
- Set the mode knob to
MANUAL PLAY. - Select Patterns:
- Click one of the first 12 step buttons to select a
BASIC RHYTHM. - Click one of the last 4 step buttons to select an
INTRO/FILL IN.
- Click one of the first 12 step buttons to select a
- Starting the Sequence:
- The blinking step buttons indicate which pattern will start when
START/STOPis pressed. - Press the
TAPbutton to toggle the starting pattern between the selectedBASIC RHYTHMand theINTRO/FILL IN.
- The blinking step buttons indicate which pattern will start when
- Scheduling and Triggering:
- While playing, clicking a
BASIC RHYTHMbutton schedules it to play once the current pattern finishes. - Clicking an
INTRO/FILL INbutton selects which fill will be used when triggered. - Press the
TAPbutton to trigger the selectedINTRO/FILL INafter the current pattern finishes.
- While playing, clicking a
- Set the mode knob to
Save and Load pattern collections
masterYou can export and import your work using
.jsonfiles.- Saving: Click the save button (second button on the top left). This downloads your pattern collection to your computer. Progress is automatically saved locally in the browser, so you can resume work later without manual saving.
- Loading: Click the load button (top left-most button) and select an iO-808
.jsonfile to restore a collection.
Control playback with START_STOP_BUTTON_CLICK
masterThe
START_STOP_BUTTON_CLICKaction toggles theplayingstate. The behavior varies depending on theselectedMode:- MODE_FIRST_PART / MODE_SECOND_PART: If starting, it resets
currentStepto -1, sets thecurrentVariationbased onbasicVariationPosition, and setscurrentPatternto theselectedPattern. - MODE_MANUAL_PLAY: If starting, it resets
currentStepto -1, sets the variation, setscurrentPattern(consideringfillScheduled), and resetscurrentMeasureto 0. - MODE_PATTERN_CLEAR: Does nothing.
- MODE_FIRST_PART / MODE_SECOND_PART: If starting, it resets
Manage pattern sequencing with TICK
masterThe
TICKaction is used to advance the playback step. It usespatternLengthSelectorto determine when a pattern has finished. Depending on theselectedMode, it handles transitions:- MODE_FIRST_PART: Resets
currentStepto 0 and advances thecurrentVariation. - MODE_SECOND_PART: Attempts to transition to
SECOND_PARTif its length is greater than 0; otherwise, it returns toFIRST_PARTand advances the variation. - MODE_MANUAL_PLAY: Transitions between parts or measures using
nextMeasurelogic.
If the pattern has not finished, it simply increments
currentStep.- MODE_FIRST_PART: Resets
Current limitations and unimplemented features
masterThe following features from the original TR-808 hardware are currently not implemented in iO-808:
PLAYmodeCOMPOSEmodePRE-SCALE(all patterns are currently hardcoded to3)- Adding triggers via the
TAPbutton
Update instrument parameters with INSTRUMENT_CHANGE
masterTo update a specific control (like volume or decay) on a specific instrument, dispatch
INSTRUMENT_CHANGE. Thepayloadmust contain thetypeof instrument, thecontrolName, and the newvalue.// Example payload structure for INSTRUMENT_CHANGE dispatch({ type: 'INSTRUMENT_CHANGE', payload: { type: 'kick', controlName: 'volume', value: 0.8 } });