Skip to content

Instantly share code, notes, and snippets.

@nnirror
Created November 21, 2023 03:40
Show Gist options
  • Save nnirror/5bd292dcf96cc35d171b7dcbf7e15506 to your computer and use it in GitHub Desktop.
Save nnirror/5bd292dcf96cc35d171b7dcbf7e15506 to your computer and use it in GitHub Desktop.
noise bagel facet code
$('noisebagel')
.silence((n1 * 8))
.iter(8, () => {
if (i % 2 == 0) {
this.slices(i + 1, () => {
if (i == 0 || (s + 1) % num_slices == Math.round(num_slices / 2)) {
this.sup(_.noise((n1 * 8) / (i + 1))
.ffilter(_.circle(1)
.invert()
.size(4096 / (i + 1))
.scale(i * 2000, NYQUIST / 2), _.circle(1)
.size(4096 / (i + 1))
.scale(NYQUIST / 2, NYQUIST - (i * 2000))))
} else {
this.times(1)
}
}, 1, false)
} else {
this.slices(i + 2, () => {
if ((s + 1) % num_slices == Math.round(num_slices / 2)) {
this.ffilter(_.circle(1)
.invert()
.size(512 / (i + 1))
.scale(i * 2000, NYQUIST / 2), _.circle(1)
.size(512 / (i + 1))
.scale(NYQUIST / 2, NYQUIST - (i * 2000)), true)
} else {
this.times(1)
}
}, 1, false)
}
})
.play()
.full()
.once();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment