Skip to content

Instantly share code, notes, and snippets.

View marcoonroad's full-sized avatar
🦋
the Future() has been CANCELLED and we .Restart() the DEAD Event[] from the past

Marco Aurélio da Silva marcoonroad

🦋
the Future() has been CANCELLED and we .Restart() the DEAD Event[] from the past
View GitHub Profile
@marcoonroad
marcoonroad / xenharmonic_piano.strudel.js
Created August 24, 2026 03:16
Strudel Xenharmonic/Microtonal 311-EDO/TET piano using only freq()
// @ts-check
'use strict'
// NOTE: XENHARMONIC / MICROTONAL PIANO SAMPLE TEST
// TODO: MUST HANDLE PITCHED CLASSES (SINGLE OCTAVE) VS OPEN VOICINGS (2+ OCTAVES)
const roundBy5 = number => Math.round(number * 100000) / 100000
function computeFrequenciesTable(tuningFrequency, edoScale) {
@marcoonroad
marcoonroad / breakcore_generator.strudel.js
Created August 18, 2026 03:05
Seeded Pseudo-random (deterministic) Syncopated Breakcore Patterns Generator in Strudel
await samples('github:tidalcycles/dirt-samples')
await samples('github:yaxu/clean-breaks')
// DISCLAIMER:
// POTENTIALLY DANGEROUS, DON'T LOAD ANY RANDOM EXTERNAL SCRIPT
// IN THIS WAY, ONLY LOAD TRUSTED SCRIPTS THAT ARE FIXED SNAPSHOTS,
// THAT IS, THEIR CODE WON'T EVER CHANGE AGAIN, AVOID USING RELATIVE
// VERSION TAGS LIKE @latest AND SORT OF THAT -- YOU'VE BEEN WARNED --
//
// The seeded PRNG engine is a library that I made long ago called spadille:
@marcoonroad
marcoonroad / fm_synth_spinback.strudel.js
Last active June 28, 2026 14:00
DJ plate backspins/spinbacks in Strudel REPL
// NOTE: this is an spinback/backspin (DJ hip-hop plates) implemented using
// FM-synthesis in Strudel, use with caution and with lower gains/octaves (bassline)
// - by the increasing index, the spinback would sound more "thin/stretched" on plate
$: note("<e0 eb0 f0 d#0>")
.scale("C:chromatic")
.scaleTranspose(12)
.sound("sawtooth")
.fast(4)
.color("red")
@marcoonroad
marcoonroad / inspect_console_webaudio_recorder.js
Last active June 21, 2026 23:35
Chrome (inspect -> console) WebAudio recorder script
(function () {
if (window.__waRecorder) {
console.warn('[waRecorder] Already installed.');
return;
}
const state = {
contexts: new Set(),
recording: false,
buffers: [], // array of [Float32Array, Float32Array, ...] per channel, per block
@marcoonroad
marcoonroad / pulsing_reese_saw_bass.strudel.js
Last active May 29, 2026 23:00
Some more Strudel music coding examples...
// pulsing reese saw bass (for texture)
$: note("a#1") // base bass note
.sound("sawtooth")
.layer(
pattern => pattern.struct("[x -]").transpose(0),
pattern => pattern.struct("[- x]").transpose(12) // octave jump
)
.cutoff(2000)
.ftype("ladder")
@marcoonroad
marcoonroad / xenharmonic-chords-311edo.strudel.js
Last active August 23, 2026 17:06
Xenharmonic Chords (at 311EDO/TET) in Strudel REPL JS
const edo = 311
const semitones = Array.from(
{ length: edo },
(_, semitone) => semitone
)
const ratios =
semitones.map(ratio =>
Math.pow(2, ratio/edo))
const tail = pattern =>
@marcoonroad
marcoonroad / guitar-arp-31edo.strudel.js
Created February 12, 2026 02:07
Darkwave-like Guitar Arp on 31 EDO/TET (Strudel REPL)
let tuning = 216
let root = 216
let edo = 31
let tempo = 135
let signature = 4
let ratio = Math.pow(2, 1/edo)
let frequencies = Array.from(
{ length: edo },
(_, semitone) =>
root * Math.pow(ratio, semitone)
@marcoonroad
marcoonroad / guitar-72edo-tet.strudel.js
Last active February 11, 2026 16:43
72 notes per octave Guitar in Strudel REPL
let tuning = 440
let root = 261.63
let edo = 72
let tempo = 135
let signature = 4
let ratio = Math.pow(2, 1/edo)
let frequencies = Array.from(
{ length: edo },
(_, semitone) =>
root * Math.pow(ratio, semitone)
@marcoonroad
marcoonroad / angelcore.strudel.js
Last active June 10, 2026 01:50
Angelcore EDM sample of stretched leads made with Strudel REPL
// angelcore sample(s)
const leads = (isUpper) =>
n(
!isUpper ?
`< 61 61 63*2 - 63 65 61*2 - 61*2 - 63 64 - - - 72*2 - >` :
`< - - - 64*2 - - - - - - - - 67 69 71*2 - 73 >`
)
.cpm(135/4)
.fast(6)
@marcoonroad
marcoonroad / GIT_STAGE_REFRESH_FIX.md
Created May 5, 2024 02:30
Fixing Git Staging showing changes on OS switch between Linux and Windows
git config core.autocrlf true
git config core.filemode false