Photosynthesizer
Turn a picture into music. Your image stays in your browser; nothing is uploaded.
- running
- —
- clock drift
- — audio clock vs. wall clock
- headroom
- — how far ahead notes are scheduled
- voices
- —
Each row is a track, played left to right. Loops : rests — 3 : 1 plays the row three times, then sits out once. Wait — how many passes the row sits out before it first comes in (counted from Play), so rows can enter one at a time or stagger their rests. Letters mark drum hits: K kick, S snare, h hat.
Colors, darkest to lightest
Drag the dividers to set where bass ends and treble begins. The bar is lightness from 0 (black) to 100 (white); each dot is a palette color at its real lightness.
How the picture becomes sound
- The image is cropped to its largest centered square and split into a grid (4 to 16 cells a side). Each cell becomes the average of every pixel in it, and each cell is one 16th note, so a 16-cell row is one bar of 4/4.
- Those colors are reduced to a palette by repeatedly splitting the most spread-out group of colors in half (median cut). There's no randomness, so the same image always gives the same palette.
- Lightness picks the band (bass, mid or treble, set by the dividers) and the pitch within it, snapped to the chosen key and scale. Darker is lower.
- Saturation sets loudness: gray cells play quietly, vivid cells play loudly.
- A note starts only where a row's color changes, and is held for as long as the color lasts.
- Drums come from edges between neighboring cells: a big jump to lighter hits the snare, a big drop to darker hits the kick, and smaller changes hit the hi-hat. A row's first cell is compared with its last, since the row loops.
- With more rows, more notes sound at once, so the melody is turned down a little as rows are added (and up for fewer) to keep the overall volume steady.
- Sound pack: 808. Bass: 808 sub · mid: synth stab · treble: bell. All synthesized in the browser.