SYSTEM//BREAK — Hack The Beats · Hack The Beats

bpm
—
bar
—
/*
  @title SYSTEM//BREAK
  @by Hack The Beats

  Dark hybrid club track built around one metallic hook:
  techno pressure, house swing, trap halftime weight, and a broken-beat finale.

  The song is intentionally split into performance-ready channels.
  _METAL and _ACID begin muted so a DJ can introduce them live.

  @try Saw the hook: `s("square")` -> `s("sawtooth")` in HOOK
  @try 808 techno kick: `RolandTR909` -> `RolandTR808` in KICK
  @try Double the straight hats: `hh*8` -> `hh*16` in HATS
  @try Darker voice: `speed(.88)` -> `speed(.72)` in VOX
*/

setcps(142/60/4)

// Original synthetic speech samples for the vocal hooks.
samples('shabda/speech:system_online,hack_the_beat,run_it_back')

// Performance macros.
// Keep every position musical so these can be played live.
const pressure = slider(1500, 350, 5200, 10)
const space = slider(0.18, 0, 0.65, 0.01)
const drive = slider(1.4, 0, 6, 0.1)
const sub = slider(0.62, 0.30, 0.95, 0.01)


// 1-16: four-on-the-floor techno.
// 17-24: trap-style halftime kick.
// 29-32: techno kick returns beneath the broken beat.
KICK: stack(
  s("bd*4")
    .bank("RolandTR909")
    .gain(.88)
    .mask("<1!16 0!12 1!4>"),

  s("bd ~ ~ [bd ~] ~ bd ~ ~")
    .bank("RolandTR808")
    .gain(.86)
    .mask("<0!16 1!8 0!8>")
)
._punchcard()


// Straight hats build the techno section.
// The middle section switches to trap-style rolls.
HATS: stack(
  s("hh*8")
    .bank("RolandTR909")
    .gain("[.16 .38]*4")
    .mask("<0!4 1!12 0!12 1!4>"),

  s("hh*4 [hh*2] hh*4 [hh*8]")
    .bank("RolandTR808")
    .gain(.24)
    .mask("<0!16 1!8 0!8>")
)


// House influence: offbeat clap, open hat and rim with shuffle.
// Appears in the groove section and again in the final hybrid.
PERC: stack(
  s("~ cp ~ cp").gain(.42),
  s("~ oh ~ oh").gain(.24),
  s("~ rim [~ rim] ~").gain(.16)
)
.bank("RolandTR909")
.swingBy(1/3, 4)
.mask("<0!8 1!8 0!12 1!4>")


// Rolling techno bass. PRESSURE opens the filter and DRIVE roughens it.
BASS: note("c#2 ~ c#2 [~ c#2] b1 ~ d2 ~")
  .s("sawtooth")
  .lpf(pressure)
  .lpq(5)
  .distort(drive)
  .decay(.12)
  .sustain(0)
  .release(.06)
  .gain(.20)
  .mask("<0!4 1!12 0!12 1!4>")


// The trap section gets its own sub voice.
// It returns under the final four bars for extra weight.
SUB808: note("c#1 ~ ~ c#1 [~ g#0] ~ b0 ~")
  .s("sine")
  .attack(.005)
  .decay(.30)
  .sustain(.42)
  .release(.10)
  .distort(drive.mul(.22))
  .gain(sub)
  .mask("<0!16 1!8 0!4 1!4>")


// Signature riff.
// Bars 5-8 tease two notes.
// Bars 9-16 reveal the hook.
// Bars 17-24 drop it an octave for the halftime section.
// Bars 29-32 restore the full hook for the climax.
HOOK: stack(
  note("c#5 ~ ~ ~ ~ ~ g4 ~")
    .s("square")
    .lpf(pressure.mul(1.6))
    .distort(drive.mul(.35))
    .gain(.10)
    .mask("<0!4 1!4 0!24>"),

  note("c#5 ~ g4 c#5 ~ e5 d5 ~")
    .s("square")
    .lpf(pressure.mul(1.8))
    .distort(drive.mul(.45))
    .delay(.18)
    .delaytime(.375)
    .room(space)
    .gain(.21)
    .mask("<0!8 1!8 0!12 1!4>"),

  note("c#4 ~ ~ g3 c#4 ~ e4 ~")
    .s("square")
    .lpf(pressure.mul(1.25))
    .distort(drive.mul(.55))
    .delay(.10)
    .delaytime(.25)
    .gain(.18)
    .mask("<0!16 1!8 0!8>")
)
._scope()


// Dark house chord stabs give the techno groove some lift and swing.
CHORDS: note("~ [c#4,e4,g#4,b4] ~ [d4,f#4,a4,c#5]")
  .s("gm_epiano1:1")
  .lpf(pressure.mul(1.25))
  .hpf(180)
  .room(space)
  .delay(.10)
  .delaytime(.25)
  .gain(.12)
  .swingBy(1/3, 4)
  .mask("<0!8 1!8 0!12 1!4>")


// Bars 25-32 break the grid.
// The last four bars deliberately run beneath the returning techno kick.
BREAKS: stack(
  s("bd ~ [~ bd] sd ~ bd ~ [sd ~]")
    .bank("RolandTR909")
    .gain(.66),

  s("hh*16")
    .bank("RolandTR909")
    .gain("[.10 .28]*8"),

  s("~ rim ~ [rim rim] ~ rim ~ rim")
    .bank("RolandTR909")
    .gain(.16)
)
.mask("<0!24 1!8>")


// Sparse spoken hooks. The bar-28 chop acts as the launch into the finale.
VOX: stack(
  s("system_online")
    .mask("<0!3 1 0!28>"),

  s("hack_the_beat")
    .mask("<0!15 1 0!16>"),

  s("run_it_back")
    .mask("<0!23 1 0!8>"),

  s("run_it_back")
    .chop(8)
    .mask("<0!27 1 0!4>"),

  s("hack_the_beat")
    .mask("<0!28 1 0!3>")
)
.speed(.88)
.hpf(180)
.room(space)
.delay(.22)
.delaytime(.25)
.gain(.68)


// Constant industrial air keeps the sections living in the same world.
ATMOS: stack(
  s("pink")
    .lpf(sine.range(500, 2800).slow(8))
    .gain(.026)
    .room(.75),

  s("crackle*8")
    .hpf(5000)
    .gain(.012)
    .room(.55)
)


// Starts muted. Bring it in with the mixer or capture it as a snapshot.
_METAL: s("metal ~ metal ~")
  .hpf(1300)
  .distort(drive.mul(.30))
  .room(space)
  .gain(.10)
  .swingBy(1/3, 4)


// Starts muted. Optional acid pressure layer for live escalation.
_ACID: note("c#3 ~ c#3 d3 ~ c#3 b2 ~")
  .s("sawtooth")
  .lpf(pressure)
  .lpq(8)
  .distort(drive.mul(.65))
  .delay(.12)
  .delaytime(.25)
  .gain(.14)

Deck B is empty

Load a second beat here, then bring it in with the crossfader or Mix.

How two decks work

Live-coded music · press play

SYSTEM//BREAK

by Hack The Beats · 142 bpm

The code is the score. It plays itself — you mix it.

    Song knobs

    Channels

    M mute · S solo · ● capture ?

    Pads

    hold ?

    Master

    A
    B

    This is music made by code.

    Every sound you hear comes from the code above, running live in your browser. Press play, then take the knobs: no account needed.

    The knobs are yours. Sign in, free, to change the code, keep your version and share it.

    We store your name, email address and the songs you save. Privacy · About

    Beats

    My songs

      Beats

      1. Sweet Child Scratch by JOSHC, after Skratch Bastid · 131 bpm
      2. Speak and Spell 2 136 bpm
      3. SYSTEM//BREAK by Hack The Beats · 142 bpm

      Click a song to load it on the deck in focus, or pick a deck with A / B.

      Account

      The knobs, channels and pads are free to use. An account adds the rest: editing the code, a second deck, recording, MIDI, and your own songs, kept in your account and shareable by link. It is free.

      We store your name, email address and the songs you save. See the privacy notice.

      Snapshot

      A pinned snapshot loops in time on that deck as a channel of its own, muted until you bring it in with its pad or its M. Learn more

      Unsaved changes

      Share

      More ways to share

      How sharing works

      Video clip

      Recorded live on this device as the music plays, starting on the next bar. Nothing is uploaded. Learn more

      Admin

      The site's beats, in the order the song list shows them. For each, choose who can play it: Anyone makes it a featured beat, which visitors can play without an account (up to six, one chip each on the stage); Members is everyone who is signed in; Only me is you alone. To add a beat, publish one of yours from My songs.

        Patterns already here are skipped. A new beat is yours alone until you say who else can play it.

        Hack The Beats

        Every sound here is made by the code on screen, running live in your browser. Each knob is a slider() from the song, each channel is one of its labelled patterns, and the code is yours to change.

        SYSTEM//BREAK — Hack The Beats

        Dark hybrid club track built around one metallic hook:

        techno pressure, house swing, trap halftime weight, and a broken-beat finale.

        The song is intentionally split into performance-ready channels.

        _METAL and _ACID begin muted so a DJ can introduce them live.

        Keys

        While you are typing in the code, the single-key shortcuts are off.

        Space
        Play or stop the deck in focus
        X
        Switch focus between deck A and deck B
        M
        Mix: start the other deck in time and fade across
        ← →
        Previous or next beat
        1–9 0 - =
        Mute channels 1 to 12
        Q W E A S D
        Hold a pad: echo, drop, wash, half, stutter, no drums. With Shift it stays on.
        T Y U I H J K L
        Snapshot pads 1 to 8: bring one in on the next bar, or stop it. With Shift it plays once. Capture one with ● on a channel in the Mixer (Esc lets a capture go).
        [ ]
        Jump back or forward four bars
        F G
        Follow the music with the code; gallery (full-screen) view
        R B ?
        Record the mix to a WAV file; open the beats list; this help
        V
        Make a video clip of the code and the music (Esc cancels one being recorded)
        Ctrl+.
        Stop the deck in focus (works while typing in the code, too)
        Ctrl+Enter Ctrl+S
        Run your changes without stopping the music; save

        Where things are

        First steps
        A short tour of the loop (play, bend, change, keep, share), one step at a time. Learn more
        Editing
        Click in the code (or press Edit) to change it, Update runs it, and Esc leaves the code. Learn more
        In the code
        Click a track label to mute it, click a highlighted number to find its knob, drag an inline slider. Learn more
        Try
        Try, top left, makes one of the song's suggested changes; tap it again to put it back. Learn more
        Song map
        The sections of the code, beside it (or behind Map when the window is narrow); click one to glide there. Learn more
        Views
        Follow glides the code to whichever track comes in, Split shows both decks' code, Gallery is full screen. Learn more
        Knobs and switches
        Arrows adjust a knob, Shift for fine, Enter or double-click resets it, and Reset puts every knob back to what the code says. Learn more
        Channels
        Each labelled pattern is a channel with a level, a meter, M to mute and S to solo. Learn more
        Pads
        Hold one, or Shift-click (or switch Latch on) to keep it on. Learn more
        Snapshots
        Press ● on a channel in the Mixer to capture it from the next bar, then tap its pad to bring it in. Learn more
        Two decks
        With Sync on, a deck started while the other plays comes in on the bar, and Mix fades across over eight bars. Learn more
        Arrangement
        Which tracks play in each of 32 bars: click a bar to jump there, or drag across bars to pick them and cut, keep, move, copy or paste them. Learn more
        Your songs
        In the beats list: New, Import and Export, and each song's ⋯ menu to rename, duplicate, share or delete it. Learn more
        Sharing
        The link icon shares a song by link, which always plays its latest saved version; Make a video clip there (or V) records the code lighting up with the music. Learn more

        MIDI controller

        Not connected.

        With Learn on, click any knob, fader, pad or button on the deck, then move a control on your hardware. Learn more

        Support the site

        Hack The Beats is free: no ads, no paywall, no subscription. If it has had your head nodding, help us keep hacking the beats. Tell a friend who makes music, share a song you made, and wear the shirt.

        Every shirt helps keep the site running, free, and full of new beats.

        Buy a shirt
        A black long-sleeve shirt with the Hack the Beats logo in white and orange pixels

        Credits and source

        Built on Strudel, © Strudel contributors, under the GNU AGPL v3. This site is free software under the same licence, with no warranty: download the source of this version, or read it on GitHub.

        Hack The Beats is owned and operated by Built By Signal LLC (builtbysignal.com).

        Songs are credited in their own code, and sounds come from public sample packs that belong to their authors. About this site, credits and contact · Privacy