6,793 notes · Key A minor · 2 takes, 0 muted
One 88-key piano that everyone here plays at once, with a looper anyone can record into.
What fold does here
Every key press and release is an event. The keys being held are a view (each press +1, each release −1), and so is the music those keys make: the chord the room is playing, each player's own chord, which note of the chord each held key is, and the room's key, estimated from its last 48 notes. Seats (where your computer keys sit on the piano) are stored too, so everyone sees everyone else's.
The looper keeps each take as rows, with a list of the takes that are switched on. The loop's notes, and the chord on each beat of the loop, are views over that list.
Why it shows off fold
Nothing is ever erased. Muting a take only takes it off the list, and fold subtracts exactly that take's notes from the loop, the chords and the key, all in one step, then adds them back when you unmute. The room's key slides the same way: each new note joins a window of 48 and the oldest leaves, and fold adjusts the counts rather than starting over. Fold works out what the music means; your browser only makes the sound.
Worth trying
- Hold a chord with someone else and watch the caption name it, with each of you shown playing your part.
- Press Record, play a few bars, press it again, then layer a second take and mute the first: the progression rewinds.
- Play in one key for a while: the in-key letters on your keys get a faint underline.
Still app code
Sound and timing. Your own keys play straight away in your browser; recording and loop playback run against the server's clock. Fold has no clock, so letting go of a key whose release was lost is app code too. The piano samples are from ezekielaquino.com, used with permission.
Press \ in the app to watch fold's commits as they happen.