A groovebox that writes its own house and techno. Every bar it tries a few hundred small edits to one part, keeps the best, and moves on when nothing beats it.
Describe a track in a few words (a style, a tempo, a key, a mood, instruments), or roll one. Best on headphones or speakers with some bass. On an iPhone, switch silent mode off. Space plays and pauses, N rolls a new take, R turns the radio on and off, L likes the take.
bass chords lead
Sixteen steps, counted 1 e & a. Taller means louder. Click a step to change it; you hear the edit from the next bar.
ghost normal accent added by a fill
First the search, one part at a time, then the finished track. Click anywhere to jump there at the next bar line.
Each rule scores the pattern from 0 to 100%. The fit is their weighted average; the number after the × is the weight.
Each dot is a pattern the search tried in that bar. The line is the best so far, which is the one you hear.
chord bass lead in the scale
Before the search, the page plays each instrument alone and measures how its energy is spread over ten octave bands. The mix rules use these figures.
Radio. The radio skips the search and plays finished tracks back to back, each one a new take in the style, tempo, key and scale chosen under the screen. For every next song it rolls six takes and plays the one least like the song before, so two songs in a row do not share an opening, and seldom a style or a tempo. A track fades out over its last four bars and the next starts a moment later. It keeps going in a background tab.
Playing from memory. Building every note at the moment it is due takes a lot of processor time, and a slow or busy device (a phone, a car's screen) can fall behind, which is heard as the music cutting in and out. So the radio renders each track eight bars at a time, a little ahead of where it is playing, and plays those recordings back. They are lined up as much as half a minute early, so the music carries on even if the page is frozen for a while. If a recording is not ready in time, those bars are played live and the status line says "catching up". While a recording plays, the height of the spectrum is still measured, and its colours are worked out from the notes being played.
Likes. Like keeps a take under Most liked, in this browser. On barbybar.fm the like is also counted in a list everyone sees, which you can filter by style, scale, tempo and date. Two links that give the same track are counted as one.
The search itself takes about a tenth of a second, so it is worked out the moment a take is rolled and then performed at the speed of the music. That is why you can jump around in it.
Why takes differ. The targets change with every take, and many patterns tie for the best score. Why they stay musical. Every note comes from one scale, the kick is tuned to the key, and each rule encodes something producers do or listeners have been shown to prefer.
Limits. The rule weights are set by hand, not learned from data. The rules simplify the research they cite. Timing offsets stay under 12 milliseconds, because larger ones lowered groove ratings in listening tests (Davies et al. 2013). Every sound is synthesised in your browser; there are no samples and no mastering engineer, so it will not match a released record.