A browser-based MIDI step sequencer that generates MIDI files from binary-encoded note sequences using Forte number pitch-class sets.
Live app: https://ncg777.github.io/gaterunner/ (Until the GitHub repository is renamed, the app is also accessible at https://ncg777.github.io/gaterunner/)
GateRunner stores sequences as named presets in the browser.
- The selected preset loads into the working draft.
- Editing controls updates the working draft immediately for playback, MIDI export, and URL sharing.
- Use Save to update the selected preset.
- Use Save As to create a new preset from the current draft.
- Use New to create a fresh default preset.
- Existing single-preset local storage data is migrated automatically the first time the new preset system loads.
Preset files use JSON.
- Export Preset writes the current preset draft to a single-preset JSON file.
- Export Library writes the full preset library to a JSON file.
- Import JSON accepts either file type and adds imported presets without overwriting existing ones.
- If an imported preset name already exists, GateRunner keeps both presets by renaming the imported one.
This application uses a binary-based encoding system to determine which notes are played from numerical values. Here's how it works:
-
Binary Representation of Numbers:
- Each number is converted into binary, with bit 0 at position 0, bit 1 at position 1, and so on. For example:
- The number
5becomes1010. - The number
10becomes0101.
- The number
- Each number is converted into binary, with bit 0 at position 0, bit 1 at position 1, and so on. For example:
-
Pitch Class Assignment:
- Each binary digit corresponds to a position in the selected pitch class set going up octavewise to the maximal midi pitch. For example, for 7-35.11:
- Position 0 = C
- Position 1 = D
- Position 2 = E
- Position 3 = F
- Position 4 = G
- Position 5 = A
- Position 6 = B
- Position 7 = C
- ...
- Each binary digit corresponds to a position in the selected pitch class set going up octavewise to the maximal midi pitch. For example, for 7-35.11:
-
Chords:
- If multiple
1s are present, the corresponding notes form a chord.- Example: The number
7(111) maps to C, D, and E.
- Example: The number
- If multiple
To compute notes:
- Convert the number to binary (bit 0 = position 0).
- Map
1s to their pitch classes. - Apply an octave offset for final pitches.
- Combine active notes into a chord.