PortuguêsPlay

Behind the scenes

Music with no audio files

Hexapulso has no music file and no sound-effect file at all. Everything you hear is computed by the browser while you play, note by note.

Why do it this way

What a sound is made of

Browsers have a built-in synthesiser. With it the game uses two ingredients:

Every note gets an envelope: the volume rises quickly and falls right after. The envelope is what turns a continuous beep into a played note.

The structure all tracks share

The 13 tracks run on the same beat: 16 steps per bar, a kick on every beat and four chords that loop round. Each track is a set of parameters on top of that base: which chords, which wave shape for the bass and the lead, which arpeggio pattern, whether there is echo, what stands in for the snare.

That is why switching tracks doesn’t change the tempo of the run, only the mood. The list with a description of each one is in Music.

Layers that come in with intensity

The music has four intensity levels, and the stage of the run is what drives them. With each new stage the game goes up one level, until the fourth:

StageWhat plays
SparkKick, bass and the chord pad
FlameThe snare and the melody come in
EmberThe hi-hat doubles
Blaze onwardsIn the second half of the bar, the melody goes up an octave

The tempo rises too: a run starts at 124 beats per minute and gains 4 with each stage, up to 144 at Singularity. On the menu the music plays slower, at 112, and muffled by a filter that opens when the run starts.

The effects

The sounds for collecting a spark, grazing a wall, turning focus on, breaking the shield and crashing are made the same way. The graze sounds sold in the shop (bell, laser, coin, droplet and the others) are different recipes for the same event.

One detail: the game’s core, which decides the rules, knows nothing about sound. It only reports "collected a spark" or "changed stage", and the part of the game that handles screen and audio decides what to play. So sound never interferes with the result of a run.

When the music shows on screen

Because the game knows which step of the bar the music is on, the drawing can follow along. The Beating heart core cosmetic, for example, beats to the pulse of the music.

Limits

Music synthesised like this has a sound of its own, an electronic one. There can be no voice and no recorded instrument. And browsers only unlock audio after the first tap or click on the page, which is why the game starts silent until you press something.