×0.700
Step 1 of 3 · for Balatro fans

Balatro's music machine, rebuilt in Web Audio

Every rule follows the game's engine/sound_manager.lua and modulate_sound(). The music is an original piece with the same structure. Press start, switch to Shop and back, then hit Game Over.

① Game state → desired_track

Five full tracks start together and never stop. A switch only pushes the desired track toward 1 by dt×3, about 0.33 s. The playhead never resets, so the melody keeps going.

② Pitch = original_pitch × PITCH_MOD

0.70
All music plays at per = 0.7: 30% slower, about 6.2 semitones lower. Game Over slides PITCH_MOD toward 0.5. That is the tape stop.

③ Hand score → ambient layers

0.1×
Organ volume is 0.1 × log₅(score / target), capped at 0.4, and only above the target. Fire approximates the scoring flames from the score ratio. Neither layer follows PITCH_MOD.

Track volumes (live)

Not started
← OverviewStep 2 · Mouse bend →