Skip to content

Instantly share code, notes, and snippets.

@CharStiles
Created May 6, 2025 14:38
Show Gist options
  • Save CharStiles/1a64d1081b309a037ccb8ec98a74f170 to your computer and use it in GitHub Desktop.
Save CharStiles/1a64d1081b309a037ccb8ec98a74f170 to your computer and use it in GitHub Desktop.
var cpm = 30;
let _mouseX=0.5,_mouseY=0.5;
document.onmousemove = (e) => {
//if (e.shiftKey) {
_mouseX = e.clientX/document.body.clientWidth;
_mouseY = e.clientY/document.body.clientHeight;
//}
}
let mouseX = ref(() => _mouseX)
let mouseY = ref(() => _mouseY)
stack(
sound("bd!4")
.bank("rolandmc303")
.gain(0.95)
.room(0.15)
,
sound("~ hh ~ [hh hh] ~ hh ~ hh")
.bank("alesissr16")
.gain(0.23)
.crush(5)
,
sound("anywayz").gain(1.0).clip(0.5).slow(4).slice(".5","[0.01 [0.2 0.1]]")
//.gain(0.57).clip(1.).slow(2)
.euclidRot(floor(sine.range(4,15)).slow(8),16,0)
.lpf(mouseY.mul(2000))
// .lpq(mouseY.mul(20))
// .room(mouseX.sub(1)).cpm(60)
.delay(sine.range(0,0.75).slow(10))
,
// note(`
// [~ g1 ~ g1 ~ ~ g1 ~ ~ g1 ~ ~ g1 ~ ~ g1]
// [~ ~ ~ db1 ~ ~ db1 ~ ~ eb1 ~ ~ eb1 ~ ~ eb1]
// `).clip(2)
// .slow(2).gain(5.9),
).cpm(cpm)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment