Skip to content

ncg777/gaterunner

Repository files navigation

GateRunner

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/)

Presets

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.

Import And Export

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.

How Notes Are Computed in the Encoding Scheme

This application uses a binary-based encoding system to determine which notes are played from numerical values. Here's how it works:

  1. 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 5 becomes 1010.
      • The number 10 becomes 0101.
  2. 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
      • ...
  3. Chords:

    • If multiple 1s are present, the corresponding notes form a chord.
      • Example: The number 7 (111) maps to C, D, and E.

Summary

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.

About

A webapp that acts as a polyphonic single channel sequencer based on the binary representation of integers with a (sometimes glitchy?) basic single oscillator based synth. It can export to MIDI file, share URL for sequences and output real time midi.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors