Skip to content

Instantly share code, notes, and snippets.

@ubidefeo
Created December 2, 2025 17:38
Show Gist options
  • Select an option

  • Save ubidefeo/349c76070339e71f7522a4fef173055c to your computer and use it in GitHub Desktop.

Select an option

Save ubidefeo/349c76070339e71f7522a4fef173055c to your computer and use it in GitHub Desktop.
Strudel.cc metronome/clicker
function setBPM(bpm) {
setcps(bpm/60/4).log()
}
const metro = () => {
return stack(
s("sine*4").mask("0 1 1 1")
.decay(0.01)
.sustain(0)
.note("e5")
,
s("sine*1")
.decay(0.01)
.sustain(0)
.note("d6")
)
}
setBPM(122)
$: metro().gain(slider(0, 0.0, 5.0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment