Squigtones

SquesmosSquigtones
← Library
Click pads to light them up — drag to paint a row. Every note fits the scale, so anything you draw sounds good. Right-click a pad (or press and hold) for a sharp or flat; it stays until you change it. The bottom rows are drums. Click a row's name to hear it.
Your equations

How Squigtones works

Sound is air wobbling back and forth; how many wobbles per second is the frequency, in hertz (Hz), and that's the pitch you hear. Squigtones reads every equation as a melody: at time x seconds, play y Hz.
y = 440 → a steady A
y = 440·2^(x/12) → a slide up one semitone per second
y = {x<1: 440, x<2: 494} → A for a second, then B
Press ▶ (or space) to play, and click or drag on the graph to jump around. Each equation is its own voice — mute it with its speaker, or add up to eight for chords. The Examples menu has a few to start from.

Notes are powers of two

An octave doubles the frequency, and an octave has 12 semitones, so each semitone multiplies it by 21/12 ≈ 1.0595. A note n semitones from A440 is
f = 440 · 2^(n/12)
That's why small outputs count as semitones: squine(x) wanders between −1 and 1, so it plays a wobble a semitone either side of A. Choose "y is → Hz" to turn that off.

Rests and volume

Anywhere y is undefined, zero, negative or beyond hearing (under 20 Hz or over 20,000 Hz) is silence. tone(frequency, volume) works too, with volume from 0 to 1.

Notes → equations

In Note bars, every note becomes one piece of a piecewise equation: "from this time to that time, play this many Hz". Notes that overlap are split into separate voices, one equation each. Time in seconds is beats × 60 ÷ tempo.

Beat board

A grid of pads: each row is a note, each column is an eighth-note step, and the loop sweeps left to right. Swing makes every second eighth note late, for a long–short jazz or shuffle feel ("triplet" is the classic jazz swing). The notes are locked to a scale (pick the key and scale in the panel beside the board), so anything you light up sounds good. Want a note outside the scale? Right-click a pad (or press and hold it) and pick ♭ or ♯. The bottom three rows are drums. "Squiggle it" writes a random tune that follows a squine curve, and "Equations →" sends the notes to Note bars so you can see the math.

Compose

Write music the way it's printed: on staves. Each track is one staff, in treble or bass clef, with its own instrument, and every track plays at once, so you can layer a melody, chords and a bass line. Pick a note length up top (whole, half, quarter, eighth, sixteenth; "dot" makes it half as long again), then click a staff where the note goes. Clicking where a note already starts adds to it as a chord. Click a note to select and hear it, click it again to remove it, or right-click it. ♭ ♮ ♯ change the selected note (or the next one you write), and the key signature takes care of the rest.
Or type, like MuseScore: A–G write a note after the last one (in the nearest octave), Shift+letter adds it to the chord, 3–7 pick the length (16th up to whole), . dots it, 0 is a rest, ↑/↓ move the selected note a semitone (with Shift, an octave), ←/→ step through notes, and ⌫ deletes. Mute (M) or solo (S) a track to hear it alone. The Export menu saves a MIDI file that MuseScore, GarageBand and other music apps can open, or turns the score into equations in Note bars.

Shaping the sound

🎛 Sound opens the instrument every note plays through: the instrument (electric guitar, electric piano, organ, bass, supersaw, or a plain wave), brightness (left is darker and softer; far right boosts the treble for a sharp edge), warmth (thin ↔ full low end), resonance (a ringing peak at the filter's edge), grit (how cheap and broken-up the amp sounds; left is extra clean), distortion (right: a high-gain guitar amp; left: warm tube saturation), and the note's attack and release — short release for a pluck, long for a pad. Every knob starts in the middle at "normal". Start from a preset and tweak.
Real instrument recordings: Fluid R3 GM SoundFont (Frank Wen and contributors), rendered by Benjamin Gleitzman's midi-js-soundfonts, used under CC BY 3.0.

The squine tone

The default instrument isn't a sine wave — it's one period of squine at p = 4, rebuilt from its first 64 harmonics. It's rounder than a square wave and buzzier than a sine.