From ec8616a51513229f06f77216d2c4bd771091980d Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Mon, 4 Sep 2023 04:56:45 +0200 Subject: [PATCH 01/80] Envelope filter and filter order --- packages/superdough/helpers.mjs | 14 ++++++++-- packages/superdough/superdough.mjs | 44 ++++++++++++++++++++++++++---- 2 files changed, 49 insertions(+), 9 deletions(-) diff --git a/packages/superdough/helpers.mjs b/packages/superdough/helpers.mjs index 07e2b121..9ce197e1 100644 --- a/packages/superdough/helpers.mjs +++ b/packages/superdough/helpers.mjs @@ -66,10 +66,18 @@ export const getADSR = (attack, decay, sustain, release, velocity, begin, end) = return gainNode; }; -export const getFilter = (type, frequency, Q) => { - const filter = getAudioContext().createBiquadFilter(); +export function createFilter(context, type, frequency, Q, curve, to, over, t) { + const filter = context.createBiquadFilter(); filter.type = type; filter.frequency.value = frequency; filter.Q.value = Q; + + if (to !== null && over !== null) { + if (curve === 'lin') { + filter.frequency.linearRampToValueAtTime(to, t + over); + } else { + filter.frequency.exponentialRampToValueAtTime(to, t + over); + } + } return filter; -}; +} diff --git a/packages/superdough/superdough.mjs b/packages/superdough/superdough.mjs index af22355f..cf3c231e 100644 --- a/packages/superdough/superdough.mjs +++ b/packages/superdough/superdough.mjs @@ -9,7 +9,7 @@ import './reverb.mjs'; import './vowel.mjs'; import { clamp } from './util.mjs'; import workletsUrl from './worklets.mjs?url'; -import { getFilter, gainNode } from './helpers.mjs'; +import { createFilter, gainNode } from './helpers.mjs'; import { map } from 'nanostores'; import { logger } from './logger.mjs'; @@ -177,6 +177,11 @@ export const superdough = async (value, deadline, hapDuration) => { bank, source, gain = 0.8, + // filters + order = 12, + to, + filtenv = 'lin', + over, // low pass cutoff, resonance = 1, @@ -239,11 +244,37 @@ export const superdough = async (value, deadline, hapDuration) => { // gain stage chain.push(gainNode(gain)); - // filters - cutoff !== undefined && chain.push(getFilter('lowpass', cutoff, resonance)); - hcutoff !== undefined && chain.push(getFilter('highpass', hcutoff, hresonance)); - bandf !== undefined && chain.push(getFilter('bandpass', bandf, bandq)); - vowel !== undefined && chain.push(ac.createVowelFilter(vowel)); + if (cutoff !== undefined) { + const filter1 = createFilter(ac, 'lowpass', cutoff, resonance, filtenv, to || cutoff, over || hapDuration, t); + chain.push(filter1); + if (order === 24) { + const filter2 = createFilter(ac, 'lowpass', cutoff, resonance, filtenv, to || cutoff, over || hapDuration, t); + chain.push(filter2); + } + } + + if (hcutoff !== undefined) { + const filter1 = createFilter(ac, 'highpass', hcutoff, hresonance, filtenv, to || hcutoff, over || hapDuration, t); + chain.push(filter1); + if (order === 24) { + const filter2 = createFilter(ac, 'highpass', hcutoff, hresonance, filtenv, to || hcutoff, over || hapDuration, t); + chain.push(filter2); + } + } + + if (bandf !== undefined) { + const filter1 = createFilter(ac, 'bandpass', bandf, bandq, filtenv, to || bandf, over || hapDuration, t); + chain.push(filter1); + if (order === 24) { + const filter2 = createFilter(ac, 'bandpass', bandf, bandq, filtenv, to || bandf, over || hapDuration, t); + chain.push(filter2); + } + } + + if (vowel !== undefined) { + const vowelFilter = ac.createVowelFilter(vowel); + chain.push(vowelFilter); + } // effects coarse !== undefined && chain.push(getWorklet(ac, 'coarse-processor', { coarse })); @@ -282,6 +313,7 @@ export const superdough = async (value, deadline, hapDuration) => { analyserSend = effectSend(post, analyserNode, analyze); } + console.log(chain); // connect chain elements together chain.slice(1).reduce((last, current) => last.connect(current), chain[0]); From fdc201a799b841d4e2be20466fdeb56ae3c8c7d6 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Mon, 4 Sep 2023 06:03:05 +0200 Subject: [PATCH 02/80] Adding vibrato to synth oscillator --- packages/superdough/synth.mjs | 43 ++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/packages/superdough/synth.mjs b/packages/superdough/synth.mjs index a409d990..b216a427 100644 --- a/packages/superdough/synth.mjs +++ b/packages/superdough/synth.mjs @@ -40,6 +40,8 @@ export function registerSynthSounds() { fmrelease: fmRelease, fmvelocity: fmVelocity, fmwave: fmWaveform = 'sine', + vibrato = 0, + vdepth = 100, } = value; let { n, note, freq } = value; // with synths, n and note are the same thing @@ -53,7 +55,7 @@ export function registerSynthSounds() { } // maybe pull out the above frequency resolution?? (there is also getFrequency but it has no default) // make oscillator - const { node: o, stop } = getOscillator({ t, s: wave, freq, partials: n }); + const { node: o, stop } = getOscillator({ t, s: wave, freq, vibrato, vdepth, partials: n }); // FM + FM envelope let stopFm, fmEnvelope; @@ -137,8 +139,14 @@ export function waveformN(partials, type) { return osc; } -export function getOscillator({ s, freq, t, partials }) { - // make oscillator +export function getOscillator({ s, freq, t, vibrato, vdepth, partials }) { + // Additional oscillator for vibrato effect + if (vibrato > 0) { + var vibrato_oscillator = getAudioContext().createOscillator(); + vibrato_oscillator.frequency.value = vibrato; + } + + // Make oscillator with partial count let o; if (!partials || s === 'sine') { o = getAudioContext().createOscillator(); @@ -146,9 +154,28 @@ export function getOscillator({ s, freq, t, partials }) { } else { o = waveformN(partials, s); } - o.frequency.value = Number(freq); - o.start(t); - //o.stop(t + duration + release); - const stop = (time) => o.stop(time); - return { node: o, stop }; + + if (vibrato > 0) { + // Vibrato by creating a gain node + o.frequency.value = Number(freq); + var gain = getAudioContext().createGain(); + gain.gain.value = vdepth * 100; + vibrato_oscillator.connect(gain); + gain.connect(o.detune); + vibrato_oscillator.start(t); + o.start(t); + return { + node: o, + stop: (time) => { + vibrato_oscillator.stop(time); + o.stop(time); + }, + }; + } else { + // Normal operation, without vibrato + o.frequency.value = Number(freq); + o.start(t); + const stop = (time) => o.stop(time); + return { node: o, stop }; + } } From 60f5032b1270084efa5185f4560e8c70da24e3a9 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Mon, 4 Sep 2023 06:25:49 +0200 Subject: [PATCH 03/80] Implement pitch slide --- packages/superdough/synth.mjs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/packages/superdough/synth.mjs b/packages/superdough/synth.mjs index b216a427..e1d7905c 100644 --- a/packages/superdough/synth.mjs +++ b/packages/superdough/synth.mjs @@ -42,6 +42,8 @@ export function registerSynthSounds() { fmwave: fmWaveform = 'sine', vibrato = 0, vdepth = 100, + slide, + slide_speed = 1, } = value; let { n, note, freq } = value; // with synths, n and note are the same thing @@ -55,7 +57,16 @@ export function registerSynthSounds() { } // maybe pull out the above frequency resolution?? (there is also getFrequency but it has no default) // make oscillator - const { node: o, stop } = getOscillator({ t, s: wave, freq, vibrato, vdepth, partials: n }); + const { node: o, stop } = getOscillator({ + t, + s: wave, + freq, + vibrato, + vdepth, + slide: slide * freq, + slide_speed: sustain / slide_speed, + partials: n, + }); // FM + FM envelope let stopFm, fmEnvelope; @@ -139,7 +150,7 @@ export function waveformN(partials, type) { return osc; } -export function getOscillator({ s, freq, t, vibrato, vdepth, partials }) { +export function getOscillator({ s, freq, t, vibrato, vdepth, slide, slide_speed, partials }) { // Additional oscillator for vibrato effect if (vibrato > 0) { var vibrato_oscillator = getAudioContext().createOscillator(); @@ -156,8 +167,8 @@ export function getOscillator({ s, freq, t, vibrato, vdepth, partials }) { } if (vibrato > 0) { - // Vibrato by creating a gain node o.frequency.value = Number(freq); + slide > 0 && o.frequency.linearRampToValueAtTime(freq + slide, t + slide_speed); var gain = getAudioContext().createGain(); gain.gain.value = vdepth * 100; vibrato_oscillator.connect(gain); @@ -174,6 +185,7 @@ export function getOscillator({ s, freq, t, vibrato, vdepth, partials }) { } else { // Normal operation, without vibrato o.frequency.value = Number(freq); + slide > 0 && o.frequency.linearRampToValueAtTime(freq + slide, t + slide_speed); o.start(t); const stop = (time) => o.stop(time); return { node: o, stop }; From 3ba195c2d91af5cfe5675e0e8b00f3f242af688c Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Mon, 4 Sep 2023 18:38:05 +0200 Subject: [PATCH 04/80] add new controls + rename slide_speed > slidespeed --- packages/core/controls.mjs | 3 +++ packages/superdough/synth.mjs | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index 71f58427..36a5728b 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -664,7 +664,10 @@ const generic_params = [ // TODO: LFO rate see https://tidalcycles.org/docs/patternlib/tutorials/synthesizers/#supersquare ['rate'], // TODO: slide param for certain synths + ['vibrato'], + ['vdepth'], ['slide'], + ['slidespeed'], // TODO: detune? https://tidalcycles.org/docs/patternlib/tutorials/synthesizers/#supersquare ['semitone'], // TODO: dedup with synth param, see https://tidalcycles.org/docs/reference/synthesizers/#superpiano diff --git a/packages/superdough/synth.mjs b/packages/superdough/synth.mjs index e1d7905c..4ebfb3ac 100644 --- a/packages/superdough/synth.mjs +++ b/packages/superdough/synth.mjs @@ -43,7 +43,7 @@ export function registerSynthSounds() { vibrato = 0, vdepth = 100, slide, - slide_speed = 1, + slidespeed = 1, } = value; let { n, note, freq } = value; // with synths, n and note are the same thing @@ -64,7 +64,7 @@ export function registerSynthSounds() { vibrato, vdepth, slide: slide * freq, - slide_speed: sustain / slide_speed, + slidespeed: sustain / slidespeed, partials: n, }); @@ -150,7 +150,7 @@ export function waveformN(partials, type) { return osc; } -export function getOscillator({ s, freq, t, vibrato, vdepth, slide, slide_speed, partials }) { +export function getOscillator({ s, freq, t, vibrato, vdepth, slide, slidespeed, partials }) { // Additional oscillator for vibrato effect if (vibrato > 0) { var vibrato_oscillator = getAudioContext().createOscillator(); @@ -168,7 +168,7 @@ export function getOscillator({ s, freq, t, vibrato, vdepth, slide, slide_speed, if (vibrato > 0) { o.frequency.value = Number(freq); - slide > 0 && o.frequency.linearRampToValueAtTime(freq + slide, t + slide_speed); + slide > 0 && o.frequency.linearRampToValueAtTime(freq + slide, t + slidespeed); var gain = getAudioContext().createGain(); gain.gain.value = vdepth * 100; vibrato_oscillator.connect(gain); @@ -185,7 +185,7 @@ export function getOscillator({ s, freq, t, vibrato, vdepth, slide, slide_speed, } else { // Normal operation, without vibrato o.frequency.value = Number(freq); - slide > 0 && o.frequency.linearRampToValueAtTime(freq + slide, t + slide_speed); + slide > 0 && o.frequency.linearRampToValueAtTime(freq + slide, t + slidespeed); o.start(t); const stop = (time) => o.stop(time); return { node: o, stop }; From 5be78985227ede43217fd848f44c3ea2e19e5e88 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Mon, 4 Sep 2023 21:17:16 +0200 Subject: [PATCH 05/80] New technique using ADSR envelope --- packages/superdough/helpers.mjs | 16 ++++--- packages/superdough/superdough.mjs | 76 +++++++++++++++++++++++++----- 2 files changed, 72 insertions(+), 20 deletions(-) diff --git a/packages/superdough/helpers.mjs b/packages/superdough/helpers.mjs index 9ce197e1..4fda54eb 100644 --- a/packages/superdough/helpers.mjs +++ b/packages/superdough/helpers.mjs @@ -66,18 +66,20 @@ export const getADSR = (attack, decay, sustain, release, velocity, begin, end) = return gainNode; }; -export function createFilter(context, type, frequency, Q, curve, to, over, t) { +export function createFilter(context, type, frequency, Q, attack, decay, sustain, release, fenvmod, t) { const filter = context.createBiquadFilter(); filter.type = type; filter.frequency.value = frequency; filter.Q.value = Q; - if (to !== null && over !== null) { - if (curve === 'lin') { - filter.frequency.linearRampToValueAtTime(to, t + over); - } else { - filter.frequency.exponentialRampToValueAtTime(to, t + over); - } + // Apply ADSR to filter frequency + if (fenvmod > 0) { + const sustainFreq = sustain * frequency; + filter.frequency.linearRampToValueAtTime(frequency * fenvmod, t + attack); + filter.frequency.linearRampToValueAtTime(sustainFreq, t + attack + decay); + filter.frequency.setValueAtTime(sustainFreq, end); + filter.frequency.linearRampToValueAtTime(frequency, end + release); } + return filter; } diff --git a/packages/superdough/superdough.mjs b/packages/superdough/superdough.mjs index cf3c231e..6605662a 100644 --- a/packages/superdough/superdough.mjs +++ b/packages/superdough/superdough.mjs @@ -178,18 +178,32 @@ export const superdough = async (value, deadline, hapDuration) => { source, gain = 0.8, // filters - order = 12, - to, - filtenv = 'lin', - over, + order = '12db', + fenvmod = 2, // low pass + lpattack, + lpdecay, + lpsustain, + lprelease, cutoff, resonance = 1, // high pass + hpattack, + hpdecay, + hpsustain, + hprelease, hcutoff, hresonance = 1, + // full adsr for filter + lpadsr, + hpadsr, + bpadsr, // band pass bandf, + bpattack, + bpdecay, + bpsustain, + bprelease, bandq = 1, // coarse, @@ -215,6 +229,9 @@ export const superdough = async (value, deadline, hapDuration) => { if (bank && s) { s = `${bank}_${s}`; } + lpadsr && (lpattack = lpadsr[0]) && (lpdecay = lpadsr[1]) && (lpsustain = lpadsr[2]) && (lprelease = lpadsr[3]); + bpadsr && (bpattack = bpadsr[0]) && (bpdecay = bpadsr[1]) && (bpsustain = bpadsr[2]) && (bprelease = bpadsr[3]); + hpadsr && (hpattack = hpadsr[0]) && (hpdecay = hpadsr[1]) && (hpsustain = hpadsr[2]) && (hprelease = hpadsr[3]); // get source AudioNode let sourceNode; if (source) { @@ -245,28 +262,61 @@ export const superdough = async (value, deadline, hapDuration) => { chain.push(gainNode(gain)); if (cutoff !== undefined) { - const filter1 = createFilter(ac, 'lowpass', cutoff, resonance, filtenv, to || cutoff, over || hapDuration, t); + const filter1 = createFilter(ac, 'lowpass', cutoff, resonance, lpattack, lpdecay, lpsustain, lprelease, fmodenv, t); chain.push(filter1); - if (order === 24) { - const filter2 = createFilter(ac, 'lowpass', cutoff, resonance, filtenv, to || cutoff, over || hapDuration, t); + if (order === '24db') { + const filter2 = createFilter( + ac, + 'lowpass', + cutoff, + resonance, + lpattack, + lpdecay, + lpsustain, + lprelease, + fmodenv, + t, + ); chain.push(filter2); } } if (hcutoff !== undefined) { - const filter1 = createFilter(ac, 'highpass', hcutoff, hresonance, filtenv, to || hcutoff, over || hapDuration, t); + const filter1 = createFilter( + ac, + 'highpass', + hcutoff, + hresonance, + hpattack, + hpdecay, + hpsustain, + hprelease, + fenvmod, + t, + ); chain.push(filter1); - if (order === 24) { - const filter2 = createFilter(ac, 'highpass', hcutoff, hresonance, filtenv, to || hcutoff, over || hapDuration, t); + if (order === '24db') { + const filter2 = createFilter( + ac, + 'highpass', + hcutoff, + hresonance, + hpattack, + hpdecay, + hpsustain, + hprelease, + fenvmod, + t, + ); chain.push(filter2); } } if (bandf !== undefined) { - const filter1 = createFilter(ac, 'bandpass', bandf, bandq, filtenv, to || bandf, over || hapDuration, t); + const filter1 = createFilter(ac, 'bandpass', bandf, bandq, bpattack, bpdecay, bpsustain, bprelease, fenvmod, t); chain.push(filter1); - if (order === 24) { - const filter2 = createFilter(ac, 'bandpass', bandf, bandq, filtenv, to || bandf, over || hapDuration, t); + if (order === '24db') { + const filter2 = createFilter(ac, 'bandpass', bandf, bandq, bpattack, bpdecay, bpsustain, bprelease, fenvmod, t); chain.push(filter2); } } From 4319df0cb62b8ac3964a5dcfcf612b00532247c7 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Mon, 4 Sep 2023 21:24:42 +0200 Subject: [PATCH 06/80] replace odd envelope --- packages/superdough/helpers.mjs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/superdough/helpers.mjs b/packages/superdough/helpers.mjs index 4fda54eb..22f84048 100644 --- a/packages/superdough/helpers.mjs +++ b/packages/superdough/helpers.mjs @@ -74,11 +74,8 @@ export function createFilter(context, type, frequency, Q, attack, decay, sustain // Apply ADSR to filter frequency if (fenvmod > 0) { - const sustainFreq = sustain * frequency; - filter.frequency.linearRampToValueAtTime(frequency * fenvmod, t + attack); - filter.frequency.linearRampToValueAtTime(sustainFreq, t + attack + decay); - filter.frequency.setValueAtTime(sustainFreq, end); - filter.frequency.linearRampToValueAtTime(frequency, end + release); + const gainNode = getADSR(attack, decay, sustain, release, fenvmod, t, t + attack + decay + release); + gainNode.connect(filter.frequency); } return filter; From 37842d4fbde955bbf9f4c3594da6e12351f51938 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Tue, 5 Sep 2023 09:01:04 +0200 Subject: [PATCH 07/80] Revert "replace odd envelope" This reverts commit 4319df0cb62b8ac3964a5dcfcf612b00532247c7. --- packages/superdough/helpers.mjs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/superdough/helpers.mjs b/packages/superdough/helpers.mjs index 22f84048..4fda54eb 100644 --- a/packages/superdough/helpers.mjs +++ b/packages/superdough/helpers.mjs @@ -74,8 +74,11 @@ export function createFilter(context, type, frequency, Q, attack, decay, sustain // Apply ADSR to filter frequency if (fenvmod > 0) { - const gainNode = getADSR(attack, decay, sustain, release, fenvmod, t, t + attack + decay + release); - gainNode.connect(filter.frequency); + const sustainFreq = sustain * frequency; + filter.frequency.linearRampToValueAtTime(frequency * fenvmod, t + attack); + filter.frequency.linearRampToValueAtTime(sustainFreq, t + attack + decay); + filter.frequency.setValueAtTime(sustainFreq, end); + filter.frequency.linearRampToValueAtTime(frequency, end + release); } return filter; From 16c8dcf788dc18246e276937926208808e6cd1b3 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Tue, 5 Sep 2023 09:56:49 +0200 Subject: [PATCH 08/80] stable version --- packages/superdough/helpers.mjs | 28 +++++++++--- packages/superdough/superdough.mjs | 68 ++++++++++-------------------- 2 files changed, 44 insertions(+), 52 deletions(-) diff --git a/packages/superdough/helpers.mjs b/packages/superdough/helpers.mjs index 4fda54eb..f28fcfae 100644 --- a/packages/superdough/helpers.mjs +++ b/packages/superdough/helpers.mjs @@ -66,19 +66,33 @@ export const getADSR = (attack, decay, sustain, release, velocity, begin, end) = return gainNode; }; -export function createFilter(context, type, frequency, Q, attack, decay, sustain, release, fenvmod, t) { +export const getParamADSR = (param, attack, decay, sustain, release, velocity, begin, end) => { + param.setValueAtTime(0, begin); + param.linearRampToValueAtTime(velocity, begin + attack); + param.linearRampToValueAtTime(sustain * velocity, begin + attack + decay); + param.setValueAtTime(sustain * velocity, end); + param.linearRampToValueAtTime(0, end + release - 0.1); +}; + +export function createFilter(context, type, frequency, Q, attack, decay, sustain, release, fenv, t) { const filter = context.createBiquadFilter(); filter.type = type; filter.frequency.value = frequency; filter.Q.value = Q; // Apply ADSR to filter frequency - if (fenvmod > 0) { - const sustainFreq = sustain * frequency; - filter.frequency.linearRampToValueAtTime(frequency * fenvmod, t + attack); - filter.frequency.linearRampToValueAtTime(sustainFreq, t + attack + decay); - filter.frequency.setValueAtTime(sustainFreq, end); - filter.frequency.linearRampToValueAtTime(frequency, end + release); + if (fenv > 0) { + const envelope = getParamADSR( + filter.frequency, + attack, + decay, + sustain, + release, + frequency * fenv > 22000 ? 22000 : frequency * fenv, + t, + t + attack + decay + release, + ); + return filter; } return filter; diff --git a/packages/superdough/superdough.mjs b/packages/superdough/superdough.mjs index 6605662a..b5c55b0a 100644 --- a/packages/superdough/superdough.mjs +++ b/packages/superdough/superdough.mjs @@ -179,32 +179,32 @@ export const superdough = async (value, deadline, hapDuration) => { gain = 0.8, // filters order = '12db', - fenvmod = 2, + fenv, // low pass - lpattack, - lpdecay, - lpsustain, - lprelease, cutoff, + lpattack = 0.01, + lpdecay = 0.5, + lpsustain = 0.6, + lprelease = 0.01, resonance = 1, // high pass - hpattack, - hpdecay, - hpsustain, - hprelease, hcutoff, + hpattack = 0.01, + hpdecay = 0.5, + hpsustain = 0.6, + hprelease = 0.01, hresonance = 1, + // band pass + bandf, + bpattack = 0.01, + bpdecay = 0.5, + bpsustain = 0.6, + bprelease = 0.01, + bandq = 1, // full adsr for filter lpadsr, hpadsr, bpadsr, - // band pass - bandf, - bpattack, - bpdecay, - bpsustain, - bprelease, - bandq = 1, // coarse, crush, @@ -230,8 +230,8 @@ export const superdough = async (value, deadline, hapDuration) => { s = `${bank}_${s}`; } lpadsr && (lpattack = lpadsr[0]) && (lpdecay = lpadsr[1]) && (lpsustain = lpadsr[2]) && (lprelease = lpadsr[3]); - bpadsr && (bpattack = bpadsr[0]) && (bpdecay = bpadsr[1]) && (bpsustain = bpadsr[2]) && (bprelease = bpadsr[3]); hpadsr && (hpattack = hpadsr[0]) && (hpdecay = hpadsr[1]) && (hpsustain = hpadsr[2]) && (hprelease = hpadsr[3]); + bpadsr && (bpattack = bpadsr[0]) && (bpdecay = bpadsr[1]) && (bpsustain = bpadsr[2]) && (bprelease = bpadsr[3]); // get source AudioNode let sourceNode; if (source) { @@ -262,38 +262,16 @@ export const superdough = async (value, deadline, hapDuration) => { chain.push(gainNode(gain)); if (cutoff !== undefined) { - const filter1 = createFilter(ac, 'lowpass', cutoff, resonance, lpattack, lpdecay, lpsustain, lprelease, fmodenv, t); + const filter1 = createFilter(ac, 'lowpass', cutoff, resonance, lpattack, lpdecay, lpsustain, lprelease, fenv, t); chain.push(filter1); if (order === '24db') { - const filter2 = createFilter( - ac, - 'lowpass', - cutoff, - resonance, - lpattack, - lpdecay, - lpsustain, - lprelease, - fmodenv, - t, - ); + const filter2 = createFilter(ac, 'lowpass', cutoff, resonance, lpattack, lpdecay, lpsustain, lprelease, fenv, t); chain.push(filter2); } } if (hcutoff !== undefined) { - const filter1 = createFilter( - ac, - 'highpass', - hcutoff, - hresonance, - hpattack, - hpdecay, - hpsustain, - hprelease, - fenvmod, - t, - ); + const filter1 = createFilter(ac, 'highpass', hcutoff, hresonance, hpattack, hpdecay, hpsustain, hprelease, fenv, t); chain.push(filter1); if (order === '24db') { const filter2 = createFilter( @@ -305,7 +283,7 @@ export const superdough = async (value, deadline, hapDuration) => { hpdecay, hpsustain, hprelease, - fenvmod, + fenv, t, ); chain.push(filter2); @@ -313,10 +291,10 @@ export const superdough = async (value, deadline, hapDuration) => { } if (bandf !== undefined) { - const filter1 = createFilter(ac, 'bandpass', bandf, bandq, bpattack, bpdecay, bpsustain, bprelease, fenvmod, t); + const filter1 = createFilter(ac, 'bandpass', bandf, bandq, bpattack, bpdecay, bpsustain, bprelease, fenv, t); chain.push(filter1); if (order === '24db') { - const filter2 = createFilter(ac, 'bandpass', bandf, bandq, bpattack, bpdecay, bpsustain, bprelease, fenvmod, t); + const filter2 = createFilter(ac, 'bandpass', bandf, bandq, bpattack, bpdecay, bpsustain, bprelease, fenv, t); chain.push(filter2); } } From e597b6473d47c3914964b66097c0367b1eda4536 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Tue, 5 Sep 2023 10:44:41 +0200 Subject: [PATCH 09/80] remove test console log statement --- packages/superdough/superdough.mjs | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/superdough/superdough.mjs b/packages/superdough/superdough.mjs index b5c55b0a..8e4a0148 100644 --- a/packages/superdough/superdough.mjs +++ b/packages/superdough/superdough.mjs @@ -341,7 +341,6 @@ export const superdough = async (value, deadline, hapDuration) => { analyserSend = effectSend(post, analyserNode, analyze); } - console.log(chain); // connect chain elements together chain.slice(1).reduce((last, current) => last.connect(current), chain[0]); From fc9525e7d80f1a23332c7271c043dcd08be58ea9 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Tue, 5 Sep 2023 11:24:21 +0200 Subject: [PATCH 10/80] saner vibrato default --- packages/core/controls.mjs | 2 ++ packages/superdough/synth.mjs | 27 ++++++++++++++------------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index 36a5728b..c2cf917e 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -393,6 +393,8 @@ const generic_params = [ */ // currently an alias of 'hcutoff' https://github.com/tidalcycles/strudel/issues/496 // ['hpf'], + [['vib'], 'vib'], + [['vibmod'], 'vibmod'], [['hcutoff', 'hresonance'], 'hpf', 'hp'], /** * Controls the **h**igh-**p**ass **q**-value. diff --git a/packages/superdough/synth.mjs b/packages/superdough/synth.mjs index 4ebfb3ac..f02a1909 100644 --- a/packages/superdough/synth.mjs +++ b/packages/superdough/synth.mjs @@ -40,10 +40,10 @@ export function registerSynthSounds() { fmrelease: fmRelease, fmvelocity: fmVelocity, fmwave: fmWaveform = 'sine', - vibrato = 0, - vdepth = 100, + vib = 0, + vibmod = 1, slide, - slidespeed = 1, + slide_speed = 1, } = value; let { n, note, freq } = value; // with synths, n and note are the same thing @@ -61,10 +61,10 @@ export function registerSynthSounds() { t, s: wave, freq, - vibrato, - vdepth, + vib, + vibmod, slide: slide * freq, - slidespeed: sustain / slidespeed, + slide_speed: sustain / slide_speed, partials: n, }); @@ -150,11 +150,11 @@ export function waveformN(partials, type) { return osc; } -export function getOscillator({ s, freq, t, vibrato, vdepth, slide, slidespeed, partials }) { +export function getOscillator({ s, freq, t, vib, vibmod, slide, slide_speed, partials }) { // Additional oscillator for vibrato effect - if (vibrato > 0) { + if (vib > 0) { var vibrato_oscillator = getAudioContext().createOscillator(); - vibrato_oscillator.frequency.value = vibrato; + vibrato_oscillator.frequency.value = vib; } // Make oscillator with partial count @@ -166,11 +166,12 @@ export function getOscillator({ s, freq, t, vibrato, vdepth, slide, slidespeed, o = waveformN(partials, s); } - if (vibrato > 0) { + if (vib > 0) { o.frequency.value = Number(freq); - slide > 0 && o.frequency.linearRampToValueAtTime(freq + slide, t + slidespeed); + slide > 0 && o.frequency.linearRampToValueAtTime(freq + slide, t + slide_speed); var gain = getAudioContext().createGain(); - gain.gain.value = vdepth * 100; + // Vibmod is the amount of vibrato, in semitones + gain.gain.value = vibmod * freq; vibrato_oscillator.connect(gain); gain.connect(o.detune); vibrato_oscillator.start(t); @@ -185,7 +186,7 @@ export function getOscillator({ s, freq, t, vibrato, vdepth, slide, slidespeed, } else { // Normal operation, without vibrato o.frequency.value = Number(freq); - slide > 0 && o.frequency.linearRampToValueAtTime(freq + slide, t + slidespeed); + slide > 0 && o.frequency.linearRampToValueAtTime(freq + slide, t + slide_speed); o.start(t); const stop = (time) => o.stop(time); return { node: o, stop }; From 76051987742f2703c78fab3378fb9e6490cc65d1 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Tue, 5 Sep 2023 11:27:42 +0200 Subject: [PATCH 11/80] parameter renaming --- packages/superdough/synth.mjs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/superdough/synth.mjs b/packages/superdough/synth.mjs index f02a1909..4101aaee 100644 --- a/packages/superdough/synth.mjs +++ b/packages/superdough/synth.mjs @@ -42,8 +42,8 @@ export function registerSynthSounds() { fmwave: fmWaveform = 'sine', vib = 0, vibmod = 1, - slide, - slide_speed = 1, + pitchJump, + pitchJumpSpeed = 1, } = value; let { n, note, freq } = value; // with synths, n and note are the same thing @@ -63,8 +63,8 @@ export function registerSynthSounds() { freq, vib, vibmod, - slide: slide * freq, - slide_speed: sustain / slide_speed, + pitchJump: pitchJump * freq, + pitchJumpSpeed: sustain / pitchJumpSpeed, partials: n, }); @@ -150,7 +150,7 @@ export function waveformN(partials, type) { return osc; } -export function getOscillator({ s, freq, t, vib, vibmod, slide, slide_speed, partials }) { +export function getOscillator({ s, freq, t, vib, vibmod, pitchJump, pitchJumpSpeed, partials }) { // Additional oscillator for vibrato effect if (vib > 0) { var vibrato_oscillator = getAudioContext().createOscillator(); @@ -168,7 +168,7 @@ export function getOscillator({ s, freq, t, vib, vibmod, slide, slide_speed, par if (vib > 0) { o.frequency.value = Number(freq); - slide > 0 && o.frequency.linearRampToValueAtTime(freq + slide, t + slide_speed); + slide > 0 && o.frequency.linearRampToValueAtTime(freq + pitchJump, t + pitchJumpSpeed); var gain = getAudioContext().createGain(); // Vibmod is the amount of vibrato, in semitones gain.gain.value = vibmod * freq; From e2711ba911c2faffc70d04527b8c69134db813f3 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 8 Sep 2023 01:40:10 +0200 Subject: [PATCH 12/80] fix: filter envelopes + simplify --- packages/superdough/helpers.mjs | 16 +++++++------- packages/superdough/superdough.mjs | 35 +++++++++++++----------------- 2 files changed, 23 insertions(+), 28 deletions(-) diff --git a/packages/superdough/helpers.mjs b/packages/superdough/helpers.mjs index f28fcfae..15c81522 100644 --- a/packages/superdough/helpers.mjs +++ b/packages/superdough/helpers.mjs @@ -66,15 +66,15 @@ export const getADSR = (attack, decay, sustain, release, velocity, begin, end) = return gainNode; }; -export const getParamADSR = (param, attack, decay, sustain, release, velocity, begin, end) => { +export const getParamADSR = (param, attack, decay, sustain, release, max, begin, end) => { param.setValueAtTime(0, begin); - param.linearRampToValueAtTime(velocity, begin + attack); - param.linearRampToValueAtTime(sustain * velocity, begin + attack + decay); - param.setValueAtTime(sustain * velocity, end); - param.linearRampToValueAtTime(0, end + release - 0.1); + param.linearRampToValueAtTime(max, begin + attack); + param.linearRampToValueAtTime(sustain * max, begin + attack + decay); + param.setValueAtTime(sustain * max, end); + param.linearRampToValueAtTime(0, end + release); }; -export function createFilter(context, type, frequency, Q, attack, decay, sustain, release, fenv, t) { +export function createFilter(context, type, frequency, Q, attack, decay, sustain, release, fenv, start, end) { const filter = context.createBiquadFilter(); filter.type = type; filter.frequency.value = frequency; @@ -89,8 +89,8 @@ export function createFilter(context, type, frequency, Q, attack, decay, sustain sustain, release, frequency * fenv > 22000 ? 22000 : frequency * fenv, - t, - t + attack + decay + release, + start, + end + release, ); return filter; } diff --git a/packages/superdough/superdough.mjs b/packages/superdough/superdough.mjs index 8e4a0148..cddddbb4 100644 --- a/packages/superdough/superdough.mjs +++ b/packages/superdough/superdough.mjs @@ -201,10 +201,6 @@ export const superdough = async (value, deadline, hapDuration) => { bpsustain = 0.6, bprelease = 0.01, bandq = 1, - // full adsr for filter - lpadsr, - hpadsr, - bpadsr, // coarse, crush, @@ -229,9 +225,6 @@ export const superdough = async (value, deadline, hapDuration) => { if (bank && s) { s = `${bank}_${s}`; } - lpadsr && (lpattack = lpadsr[0]) && (lpdecay = lpadsr[1]) && (lpsustain = lpadsr[2]) && (lprelease = lpadsr[3]); - hpadsr && (hpattack = hpadsr[0]) && (hpdecay = hpadsr[1]) && (hpsustain = hpadsr[2]) && (hprelease = hpadsr[3]); - bpadsr && (bpattack = bpadsr[0]) && (bpdecay = bpadsr[1]) && (bpsustain = bpadsr[2]) && (bprelease = bpadsr[3]); // get source AudioNode let sourceNode; if (source) { @@ -262,19 +255,18 @@ export const superdough = async (value, deadline, hapDuration) => { chain.push(gainNode(gain)); if (cutoff !== undefined) { - const filter1 = createFilter(ac, 'lowpass', cutoff, resonance, lpattack, lpdecay, lpsustain, lprelease, fenv, t); - chain.push(filter1); + console.log('lpattack', lpattack); + let lp = () => + createFilter(ac, 'lowpass', cutoff, resonance, lpattack, lpdecay, lpsustain, lprelease, fenv, t, t + hapDuration); + chain.push(lp()); if (order === '24db') { - const filter2 = createFilter(ac, 'lowpass', cutoff, resonance, lpattack, lpdecay, lpsustain, lprelease, fenv, t); - chain.push(filter2); + chain.push(lp()); } } if (hcutoff !== undefined) { - const filter1 = createFilter(ac, 'highpass', hcutoff, hresonance, hpattack, hpdecay, hpsustain, hprelease, fenv, t); - chain.push(filter1); - if (order === '24db') { - const filter2 = createFilter( + let hp = () => + createFilter( ac, 'highpass', hcutoff, @@ -285,17 +277,20 @@ export const superdough = async (value, deadline, hapDuration) => { hprelease, fenv, t, + t + hapDuration, ); - chain.push(filter2); + chain.push(hp()); + if (order === '24db') { + chain.push(hp()); } } if (bandf !== undefined) { - const filter1 = createFilter(ac, 'bandpass', bandf, bandq, bpattack, bpdecay, bpsustain, bprelease, fenv, t); - chain.push(filter1); + let bp = () => + createFilter(ac, 'bandpass', bandf, bandq, bpattack, bpdecay, bpsustain, bprelease, fenv, t, t + hapDuration); + chain.push(bp()); if (order === '24db') { - const filter2 = createFilter(ac, 'bandpass', bandf, bandq, bpattack, bpdecay, bpsustain, bprelease, fenv, t); - chain.push(filter2); + chain.push(bp()); } } From 75a974643b16cb37541a577a3263b8038da70de4 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 8 Sep 2023 01:41:11 +0200 Subject: [PATCH 13/80] add missing controls --- packages/core/controls.mjs | 13 +++++++++++++ packages/superdough/superdough.mjs | 1 - 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index 71f58427..ce08fc68 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -377,6 +377,19 @@ const generic_params = [ * */ [['cutoff', 'resonance'], 'ctf', 'lpf', 'lp'], + ['fenv'], + ['lpattack', 'lpa'], + ['lpdecay', 'lpd'], + ['lpsustain', 'lps'], + ['lprelease', 'lpr'], + ['hpattack', 'hpa'], + ['hpdecay', 'hpd'], + ['hpsustain', 'hps'], + ['hprelease', 'hpr'], + ['bpattack', 'bpa'], + ['bpdecay', 'bpd'], + ['bpsustain', 'bps'], + ['bprelease', 'bpr'], /** * Applies the cutoff frequency of the **h**igh-**p**ass **f**ilter. * diff --git a/packages/superdough/superdough.mjs b/packages/superdough/superdough.mjs index cddddbb4..f17c277e 100644 --- a/packages/superdough/superdough.mjs +++ b/packages/superdough/superdough.mjs @@ -255,7 +255,6 @@ export const superdough = async (value, deadline, hapDuration) => { chain.push(gainNode(gain)); if (cutoff !== undefined) { - console.log('lpattack', lpattack); let lp = () => createFilter(ac, 'lowpass', cutoff, resonance, lpattack, lpdecay, lpsustain, lprelease, fenv, t, t + hapDuration); chain.push(lp()); From 9e4c548c694d0f6e7cb564bd93916549e2f4df21 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 8 Sep 2023 02:06:03 +0200 Subject: [PATCH 14/80] fix: filter clicks --- packages/superdough/helpers.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/superdough/helpers.mjs b/packages/superdough/helpers.mjs index 15c81522..a1a0f708 100644 --- a/packages/superdough/helpers.mjs +++ b/packages/superdough/helpers.mjs @@ -77,7 +77,6 @@ export const getParamADSR = (param, attack, decay, sustain, release, max, begin, export function createFilter(context, type, frequency, Q, attack, decay, sustain, release, fenv, start, end) { const filter = context.createBiquadFilter(); filter.type = type; - filter.frequency.value = frequency; filter.Q.value = Q; // Apply ADSR to filter frequency @@ -88,11 +87,13 @@ export function createFilter(context, type, frequency, Q, attack, decay, sustain decay, sustain, release, - frequency * fenv > 22000 ? 22000 : frequency * fenv, + Math.min(frequency * fenv, 20000), start, end + release, ); return filter; + } else { + filter.frequency.value = frequency; } return filter; From 606dcc8cc3c952812ba1783f757ceccf6c73334c Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 8 Sep 2023 02:27:28 +0200 Subject: [PATCH 15/80] use fenv to scale above base cutoff? --- packages/superdough/helpers.mjs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/superdough/helpers.mjs b/packages/superdough/helpers.mjs index a1a0f708..12c6f08c 100644 --- a/packages/superdough/helpers.mjs +++ b/packages/superdough/helpers.mjs @@ -66,12 +66,13 @@ export const getADSR = (attack, decay, sustain, release, velocity, begin, end) = return gainNode; }; -export const getParamADSR = (param, attack, decay, sustain, release, max, begin, end) => { - param.setValueAtTime(0, begin); - param.linearRampToValueAtTime(max, begin + attack); - param.linearRampToValueAtTime(sustain * max, begin + attack + decay); - param.setValueAtTime(sustain * max, end); - param.linearRampToValueAtTime(0, end + release); +export const getParamADSR = (param, attack, decay, sustain, release, min, max, begin, end) => { + const range = max - min; + param.setValueAtTime(min, begin); + param.linearRampToValueAtTime(min + range, begin + attack); + param.linearRampToValueAtTime(min + sustain * range, begin + attack + decay); + param.setValueAtTime(min + sustain * range, end); + param.linearRampToValueAtTime(min, end + release); }; export function createFilter(context, type, frequency, Q, attack, decay, sustain, release, fenv, start, end) { @@ -87,7 +88,8 @@ export function createFilter(context, type, frequency, Q, attack, decay, sustain decay, sustain, release, - Math.min(frequency * fenv, 20000), + frequency, + Math.min(frequency + 200 * 2 ** fenv, 20000), start, end + release, ); From 48753b2539bb756a51ca43221ffa02954cd69cd9 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 8 Sep 2023 02:53:08 +0200 Subject: [PATCH 16/80] fix last crack? --- packages/superdough/helpers.mjs | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/packages/superdough/helpers.mjs b/packages/superdough/helpers.mjs index 12c6f08c..d58f2355 100644 --- a/packages/superdough/helpers.mjs +++ b/packages/superdough/helpers.mjs @@ -68,10 +68,12 @@ export const getADSR = (attack, decay, sustain, release, velocity, begin, end) = export const getParamADSR = (param, attack, decay, sustain, release, min, max, begin, end) => { const range = max - min; + const peak = min + range; + const sustainLevel = min + sustain * range; param.setValueAtTime(min, begin); - param.linearRampToValueAtTime(min + range, begin + attack); - param.linearRampToValueAtTime(min + sustain * range, begin + attack + decay); - param.setValueAtTime(min + sustain * range, end); + param.linearRampToValueAtTime(peak, begin + attack); + param.linearRampToValueAtTime(sustainLevel, begin + attack + decay); + param.setValueAtTime(sustainLevel, end); param.linearRampToValueAtTime(min, end + release); }; @@ -79,23 +81,15 @@ export function createFilter(context, type, frequency, Q, attack, decay, sustain const filter = context.createBiquadFilter(); filter.type = type; filter.Q.value = Q; + frequency = Math.max(frequency, 20); + filter.frequency.value = frequency; // Apply ADSR to filter frequency if (fenv > 0) { - const envelope = getParamADSR( - filter.frequency, - attack, - decay, - sustain, - release, - frequency, - Math.min(frequency + 200 * 2 ** fenv, 20000), - start, - end + release, - ); + const min = frequency; + const max = Math.min(frequency + 200 * 2 ** fenv, 20000); + getParamADSR(filter.frequency, attack, decay, sustain, release, min, max, start, end); return filter; - } else { - filter.frequency.value = frequency; } return filter; From 18640d59daca002cc8260f46cffcb9915bcc40aa Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 8 Sep 2023 03:00:49 +0200 Subject: [PATCH 17/80] acid party --- packages/core/controls.mjs | 1 + packages/superdough/helpers.mjs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index ce08fc68..268638cb 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -390,6 +390,7 @@ const generic_params = [ ['bpdecay', 'bpd'], ['bpsustain', 'bps'], ['bprelease', 'bpr'], + ['order'], /** * Applies the cutoff frequency of the **h**igh-**p**ass **f**ilter. * diff --git a/packages/superdough/helpers.mjs b/packages/superdough/helpers.mjs index d58f2355..45162a36 100644 --- a/packages/superdough/helpers.mjs +++ b/packages/superdough/helpers.mjs @@ -74,7 +74,7 @@ export const getParamADSR = (param, attack, decay, sustain, release, min, max, b param.linearRampToValueAtTime(peak, begin + attack); param.linearRampToValueAtTime(sustainLevel, begin + attack + decay); param.setValueAtTime(sustainLevel, end); - param.linearRampToValueAtTime(min, end + release); + param.linearRampToValueAtTime(min, end + Math.max(release, 0.1)); }; export function createFilter(context, type, frequency, Q, attack, decay, sustain, release, fenv, start, end) { From c5fb247de6dd7440fea1cfbf00922c5598040d97 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Fri, 8 Sep 2023 12:38:39 +0200 Subject: [PATCH 18/80] Documentation for filter envelope --- packages/core/controls.mjs | 51 +++++++++++++++++++++++++++++ website/src/pages/learn/effects.mdx | 41 +++++++++++++++++++++++ 2 files changed, 92 insertions(+) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index 268638cb..84b7526d 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -377,10 +377,61 @@ const generic_params = [ * */ [['cutoff', 'resonance'], 'ctf', 'lpf', 'lp'], + + /** + * Sets the filter envelope modulation depth. + * @name fenv + * @param {number | Pattern} modulation depth of the filter envelope between 0 and _n_ + * @example + * note("c2 c3").fast(2).sound("sawtooth") + * .cutoff(500).fenv("<1 2 3 4 5 6 7 8>") + */ ['fenv'], + /** + * Sets the attack duration for the lowpass filter envelope. + * @name lpattack + * @param {number | Pattern} attack time of the filter envelope + * @synonyms lpa + * @example + * note("c3 e3 f3 g3 ab3 bb3") + * .sound('square').cutoff(1000) + * .lpattack("<0.05 0.1 0.25 0.5>/2").fenv(1) + * .release(0.2).attack(0) + */ ['lpattack', 'lpa'], + /** + * Sets the decay duration for the lowpass filter envelope. + * @name lpdecay + * @param {number | Pattern} decay time of the filter envelope + * @synonyms lpd + * @example + * "baba" + * note("c3 e3 f3 g3 ab3 bb3") + * .sound('square').cutoff(1000) + * .lpdecay("<0.05 0.1 0.125>/2") + * .fenv("4").lps(0).lpr(0) + */ ['lpdecay', 'lpd'], + /** + * Sets the sustain amplitude for the lowpass filter envelope. + * @name lpsustain + * @param {number | Pattern} sustain amplitude of the filter envelope + * @synonyms lps + * @example + * note("c3 e3 f3 g3 ab3 bb3") + * .sound('square').cutoff(200) + * .lpd(0.1).lpsustain("<0.1 0.5 0.75 1>") + * .fenv("2") + */ ['lpsustain', 'lps'], + /** + * Sets the release time for the lowpass filter envelope. + * @name lprelease + * @param {number | Pattern} release time of the filter envelope + * @synonyms lpr + * @example + * note("c3 e3 g3 c4").lpr("<0.1 0.25 0.5>").fenv(0.5) + */ ['lprelease', 'lpr'], ['hpattack', 'hpa'], ['hpdecay', 'hpd'], diff --git a/website/src/pages/learn/effects.mdx b/website/src/pages/learn/effects.mdx index 12e57846..31562f98 100644 --- a/website/src/pages/learn/effects.mdx +++ b/website/src/pages/learn/effects.mdx @@ -78,6 +78,47 @@ Strudel uses ADSR envelopes, which are probably the most common way to describe +# Filter Envelope + +Each filter can receive an additional filter envelope controlling the cutoff value dynamically. It uses an ADSR envelope similar to the one used for amplitude. There is an additional parameter to control the depth of the filter modulation: `fenv`. This allows you to play subtle or huge filter modulations just the same by only increasing or decreasing the depth. + +There is one filter envelope for each filter type and thus one set of envelope filter parameters preceded either by `lp`, `hp` or `bp`: + +- `lpattack`, `lpdecay`, `lpsustain`, `lprelease`: filter envelope for the lowpass filter. + - alternatively: `lpa`, `lpd`, `lps` and `lpr`. +- `hpattack`, `hpdecay`, `hpsustain`, `hprelease`: filter envelope for the highpass filter. + - alternatively: `hpa`, `hpd`, `hps` and `hpr`. +- `bpattack`, `bpdecay`, `bpsustain`, `bprelease`: filter envelope for the bandpass filter. + - alternatively: `bpa`, `bpd`, `bps` and `bpr`. + +## lpattack + +- Also `hpattack` and `bpattack`. + + + +## lpdecay + +- Also `hpdecay` and `bpdecay`. + + + +## lpsustain + +- Also `hpsustain` and `bpsustain`. + + + +## lprelease + +- Also `hprelease` and `bprelease`. + + + +## fenv + + + # Dynamics ## gain From 34318039807c8d0faa83b3bd032b609704a93ba7 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Fri, 8 Sep 2023 13:08:00 +0200 Subject: [PATCH 19/80] documenting vib and vibmod --- packages/core/controls.mjs | 23 ++++++++++++++++++++--- website/src/pages/learn/synths.mdx | 10 ++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index c2cf917e..f7f029e0 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -393,9 +393,28 @@ const generic_params = [ */ // currently an alias of 'hcutoff' https://github.com/tidalcycles/strudel/issues/496 // ['hpf'], - [['vib'], 'vib'], + /** + * Applies a vibrato to the frequency of the oscillator. + * + * @name vib + * @param {number | Pattern} frequency of the vibrato in hertz + * @synonyms vibrato + * @example + * sound("triangle").freq(300).vib("<1 2 4 8 16>") + */ + [['vibrato'], 'vib'], + /** + * Sets the vibrato depth as a multiple of base frequency (not vibrato speed!). + * + * @name vibmod + * @param {number | Pattern} depth of vibrato (multiple of base frequency) + * @example + * sound("triangle").freq(300).vib("<8 16>").vibmod("<0.25 0.5 0.75 1 2 4>") + */ [['vibmod'], 'vibmod'], [['hcutoff', 'hresonance'], 'hpf', 'hp'], + ['vib'], + ['vibmod'], /** * Controls the **h**igh-**p**ass **q**-value. * @@ -666,8 +685,6 @@ const generic_params = [ // TODO: LFO rate see https://tidalcycles.org/docs/patternlib/tutorials/synthesizers/#supersquare ['rate'], // TODO: slide param for certain synths - ['vibrato'], - ['vdepth'], ['slide'], ['slidespeed'], // TODO: detune? https://tidalcycles.org/docs/patternlib/tutorials/synthesizers/#supersquare diff --git a/website/src/pages/learn/synths.mdx b/website/src/pages/learn/synths.mdx index b24726cf..68bbee34 100644 --- a/website/src/pages/learn/synths.mdx +++ b/website/src/pages/learn/synths.mdx @@ -48,6 +48,16 @@ You can also set `n` directly in mini notation with `sound`: Note for tidal users: `n` in tidal is synonymous to `note` for synths only. In strudel, this is not the case, where `n` will always change timbre, be it though different samples or different waveforms. +### Vibrato + +#### vib + + + +#### vibmod + + + ## FM Synthesis FM Synthesis is a technique that changes the frequency of a basic waveform rapidly to alter the timbre. From 74442b0d76eb12b3a44e824c9422aaba6b8e9eb1 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Fri, 8 Sep 2023 13:43:43 +0200 Subject: [PATCH 20/80] documenting vibrato and removing broken slide/pitchJump mechanism --- packages/core/controls.mjs | 8 ++++++-- packages/superdough/synth.mjs | 8 +------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index f7f029e0..f6fcc89f 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -686,6 +686,7 @@ const generic_params = [ ['rate'], // TODO: slide param for certain synths ['slide'], + ['slidespeed'], // TODO: detune? https://tidalcycles.org/docs/patternlib/tutorials/synthesizers/#supersquare ['semitone'], @@ -893,10 +894,13 @@ const generic_params = [ // ZZFX ['zrand'], ['curve'], - ['slide'], // superdirt duplicate - ['deltaSlide'], ['pitchJump'], ['pitchJumpTime'], + ['slide'], // superdirt duplicate + ['deltaSlide'], + /** + * + */ ['lfo', 'repeatTime'], ['noise'], ['zmod'], diff --git a/packages/superdough/synth.mjs b/packages/superdough/synth.mjs index 4101aaee..8a240340 100644 --- a/packages/superdough/synth.mjs +++ b/packages/superdough/synth.mjs @@ -42,8 +42,6 @@ export function registerSynthSounds() { fmwave: fmWaveform = 'sine', vib = 0, vibmod = 1, - pitchJump, - pitchJumpSpeed = 1, } = value; let { n, note, freq } = value; // with synths, n and note are the same thing @@ -63,8 +61,6 @@ export function registerSynthSounds() { freq, vib, vibmod, - pitchJump: pitchJump * freq, - pitchJumpSpeed: sustain / pitchJumpSpeed, partials: n, }); @@ -150,7 +146,7 @@ export function waveformN(partials, type) { return osc; } -export function getOscillator({ s, freq, t, vib, vibmod, pitchJump, pitchJumpSpeed, partials }) { +export function getOscillator({ s, freq, t, vib, vibmod, partials }) { // Additional oscillator for vibrato effect if (vib > 0) { var vibrato_oscillator = getAudioContext().createOscillator(); @@ -168,7 +164,6 @@ export function getOscillator({ s, freq, t, vib, vibmod, pitchJump, pitchJumpSpe if (vib > 0) { o.frequency.value = Number(freq); - slide > 0 && o.frequency.linearRampToValueAtTime(freq + pitchJump, t + pitchJumpSpeed); var gain = getAudioContext().createGain(); // Vibmod is the amount of vibrato, in semitones gain.gain.value = vibmod * freq; @@ -186,7 +181,6 @@ export function getOscillator({ s, freq, t, vib, vibmod, pitchJump, pitchJumpSpe } else { // Normal operation, without vibrato o.frequency.value = Number(freq); - slide > 0 && o.frequency.linearRampToValueAtTime(freq + slide, t + slide_speed); o.start(t); const stop = (time) => o.stop(time); return { node: o, stop }; From 534e3f7f81394de9b168e95b68ecfab94337f89d Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 10 Sep 2023 00:48:04 +0200 Subject: [PATCH 21/80] add snapshots --- test/__snapshots__/examples.test.mjs.snap | 129 ++++++++++++++++++++++ 1 file changed, 129 insertions(+) diff --git a/test/__snapshots__/examples.test.mjs.snap b/test/__snapshots__/examples.test.mjs.snap index 60b39c53..8fc41df1 100644 --- a/test/__snapshots__/examples.test.mjs.snap +++ b/test/__snapshots__/examples.test.mjs.snap @@ -1762,6 +1762,27 @@ exports[`runs examples > example "fastGap" example index 0 1`] = ` ] `; +exports[`runs examples > example "fenv" example index 0 1`] = ` +[ + "[ 0/1 → 1/4 | note:c2 s:sawtooth cutoff:500 fenv:1 ]", + "[ 1/4 → 1/2 | note:c3 s:sawtooth cutoff:500 fenv:1 ]", + "[ 1/2 → 3/4 | note:c2 s:sawtooth cutoff:500 fenv:1 ]", + "[ 3/4 → 1/1 | note:c3 s:sawtooth cutoff:500 fenv:1 ]", + "[ 1/1 → 5/4 | note:c2 s:sawtooth cutoff:500 fenv:2 ]", + "[ 5/4 → 3/2 | note:c3 s:sawtooth cutoff:500 fenv:2 ]", + "[ 3/2 → 7/4 | note:c2 s:sawtooth cutoff:500 fenv:2 ]", + "[ 7/4 → 2/1 | note:c3 s:sawtooth cutoff:500 fenv:2 ]", + "[ 2/1 → 9/4 | note:c2 s:sawtooth cutoff:500 fenv:3 ]", + "[ 9/4 → 5/2 | note:c3 s:sawtooth cutoff:500 fenv:3 ]", + "[ 5/2 → 11/4 | note:c2 s:sawtooth cutoff:500 fenv:3 ]", + "[ 11/4 → 3/1 | note:c3 s:sawtooth cutoff:500 fenv:3 ]", + "[ 3/1 → 13/4 | note:c2 s:sawtooth cutoff:500 fenv:4 ]", + "[ 13/4 → 7/2 | note:c3 s:sawtooth cutoff:500 fenv:4 ]", + "[ 7/2 → 15/4 | note:c2 s:sawtooth cutoff:500 fenv:4 ]", + "[ 15/4 → 4/1 | note:c3 s:sawtooth cutoff:500 fenv:4 ]", +] +`; + exports[`runs examples > example "firstOf" example index 0 1`] = ` [ "[ 0/1 → 1/4 | note:g3 ]", @@ -2566,6 +2587,64 @@ exports[`runs examples > example "loopAtCps" example index 0 1`] = ` ] `; +exports[`runs examples > example "lpattack" example index 0 1`] = ` +[ + "[ 0/1 → 1/6 | note:c3 s:square cutoff:1000 lpattack:0.05 fenv:1 release:0.2 attack:0 ]", + "[ 1/6 → 1/3 | note:e3 s:square cutoff:1000 lpattack:0.05 fenv:1 release:0.2 attack:0 ]", + "[ 1/3 → 1/2 | note:f3 s:square cutoff:1000 lpattack:0.05 fenv:1 release:0.2 attack:0 ]", + "[ 1/2 → 2/3 | note:g3 s:square cutoff:1000 lpattack:0.05 fenv:1 release:0.2 attack:0 ]", + "[ 2/3 → 5/6 | note:ab3 s:square cutoff:1000 lpattack:0.05 fenv:1 release:0.2 attack:0 ]", + "[ 5/6 → 1/1 | note:bb3 s:square cutoff:1000 lpattack:0.05 fenv:1 release:0.2 attack:0 ]", + "[ 1/1 → 7/6 | note:c3 s:square cutoff:1000 lpattack:0.05 fenv:1 release:0.2 attack:0 ]", + "[ 7/6 → 4/3 | note:e3 s:square cutoff:1000 lpattack:0.05 fenv:1 release:0.2 attack:0 ]", + "[ 4/3 → 3/2 | note:f3 s:square cutoff:1000 lpattack:0.05 fenv:1 release:0.2 attack:0 ]", + "[ 3/2 → 5/3 | note:g3 s:square cutoff:1000 lpattack:0.05 fenv:1 release:0.2 attack:0 ]", + "[ 5/3 → 11/6 | note:ab3 s:square cutoff:1000 lpattack:0.05 fenv:1 release:0.2 attack:0 ]", + "[ 11/6 → 2/1 | note:bb3 s:square cutoff:1000 lpattack:0.05 fenv:1 release:0.2 attack:0 ]", + "[ 2/1 → 13/6 | note:c3 s:square cutoff:1000 lpattack:0.1 fenv:1 release:0.2 attack:0 ]", + "[ 13/6 → 7/3 | note:e3 s:square cutoff:1000 lpattack:0.1 fenv:1 release:0.2 attack:0 ]", + "[ 7/3 → 5/2 | note:f3 s:square cutoff:1000 lpattack:0.1 fenv:1 release:0.2 attack:0 ]", + "[ 5/2 → 8/3 | note:g3 s:square cutoff:1000 lpattack:0.1 fenv:1 release:0.2 attack:0 ]", + "[ 8/3 → 17/6 | note:ab3 s:square cutoff:1000 lpattack:0.1 fenv:1 release:0.2 attack:0 ]", + "[ 17/6 → 3/1 | note:bb3 s:square cutoff:1000 lpattack:0.1 fenv:1 release:0.2 attack:0 ]", + "[ 3/1 → 19/6 | note:c3 s:square cutoff:1000 lpattack:0.1 fenv:1 release:0.2 attack:0 ]", + "[ 19/6 → 10/3 | note:e3 s:square cutoff:1000 lpattack:0.1 fenv:1 release:0.2 attack:0 ]", + "[ 10/3 → 7/2 | note:f3 s:square cutoff:1000 lpattack:0.1 fenv:1 release:0.2 attack:0 ]", + "[ 7/2 → 11/3 | note:g3 s:square cutoff:1000 lpattack:0.1 fenv:1 release:0.2 attack:0 ]", + "[ 11/3 → 23/6 | note:ab3 s:square cutoff:1000 lpattack:0.1 fenv:1 release:0.2 attack:0 ]", + "[ 23/6 → 4/1 | note:bb3 s:square cutoff:1000 lpattack:0.1 fenv:1 release:0.2 attack:0 ]", +] +`; + +exports[`runs examples > example "lpdecay" example index 0 1`] = ` +[ + "[ 0/1 → 1/6 | note:c3 s:square cutoff:1000 lpdecay:0.05 fenv:4 lpsustain:0 lprelease:0 ]", + "[ 1/6 → 1/3 | note:e3 s:square cutoff:1000 lpdecay:0.05 fenv:4 lpsustain:0 lprelease:0 ]", + "[ 1/3 → 1/2 | note:f3 s:square cutoff:1000 lpdecay:0.05 fenv:4 lpsustain:0 lprelease:0 ]", + "[ 1/2 → 2/3 | note:g3 s:square cutoff:1000 lpdecay:0.05 fenv:4 lpsustain:0 lprelease:0 ]", + "[ 2/3 → 5/6 | note:ab3 s:square cutoff:1000 lpdecay:0.05 fenv:4 lpsustain:0 lprelease:0 ]", + "[ 5/6 → 1/1 | note:bb3 s:square cutoff:1000 lpdecay:0.05 fenv:4 lpsustain:0 lprelease:0 ]", + "[ 1/1 → 7/6 | note:c3 s:square cutoff:1000 lpdecay:0.05 fenv:4 lpsustain:0 lprelease:0 ]", + "[ 7/6 → 4/3 | note:e3 s:square cutoff:1000 lpdecay:0.05 fenv:4 lpsustain:0 lprelease:0 ]", + "[ 4/3 → 3/2 | note:f3 s:square cutoff:1000 lpdecay:0.05 fenv:4 lpsustain:0 lprelease:0 ]", + "[ 3/2 → 5/3 | note:g3 s:square cutoff:1000 lpdecay:0.05 fenv:4 lpsustain:0 lprelease:0 ]", + "[ 5/3 → 11/6 | note:ab3 s:square cutoff:1000 lpdecay:0.05 fenv:4 lpsustain:0 lprelease:0 ]", + "[ 11/6 → 2/1 | note:bb3 s:square cutoff:1000 lpdecay:0.05 fenv:4 lpsustain:0 lprelease:0 ]", + "[ 2/1 → 13/6 | note:c3 s:square cutoff:1000 lpdecay:0.1 fenv:4 lpsustain:0 lprelease:0 ]", + "[ 13/6 → 7/3 | note:e3 s:square cutoff:1000 lpdecay:0.1 fenv:4 lpsustain:0 lprelease:0 ]", + "[ 7/3 → 5/2 | note:f3 s:square cutoff:1000 lpdecay:0.1 fenv:4 lpsustain:0 lprelease:0 ]", + "[ 5/2 → 8/3 | note:g3 s:square cutoff:1000 lpdecay:0.1 fenv:4 lpsustain:0 lprelease:0 ]", + "[ 8/3 → 17/6 | note:ab3 s:square cutoff:1000 lpdecay:0.1 fenv:4 lpsustain:0 lprelease:0 ]", + "[ 17/6 → 3/1 | note:bb3 s:square cutoff:1000 lpdecay:0.1 fenv:4 lpsustain:0 lprelease:0 ]", + "[ 3/1 → 19/6 | note:c3 s:square cutoff:1000 lpdecay:0.1 fenv:4 lpsustain:0 lprelease:0 ]", + "[ 19/6 → 10/3 | note:e3 s:square cutoff:1000 lpdecay:0.1 fenv:4 lpsustain:0 lprelease:0 ]", + "[ 10/3 → 7/2 | note:f3 s:square cutoff:1000 lpdecay:0.1 fenv:4 lpsustain:0 lprelease:0 ]", + "[ 7/2 → 11/3 | note:g3 s:square cutoff:1000 lpdecay:0.1 fenv:4 lpsustain:0 lprelease:0 ]", + "[ 11/3 → 23/6 | note:ab3 s:square cutoff:1000 lpdecay:0.1 fenv:4 lpsustain:0 lprelease:0 ]", + "[ 23/6 → 4/1 | note:bb3 s:square cutoff:1000 lpdecay:0.1 fenv:4 lpsustain:0 lprelease:0 ]", +] +`; + exports[`runs examples > example "lpf" example index 0 1`] = ` [ "[ 0/1 → 1/3 | s:hh cutoff:4000 ]", @@ -2657,6 +2736,56 @@ exports[`runs examples > example "lpq" example index 0 1`] = ` ] `; +exports[`runs examples > example "lprelease" example index 0 1`] = ` +[ + "[ 0/1 → 1/4 | note:c3 lprelease:0.1 fenv:0.5 ]", + "[ 1/4 → 1/2 | note:e3 lprelease:0.1 fenv:0.5 ]", + "[ 1/2 → 3/4 | note:g3 lprelease:0.1 fenv:0.5 ]", + "[ 3/4 → 1/1 | note:c4 lprelease:0.1 fenv:0.5 ]", + "[ 1/1 → 5/4 | note:c3 lprelease:0.25 fenv:0.5 ]", + "[ 5/4 → 3/2 | note:e3 lprelease:0.25 fenv:0.5 ]", + "[ 3/2 → 7/4 | note:g3 lprelease:0.25 fenv:0.5 ]", + "[ 7/4 → 2/1 | note:c4 lprelease:0.25 fenv:0.5 ]", + "[ 2/1 → 9/4 | note:c3 lprelease:0.5 fenv:0.5 ]", + "[ 9/4 → 5/2 | note:e3 lprelease:0.5 fenv:0.5 ]", + "[ 5/2 → 11/4 | note:g3 lprelease:0.5 fenv:0.5 ]", + "[ 11/4 → 3/1 | note:c4 lprelease:0.5 fenv:0.5 ]", + "[ 3/1 → 13/4 | note:c3 lprelease:0.1 fenv:0.5 ]", + "[ 13/4 → 7/2 | note:e3 lprelease:0.1 fenv:0.5 ]", + "[ 7/2 → 15/4 | note:g3 lprelease:0.1 fenv:0.5 ]", + "[ 15/4 → 4/1 | note:c4 lprelease:0.1 fenv:0.5 ]", +] +`; + +exports[`runs examples > example "lpsustain" example index 0 1`] = ` +[ + "[ 0/1 → 1/6 | note:c3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.1 fenv:2 ]", + "[ 1/6 → 1/3 | note:e3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.1 fenv:2 ]", + "[ 1/3 → 1/2 | note:f3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.1 fenv:2 ]", + "[ 1/2 → 2/3 | note:g3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.1 fenv:2 ]", + "[ 2/3 → 5/6 | note:ab3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.1 fenv:2 ]", + "[ 5/6 → 1/1 | note:bb3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.1 fenv:2 ]", + "[ 1/1 → 7/6 | note:c3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.5 fenv:2 ]", + "[ 7/6 → 4/3 | note:e3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.5 fenv:2 ]", + "[ 4/3 → 3/2 | note:f3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.5 fenv:2 ]", + "[ 3/2 → 5/3 | note:g3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.5 fenv:2 ]", + "[ 5/3 → 11/6 | note:ab3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.5 fenv:2 ]", + "[ 11/6 → 2/1 | note:bb3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.5 fenv:2 ]", + "[ 2/1 → 13/6 | note:c3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.75 fenv:2 ]", + "[ 13/6 → 7/3 | note:e3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.75 fenv:2 ]", + "[ 7/3 → 5/2 | note:f3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.75 fenv:2 ]", + "[ 5/2 → 8/3 | note:g3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.75 fenv:2 ]", + "[ 8/3 → 17/6 | note:ab3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.75 fenv:2 ]", + "[ 17/6 → 3/1 | note:bb3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.75 fenv:2 ]", + "[ 3/1 → 19/6 | note:c3 s:square cutoff:200 lpdecay:0.1 lpsustain:1 fenv:2 ]", + "[ 19/6 → 10/3 | note:e3 s:square cutoff:200 lpdecay:0.1 lpsustain:1 fenv:2 ]", + "[ 10/3 → 7/2 | note:f3 s:square cutoff:200 lpdecay:0.1 lpsustain:1 fenv:2 ]", + "[ 7/2 → 11/3 | note:g3 s:square cutoff:200 lpdecay:0.1 lpsustain:1 fenv:2 ]", + "[ 11/3 → 23/6 | note:ab3 s:square cutoff:200 lpdecay:0.1 lpsustain:1 fenv:2 ]", + "[ 23/6 → 4/1 | note:bb3 s:square cutoff:200 lpdecay:0.1 lpsustain:1 fenv:2 ]", +] +`; + exports[`runs examples > example "lrate" example index 0 1`] = ` [ "[ 0/1 → 1/1 | n:0 s:supersquare leslie:1 lrate:1 ]", From 78ccec5d7b4922cc211fa5244601d9d68197da18 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Sun, 10 Sep 2023 09:14:41 +0200 Subject: [PATCH 22/80] adding test run --- test/__snapshots__/examples.test.mjs.snap | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/__snapshots__/examples.test.mjs.snap b/test/__snapshots__/examples.test.mjs.snap index 60b39c53..76a7cf11 100644 --- a/test/__snapshots__/examples.test.mjs.snap +++ b/test/__snapshots__/examples.test.mjs.snap @@ -4557,6 +4557,24 @@ exports[`runs examples > example "velocity" example index 0 1`] = ` ] `; +exports[`runs examples > example "vib" example index 0 1`] = ` +[ + "[ 0/1 → 1/1 | s:triangle freq:300 vib:1 ]", + "[ 1/1 → 2/1 | s:triangle freq:300 vib:2 ]", + "[ 2/1 → 3/1 | s:triangle freq:300 vib:4 ]", + "[ 3/1 → 4/1 | s:triangle freq:300 vib:8 ]", +] +`; + +exports[`runs examples > example "vibmod" example index 0 1`] = ` +[ + "[ 0/1 → 1/1 | s:triangle freq:300 vib:8 vibmod:0.25 ]", + "[ 1/1 → 2/1 | s:triangle freq:300 vib:16 vibmod:0.5 ]", + "[ 2/1 → 3/1 | s:triangle freq:300 vib:8 vibmod:0.75 ]", + "[ 3/1 → 4/1 | s:triangle freq:300 vib:16 vibmod:1 ]", +] +`; + exports[`runs examples > example "voicing" example index 0 1`] = ` [ "[ 0/1 → 1/1 | note:E4 ]", From bea9a3c2dc31483e1bf5956e5fe0f5d11de2ae7a Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Sun, 10 Sep 2023 09:28:07 +0200 Subject: [PATCH 23/80] replacing fenv by lpenv, hpenv, bpenv --- packages/superdough/superdough.mjs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/superdough/superdough.mjs b/packages/superdough/superdough.mjs index f17c277e..fda26277 100644 --- a/packages/superdough/superdough.mjs +++ b/packages/superdough/superdough.mjs @@ -179,15 +179,16 @@ export const superdough = async (value, deadline, hapDuration) => { gain = 0.8, // filters order = '12db', - fenv, // low pass cutoff, + lpenv, lpattack = 0.01, lpdecay = 0.5, lpsustain = 0.6, lprelease = 0.01, resonance = 1, // high pass + hpenv, hcutoff, hpattack = 0.01, hpdecay = 0.5, @@ -195,6 +196,7 @@ export const superdough = async (value, deadline, hapDuration) => { hprelease = 0.01, hresonance = 1, // band pass + bpenv, bandf, bpattack = 0.01, bpdecay = 0.5, @@ -256,7 +258,7 @@ export const superdough = async (value, deadline, hapDuration) => { if (cutoff !== undefined) { let lp = () => - createFilter(ac, 'lowpass', cutoff, resonance, lpattack, lpdecay, lpsustain, lprelease, fenv, t, t + hapDuration); + createFilter(ac, 'lowpass', cutoff, resonance, lpattack, lpdecay, lpsustain, lprelease, lpenv, t, t + hapDuration); chain.push(lp()); if (order === '24db') { chain.push(lp()); @@ -274,7 +276,7 @@ export const superdough = async (value, deadline, hapDuration) => { hpdecay, hpsustain, hprelease, - fenv, + hpenv, t, t + hapDuration, ); @@ -286,7 +288,7 @@ export const superdough = async (value, deadline, hapDuration) => { if (bandf !== undefined) { let bp = () => - createFilter(ac, 'bandpass', bandf, bandq, bpattack, bpdecay, bpsustain, bprelease, fenv, t, t + hapDuration); + createFilter(ac, 'bandpass', bandf, bandq, bpattack, bpdecay, bpsustain, bprelease, bpenv, t, t + hapDuration); chain.push(bp()); if (order === '24db') { chain.push(bp()); From 1383af62083b280e3c1c9642dc8333ac5cd0d3fb Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Sun, 10 Sep 2023 09:42:29 +0200 Subject: [PATCH 24/80] documenting filters more + tests --- packages/core/controls.mjs | 139 +++++++- packages/superdough/superdough.mjs | 22 +- test/__snapshots__/examples.test.mjs.snap | 387 ++++++++++++++++++++++ 3 files changed, 526 insertions(+), 22 deletions(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index 84b7526d..86ec5869 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -379,14 +379,35 @@ const generic_params = [ [['cutoff', 'resonance'], 'ctf', 'lpf', 'lp'], /** - * Sets the filter envelope modulation depth. - * @name fenv - * @param {number | Pattern} modulation depth of the filter envelope between 0 and _n_ + * Sets the lowpass filter envelope modulation depth. + * @name lpenv + * @param {number | Pattern} modulation depth of the lowpass filter envelope between 0 and _n_ + * @synonyms lpe * @example * note("c2 c3").fast(2).sound("sawtooth") - * .cutoff(500).fenv("<1 2 3 4 5 6 7 8>") + * .cutoff(500).lpenv("<1 2 3 4 5 6 7 8>") */ - ['fenv'], + ['lpenv', 'lpe'], + /** + * Sets the highpass filter envelope modulation depth. + * @name hpenv + * @param {number | Pattern} modulation depth of the highpass filter envelope between 0 and _n_ + * @synonyms hpe + * @example + * note("c2 c3").fast(2).sound("sawtooth") + * .hcutoff(500).hpenv("<1 2 3 4 5 6 7 8>") + */ + ['hpenv', 'hpe'], + /** + * Sets the bandpass filter envelope modulation depth. + * @name bpenv + * @param {number | Pattern} modulation depth of the bandpass filter envelope between 0 and _n_ + * @synonyms bpe + * @example + * note("c2 c3").fast(2).sound("sawtooth") + * .bandf(500).bpenv("<1 2 3 4 5 6 7 8>") + */ + ['bpenv', 'bpe'], /** * Sets the attack duration for the lowpass filter envelope. * @name lpattack @@ -395,10 +416,34 @@ const generic_params = [ * @example * note("c3 e3 f3 g3 ab3 bb3") * .sound('square').cutoff(1000) - * .lpattack("<0.05 0.1 0.25 0.5>/2").fenv(1) + * .lpattack("<0.05 0.1 0.25 0.5>/2").ftype('12db') * .release(0.2).attack(0) */ ['lpattack', 'lpa'], + /** + * Sets the attack duration for the highpass filter envelope. + * @name hpattack + * @param {number | Pattern} attack time of the highpass filter envelope + * @synonyms hpa + * @example + * note("c3 e3 f3 g3 ab3 bb3") + * .sound('square').hcutoff(1000) + * .hpattack("<0.05 0.1 0.25 0.5>/2").ftype('12db') + * .release(0.2).attack(0) + */ + ['hpattack', 'hpa'], + /** + * Sets the attack duration for the bandpass filter envelope. + * @name hpattack + * @param {number | Pattern} attack time of the bandpass filter envelope + * @synonyms bpa + * @example + * note("c3 e3 f3 g3 ab3 bb3") + * .sound('square').bandf(1000) + * .bpattack("<0.05 0.1 0.25 0.5>/2").ftype('12db') + * .release(0.2).attack(0) + */ + ['bpattack', 'bpa'], /** * Sets the decay duration for the lowpass filter envelope. * @name lpdecay @@ -409,39 +454,99 @@ const generic_params = [ * note("c3 e3 f3 g3 ab3 bb3") * .sound('square').cutoff(1000) * .lpdecay("<0.05 0.1 0.125>/2") - * .fenv("4").lps(0).lpr(0) + * .ftype("12db").lps(0).lpr(0) */ ['lpdecay', 'lpd'], + /** + * Sets the decay duration for the highpass filter envelope. + * @name hpdecay + * @param {number | Pattern} decay time of the highpass filter envelope + * @synonyms hpd + * @example + * "baba" + * note("c3 e3 f3 g3 ab3 bb3") + * .sound('square').hcutoff(1000) + * .hpdecay("<0.05 0.1 0.125>/2") + * .ftype("12db").hps(0).hpr(0) + */ + ['hpdecay', 'hpd'], + /** + * Sets the decay duration for the bandpass filter envelope. + * @name bpdecay + * @param {number | Pattern} decay time of the bandpass filter envelope + * @synonyms bpd + * @example + * "baba" + * note("c3 e3 f3 g3 ab3 bb3") + * .sound('square').bandf(1000) + * .bpdecay("<0.05 0.1 0.125>/2") + * .ftype("12db").bps(0).bpr(0) + */ + ['bpdecay', 'bpd'], /** * Sets the sustain amplitude for the lowpass filter envelope. * @name lpsustain - * @param {number | Pattern} sustain amplitude of the filter envelope + * @param {number | Pattern} sustain amplitude of the lowpass filter envelope * @synonyms lps * @example * note("c3 e3 f3 g3 ab3 bb3") * .sound('square').cutoff(200) * .lpd(0.1).lpsustain("<0.1 0.5 0.75 1>") - * .fenv("2") + * .ftype("12db") */ ['lpsustain', 'lps'], + /** + * Sets the sustain amplitude for the highpass filter envelope. + * @name lpsustain + * @param {number | Pattern} sustain amplitude of the highpass filter envelope + * @synonyms hps + * @example + * note("c3 e3 f3 g3 ab3 bb3") + * .sound('square').hcutoff(200) + * .hpd(0.1).hpsustain("<0.1 0.5 0.75 1>") + * .ftype("12db") + */ + ['hpsustain', 'hps'], + /** + * Sets the sustain amplitude for the bandpass filter envelope. + * @name lpsustain + * @param {number | Pattern} sustain amplitude of the bandpass filter envelope + * @synonyms bps + * @example + * note("c3 e3 f3 g3 ab3 bb3") + * .sound('square').bandf(200) + * .bpd(0.1).bpsustain("<0.1 0.5 0.75 1>") + * .ftype("12db") + */ + ['bpsustain', 'bps'], /** * Sets the release time for the lowpass filter envelope. * @name lprelease * @param {number | Pattern} release time of the filter envelope * @synonyms lpr * @example - * note("c3 e3 g3 c4").lpr("<0.1 0.25 0.5>").fenv(0.5) + * note("c3 e3 g3 c4").lpr("<0.1 0.25 0.5>").ftype('12db') */ ['lprelease', 'lpr'], - ['hpattack', 'hpa'], - ['hpdecay', 'hpd'], - ['hpsustain', 'hps'], + /** + * Sets the release time for the highpass filter envelope. + * @name lprelease + * @param {number | Pattern} release time of the highpass filter envelope + * @synonyms hpr + * @example + * note("c3 e3 g3 c4").hpr("<0.1 0.25 0.5>").ftype('12db') + */ ['hprelease', 'hpr'], - ['bpattack', 'bpa'], - ['bpdecay', 'bpd'], - ['bpsustain', 'bps'], + /** + * Sets the release time for the bandpass filter envelope. + * @name lprelease + * @param {number | Pattern} release time of the bandpass filter envelope + * @synonyms bpr + * @example + * note("c3 e3 g3 c4").bpr("<0.1 0.25 0.5>").ftype('12db') + */ ['bprelease', 'bpr'], - ['order'], + ['ftype'], /** * Applies the cutoff frequency of the **h**igh-**p**ass **f**ilter. * diff --git a/packages/superdough/superdough.mjs b/packages/superdough/superdough.mjs index fda26277..3afe470e 100644 --- a/packages/superdough/superdough.mjs +++ b/packages/superdough/superdough.mjs @@ -178,7 +178,7 @@ export const superdough = async (value, deadline, hapDuration) => { source, gain = 0.8, // filters - order = '12db', + ftype = '12db', // low pass cutoff, lpenv, @@ -258,9 +258,21 @@ export const superdough = async (value, deadline, hapDuration) => { if (cutoff !== undefined) { let lp = () => - createFilter(ac, 'lowpass', cutoff, resonance, lpattack, lpdecay, lpsustain, lprelease, lpenv, t, t + hapDuration); + createFilter( + ac, + 'lowpass', + cutoff, + resonance, + lpattack, + lpdecay, + lpsustain, + lprelease, + lpenv, + t, + t + hapDuration, + ); chain.push(lp()); - if (order === '24db') { + if (ftype === '24db') { chain.push(lp()); } } @@ -281,7 +293,7 @@ export const superdough = async (value, deadline, hapDuration) => { t + hapDuration, ); chain.push(hp()); - if (order === '24db') { + if (ftype === '24db') { chain.push(hp()); } } @@ -290,7 +302,7 @@ export const superdough = async (value, deadline, hapDuration) => { let bp = () => createFilter(ac, 'bandpass', bandf, bandq, bpattack, bpdecay, bpsustain, bprelease, bpenv, t, t + hapDuration); chain.push(bp()); - if (order === '24db') { + if (ftype === '24db') { chain.push(bp()); } } diff --git a/test/__snapshots__/examples.test.mjs.snap b/test/__snapshots__/examples.test.mjs.snap index 60b39c53..4cb261ae 100644 --- a/test/__snapshots__/examples.test.mjs.snap +++ b/test/__snapshots__/examples.test.mjs.snap @@ -900,6 +900,56 @@ exports[`runs examples > example "begin" example index 0 1`] = ` ] `; +exports[`runs examples > example "bpdecay" example index 0 1`] = ` +[ + "[ 0/1 → 1/6 | note:c3 s:square bandf:1000 bpdecay:0.05 ftype:12db bpsustain:0 bprelease:0 ]", + "[ 1/6 → 1/3 | note:e3 s:square bandf:1000 bpdecay:0.05 ftype:12db bpsustain:0 bprelease:0 ]", + "[ 1/3 → 1/2 | note:f3 s:square bandf:1000 bpdecay:0.05 ftype:12db bpsustain:0 bprelease:0 ]", + "[ 1/2 → 2/3 | note:g3 s:square bandf:1000 bpdecay:0.05 ftype:12db bpsustain:0 bprelease:0 ]", + "[ 2/3 → 5/6 | note:ab3 s:square bandf:1000 bpdecay:0.05 ftype:12db bpsustain:0 bprelease:0 ]", + "[ 5/6 → 1/1 | note:bb3 s:square bandf:1000 bpdecay:0.05 ftype:12db bpsustain:0 bprelease:0 ]", + "[ 1/1 → 7/6 | note:c3 s:square bandf:1000 bpdecay:0.05 ftype:12db bpsustain:0 bprelease:0 ]", + "[ 7/6 → 4/3 | note:e3 s:square bandf:1000 bpdecay:0.05 ftype:12db bpsustain:0 bprelease:0 ]", + "[ 4/3 → 3/2 | note:f3 s:square bandf:1000 bpdecay:0.05 ftype:12db bpsustain:0 bprelease:0 ]", + "[ 3/2 → 5/3 | note:g3 s:square bandf:1000 bpdecay:0.05 ftype:12db bpsustain:0 bprelease:0 ]", + "[ 5/3 → 11/6 | note:ab3 s:square bandf:1000 bpdecay:0.05 ftype:12db bpsustain:0 bprelease:0 ]", + "[ 11/6 → 2/1 | note:bb3 s:square bandf:1000 bpdecay:0.05 ftype:12db bpsustain:0 bprelease:0 ]", + "[ 2/1 → 13/6 | note:c3 s:square bandf:1000 bpdecay:0.1 ftype:12db bpsustain:0 bprelease:0 ]", + "[ 13/6 → 7/3 | note:e3 s:square bandf:1000 bpdecay:0.1 ftype:12db bpsustain:0 bprelease:0 ]", + "[ 7/3 → 5/2 | note:f3 s:square bandf:1000 bpdecay:0.1 ftype:12db bpsustain:0 bprelease:0 ]", + "[ 5/2 → 8/3 | note:g3 s:square bandf:1000 bpdecay:0.1 ftype:12db bpsustain:0 bprelease:0 ]", + "[ 8/3 → 17/6 | note:ab3 s:square bandf:1000 bpdecay:0.1 ftype:12db bpsustain:0 bprelease:0 ]", + "[ 17/6 → 3/1 | note:bb3 s:square bandf:1000 bpdecay:0.1 ftype:12db bpsustain:0 bprelease:0 ]", + "[ 3/1 → 19/6 | note:c3 s:square bandf:1000 bpdecay:0.1 ftype:12db bpsustain:0 bprelease:0 ]", + "[ 19/6 → 10/3 | note:e3 s:square bandf:1000 bpdecay:0.1 ftype:12db bpsustain:0 bprelease:0 ]", + "[ 10/3 → 7/2 | note:f3 s:square bandf:1000 bpdecay:0.1 ftype:12db bpsustain:0 bprelease:0 ]", + "[ 7/2 → 11/3 | note:g3 s:square bandf:1000 bpdecay:0.1 ftype:12db bpsustain:0 bprelease:0 ]", + "[ 11/3 → 23/6 | note:ab3 s:square bandf:1000 bpdecay:0.1 ftype:12db bpsustain:0 bprelease:0 ]", + "[ 23/6 → 4/1 | note:bb3 s:square bandf:1000 bpdecay:0.1 ftype:12db bpsustain:0 bprelease:0 ]", +] +`; + +exports[`runs examples > example "bpenv" example index 0 1`] = ` +[ + "[ 0/1 → 1/4 | note:c2 s:sawtooth bandf:500 bpenv:1 ]", + "[ 1/4 → 1/2 | note:c3 s:sawtooth bandf:500 bpenv:1 ]", + "[ 1/2 → 3/4 | note:c2 s:sawtooth bandf:500 bpenv:1 ]", + "[ 3/4 → 1/1 | note:c3 s:sawtooth bandf:500 bpenv:1 ]", + "[ 1/1 → 5/4 | note:c2 s:sawtooth bandf:500 bpenv:2 ]", + "[ 5/4 → 3/2 | note:c3 s:sawtooth bandf:500 bpenv:2 ]", + "[ 3/2 → 7/4 | note:c2 s:sawtooth bandf:500 bpenv:2 ]", + "[ 7/4 → 2/1 | note:c3 s:sawtooth bandf:500 bpenv:2 ]", + "[ 2/1 → 9/4 | note:c2 s:sawtooth bandf:500 bpenv:3 ]", + "[ 9/4 → 5/2 | note:c3 s:sawtooth bandf:500 bpenv:3 ]", + "[ 5/2 → 11/4 | note:c2 s:sawtooth bandf:500 bpenv:3 ]", + "[ 11/4 → 3/1 | note:c3 s:sawtooth bandf:500 bpenv:3 ]", + "[ 3/1 → 13/4 | note:c2 s:sawtooth bandf:500 bpenv:4 ]", + "[ 13/4 → 7/2 | note:c3 s:sawtooth bandf:500 bpenv:4 ]", + "[ 7/2 → 15/4 | note:c2 s:sawtooth bandf:500 bpenv:4 ]", + "[ 15/4 → 4/1 | note:c3 s:sawtooth bandf:500 bpenv:4 ]", +] +`; + exports[`runs examples > example "bpf" example index 0 1`] = ` [ "[ 0/1 → 1/3 | s:hh bandf:1000 ]", @@ -2050,6 +2100,114 @@ exports[`runs examples > example "gain" example index 0 1`] = ` ] `; +exports[`runs examples > example "hpattack" example index 0 1`] = ` +[ + "[ 0/1 → 1/6 | note:c3 s:square hcutoff:1000 hpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 1/6 → 1/3 | note:e3 s:square hcutoff:1000 hpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 1/3 → 1/2 | note:f3 s:square hcutoff:1000 hpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 1/2 → 2/3 | note:g3 s:square hcutoff:1000 hpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 2/3 → 5/6 | note:ab3 s:square hcutoff:1000 hpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 5/6 → 1/1 | note:bb3 s:square hcutoff:1000 hpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 1/1 → 7/6 | note:c3 s:square hcutoff:1000 hpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 7/6 → 4/3 | note:e3 s:square hcutoff:1000 hpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 4/3 → 3/2 | note:f3 s:square hcutoff:1000 hpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 3/2 → 5/3 | note:g3 s:square hcutoff:1000 hpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 5/3 → 11/6 | note:ab3 s:square hcutoff:1000 hpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 11/6 → 2/1 | note:bb3 s:square hcutoff:1000 hpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 2/1 → 13/6 | note:c3 s:square hcutoff:1000 hpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 13/6 → 7/3 | note:e3 s:square hcutoff:1000 hpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 7/3 → 5/2 | note:f3 s:square hcutoff:1000 hpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 5/2 → 8/3 | note:g3 s:square hcutoff:1000 hpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 8/3 → 17/6 | note:ab3 s:square hcutoff:1000 hpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 17/6 → 3/1 | note:bb3 s:square hcutoff:1000 hpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 3/1 → 19/6 | note:c3 s:square hcutoff:1000 hpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 19/6 → 10/3 | note:e3 s:square hcutoff:1000 hpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 10/3 → 7/2 | note:f3 s:square hcutoff:1000 hpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 7/2 → 11/3 | note:g3 s:square hcutoff:1000 hpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 11/3 → 23/6 | note:ab3 s:square hcutoff:1000 hpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 23/6 → 4/1 | note:bb3 s:square hcutoff:1000 hpattack:0.1 ftype:12db release:0.2 attack:0 ]", +] +`; + +exports[`runs examples > example "hpattack" example index 0 2`] = ` +[ + "[ 0/1 → 1/6 | note:c3 s:square bandf:1000 bpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 1/6 → 1/3 | note:e3 s:square bandf:1000 bpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 1/3 → 1/2 | note:f3 s:square bandf:1000 bpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 1/2 → 2/3 | note:g3 s:square bandf:1000 bpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 2/3 → 5/6 | note:ab3 s:square bandf:1000 bpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 5/6 → 1/1 | note:bb3 s:square bandf:1000 bpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 1/1 → 7/6 | note:c3 s:square bandf:1000 bpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 7/6 → 4/3 | note:e3 s:square bandf:1000 bpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 4/3 → 3/2 | note:f3 s:square bandf:1000 bpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 3/2 → 5/3 | note:g3 s:square bandf:1000 bpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 5/3 → 11/6 | note:ab3 s:square bandf:1000 bpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 11/6 → 2/1 | note:bb3 s:square bandf:1000 bpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 2/1 → 13/6 | note:c3 s:square bandf:1000 bpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 13/6 → 7/3 | note:e3 s:square bandf:1000 bpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 7/3 → 5/2 | note:f3 s:square bandf:1000 bpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 5/2 → 8/3 | note:g3 s:square bandf:1000 bpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 8/3 → 17/6 | note:ab3 s:square bandf:1000 bpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 17/6 → 3/1 | note:bb3 s:square bandf:1000 bpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 3/1 → 19/6 | note:c3 s:square bandf:1000 bpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 19/6 → 10/3 | note:e3 s:square bandf:1000 bpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 10/3 → 7/2 | note:f3 s:square bandf:1000 bpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 7/2 → 11/3 | note:g3 s:square bandf:1000 bpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 11/3 → 23/6 | note:ab3 s:square bandf:1000 bpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 23/6 → 4/1 | note:bb3 s:square bandf:1000 bpattack:0.1 ftype:12db release:0.2 attack:0 ]", +] +`; + +exports[`runs examples > example "hpdecay" example index 0 1`] = ` +[ + "[ 0/1 → 1/6 | note:c3 s:square hcutoff:1000 hpdecay:0.05 ftype:12db hpsustain:0 hprelease:0 ]", + "[ 1/6 → 1/3 | note:e3 s:square hcutoff:1000 hpdecay:0.05 ftype:12db hpsustain:0 hprelease:0 ]", + "[ 1/3 → 1/2 | note:f3 s:square hcutoff:1000 hpdecay:0.05 ftype:12db hpsustain:0 hprelease:0 ]", + "[ 1/2 → 2/3 | note:g3 s:square hcutoff:1000 hpdecay:0.05 ftype:12db hpsustain:0 hprelease:0 ]", + "[ 2/3 → 5/6 | note:ab3 s:square hcutoff:1000 hpdecay:0.05 ftype:12db hpsustain:0 hprelease:0 ]", + "[ 5/6 → 1/1 | note:bb3 s:square hcutoff:1000 hpdecay:0.05 ftype:12db hpsustain:0 hprelease:0 ]", + "[ 1/1 → 7/6 | note:c3 s:square hcutoff:1000 hpdecay:0.05 ftype:12db hpsustain:0 hprelease:0 ]", + "[ 7/6 → 4/3 | note:e3 s:square hcutoff:1000 hpdecay:0.05 ftype:12db hpsustain:0 hprelease:0 ]", + "[ 4/3 → 3/2 | note:f3 s:square hcutoff:1000 hpdecay:0.05 ftype:12db hpsustain:0 hprelease:0 ]", + "[ 3/2 → 5/3 | note:g3 s:square hcutoff:1000 hpdecay:0.05 ftype:12db hpsustain:0 hprelease:0 ]", + "[ 5/3 → 11/6 | note:ab3 s:square hcutoff:1000 hpdecay:0.05 ftype:12db hpsustain:0 hprelease:0 ]", + "[ 11/6 → 2/1 | note:bb3 s:square hcutoff:1000 hpdecay:0.05 ftype:12db hpsustain:0 hprelease:0 ]", + "[ 2/1 → 13/6 | note:c3 s:square hcutoff:1000 hpdecay:0.1 ftype:12db hpsustain:0 hprelease:0 ]", + "[ 13/6 → 7/3 | note:e3 s:square hcutoff:1000 hpdecay:0.1 ftype:12db hpsustain:0 hprelease:0 ]", + "[ 7/3 → 5/2 | note:f3 s:square hcutoff:1000 hpdecay:0.1 ftype:12db hpsustain:0 hprelease:0 ]", + "[ 5/2 → 8/3 | note:g3 s:square hcutoff:1000 hpdecay:0.1 ftype:12db hpsustain:0 hprelease:0 ]", + "[ 8/3 → 17/6 | note:ab3 s:square hcutoff:1000 hpdecay:0.1 ftype:12db hpsustain:0 hprelease:0 ]", + "[ 17/6 → 3/1 | note:bb3 s:square hcutoff:1000 hpdecay:0.1 ftype:12db hpsustain:0 hprelease:0 ]", + "[ 3/1 → 19/6 | note:c3 s:square hcutoff:1000 hpdecay:0.1 ftype:12db hpsustain:0 hprelease:0 ]", + "[ 19/6 → 10/3 | note:e3 s:square hcutoff:1000 hpdecay:0.1 ftype:12db hpsustain:0 hprelease:0 ]", + "[ 10/3 → 7/2 | note:f3 s:square hcutoff:1000 hpdecay:0.1 ftype:12db hpsustain:0 hprelease:0 ]", + "[ 7/2 → 11/3 | note:g3 s:square hcutoff:1000 hpdecay:0.1 ftype:12db hpsustain:0 hprelease:0 ]", + "[ 11/3 → 23/6 | note:ab3 s:square hcutoff:1000 hpdecay:0.1 ftype:12db hpsustain:0 hprelease:0 ]", + "[ 23/6 → 4/1 | note:bb3 s:square hcutoff:1000 hpdecay:0.1 ftype:12db hpsustain:0 hprelease:0 ]", +] +`; + +exports[`runs examples > example "hpenv" example index 0 1`] = ` +[ + "[ 0/1 → 1/4 | note:c2 s:sawtooth hcutoff:500 hpenv:1 ]", + "[ 1/4 → 1/2 | note:c3 s:sawtooth hcutoff:500 hpenv:1 ]", + "[ 1/2 → 3/4 | note:c2 s:sawtooth hcutoff:500 hpenv:1 ]", + "[ 3/4 → 1/1 | note:c3 s:sawtooth hcutoff:500 hpenv:1 ]", + "[ 1/1 → 5/4 | note:c2 s:sawtooth hcutoff:500 hpenv:2 ]", + "[ 5/4 → 3/2 | note:c3 s:sawtooth hcutoff:500 hpenv:2 ]", + "[ 3/2 → 7/4 | note:c2 s:sawtooth hcutoff:500 hpenv:2 ]", + "[ 7/4 → 2/1 | note:c3 s:sawtooth hcutoff:500 hpenv:2 ]", + "[ 2/1 → 9/4 | note:c2 s:sawtooth hcutoff:500 hpenv:3 ]", + "[ 9/4 → 5/2 | note:c3 s:sawtooth hcutoff:500 hpenv:3 ]", + "[ 5/2 → 11/4 | note:c2 s:sawtooth hcutoff:500 hpenv:3 ]", + "[ 11/4 → 3/1 | note:c3 s:sawtooth hcutoff:500 hpenv:3 ]", + "[ 3/1 → 13/4 | note:c2 s:sawtooth hcutoff:500 hpenv:4 ]", + "[ 13/4 → 7/2 | note:c3 s:sawtooth hcutoff:500 hpenv:4 ]", + "[ 7/2 → 15/4 | note:c2 s:sawtooth hcutoff:500 hpenv:4 ]", + "[ 15/4 → 4/1 | note:c3 s:sawtooth hcutoff:500 hpenv:4 ]", +] +`; + exports[`runs examples > example "hpf" example index 0 1`] = ` [ "[ 0/1 → 1/4 | s:hh hcutoff:4000 ]", @@ -2566,6 +2724,85 @@ exports[`runs examples > example "loopAtCps" example index 0 1`] = ` ] `; +exports[`runs examples > example "lpattack" example index 0 1`] = ` +[ + "[ 0/1 → 1/6 | note:c3 s:square cutoff:1000 lpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 1/6 → 1/3 | note:e3 s:square cutoff:1000 lpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 1/3 → 1/2 | note:f3 s:square cutoff:1000 lpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 1/2 → 2/3 | note:g3 s:square cutoff:1000 lpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 2/3 → 5/6 | note:ab3 s:square cutoff:1000 lpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 5/6 → 1/1 | note:bb3 s:square cutoff:1000 lpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 1/1 → 7/6 | note:c3 s:square cutoff:1000 lpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 7/6 → 4/3 | note:e3 s:square cutoff:1000 lpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 4/3 → 3/2 | note:f3 s:square cutoff:1000 lpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 3/2 → 5/3 | note:g3 s:square cutoff:1000 lpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 5/3 → 11/6 | note:ab3 s:square cutoff:1000 lpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 11/6 → 2/1 | note:bb3 s:square cutoff:1000 lpattack:0.05 ftype:12db release:0.2 attack:0 ]", + "[ 2/1 → 13/6 | note:c3 s:square cutoff:1000 lpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 13/6 → 7/3 | note:e3 s:square cutoff:1000 lpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 7/3 → 5/2 | note:f3 s:square cutoff:1000 lpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 5/2 → 8/3 | note:g3 s:square cutoff:1000 lpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 8/3 → 17/6 | note:ab3 s:square cutoff:1000 lpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 17/6 → 3/1 | note:bb3 s:square cutoff:1000 lpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 3/1 → 19/6 | note:c3 s:square cutoff:1000 lpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 19/6 → 10/3 | note:e3 s:square cutoff:1000 lpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 10/3 → 7/2 | note:f3 s:square cutoff:1000 lpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 7/2 → 11/3 | note:g3 s:square cutoff:1000 lpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 11/3 → 23/6 | note:ab3 s:square cutoff:1000 lpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 23/6 → 4/1 | note:bb3 s:square cutoff:1000 lpattack:0.1 ftype:12db release:0.2 attack:0 ]", +] +`; + +exports[`runs examples > example "lpdecay" example index 0 1`] = ` +[ + "[ 0/1 → 1/6 | note:c3 s:square cutoff:1000 lpdecay:0.05 ftype:12db lpsustain:0 lprelease:0 ]", + "[ 1/6 → 1/3 | note:e3 s:square cutoff:1000 lpdecay:0.05 ftype:12db lpsustain:0 lprelease:0 ]", + "[ 1/3 → 1/2 | note:f3 s:square cutoff:1000 lpdecay:0.05 ftype:12db lpsustain:0 lprelease:0 ]", + "[ 1/2 → 2/3 | note:g3 s:square cutoff:1000 lpdecay:0.05 ftype:12db lpsustain:0 lprelease:0 ]", + "[ 2/3 → 5/6 | note:ab3 s:square cutoff:1000 lpdecay:0.05 ftype:12db lpsustain:0 lprelease:0 ]", + "[ 5/6 → 1/1 | note:bb3 s:square cutoff:1000 lpdecay:0.05 ftype:12db lpsustain:0 lprelease:0 ]", + "[ 1/1 → 7/6 | note:c3 s:square cutoff:1000 lpdecay:0.05 ftype:12db lpsustain:0 lprelease:0 ]", + "[ 7/6 → 4/3 | note:e3 s:square cutoff:1000 lpdecay:0.05 ftype:12db lpsustain:0 lprelease:0 ]", + "[ 4/3 → 3/2 | note:f3 s:square cutoff:1000 lpdecay:0.05 ftype:12db lpsustain:0 lprelease:0 ]", + "[ 3/2 → 5/3 | note:g3 s:square cutoff:1000 lpdecay:0.05 ftype:12db lpsustain:0 lprelease:0 ]", + "[ 5/3 → 11/6 | note:ab3 s:square cutoff:1000 lpdecay:0.05 ftype:12db lpsustain:0 lprelease:0 ]", + "[ 11/6 → 2/1 | note:bb3 s:square cutoff:1000 lpdecay:0.05 ftype:12db lpsustain:0 lprelease:0 ]", + "[ 2/1 → 13/6 | note:c3 s:square cutoff:1000 lpdecay:0.1 ftype:12db lpsustain:0 lprelease:0 ]", + "[ 13/6 → 7/3 | note:e3 s:square cutoff:1000 lpdecay:0.1 ftype:12db lpsustain:0 lprelease:0 ]", + "[ 7/3 → 5/2 | note:f3 s:square cutoff:1000 lpdecay:0.1 ftype:12db lpsustain:0 lprelease:0 ]", + "[ 5/2 → 8/3 | note:g3 s:square cutoff:1000 lpdecay:0.1 ftype:12db lpsustain:0 lprelease:0 ]", + "[ 8/3 → 17/6 | note:ab3 s:square cutoff:1000 lpdecay:0.1 ftype:12db lpsustain:0 lprelease:0 ]", + "[ 17/6 → 3/1 | note:bb3 s:square cutoff:1000 lpdecay:0.1 ftype:12db lpsustain:0 lprelease:0 ]", + "[ 3/1 → 19/6 | note:c3 s:square cutoff:1000 lpdecay:0.1 ftype:12db lpsustain:0 lprelease:0 ]", + "[ 19/6 → 10/3 | note:e3 s:square cutoff:1000 lpdecay:0.1 ftype:12db lpsustain:0 lprelease:0 ]", + "[ 10/3 → 7/2 | note:f3 s:square cutoff:1000 lpdecay:0.1 ftype:12db lpsustain:0 lprelease:0 ]", + "[ 7/2 → 11/3 | note:g3 s:square cutoff:1000 lpdecay:0.1 ftype:12db lpsustain:0 lprelease:0 ]", + "[ 11/3 → 23/6 | note:ab3 s:square cutoff:1000 lpdecay:0.1 ftype:12db lpsustain:0 lprelease:0 ]", + "[ 23/6 → 4/1 | note:bb3 s:square cutoff:1000 lpdecay:0.1 ftype:12db lpsustain:0 lprelease:0 ]", +] +`; + +exports[`runs examples > example "lpenv" example index 0 1`] = ` +[ + "[ 0/1 → 1/4 | note:c2 s:sawtooth cutoff:500 lpenv:1 ]", + "[ 1/4 → 1/2 | note:c3 s:sawtooth cutoff:500 lpenv:1 ]", + "[ 1/2 → 3/4 | note:c2 s:sawtooth cutoff:500 lpenv:1 ]", + "[ 3/4 → 1/1 | note:c3 s:sawtooth cutoff:500 lpenv:1 ]", + "[ 1/1 → 5/4 | note:c2 s:sawtooth cutoff:500 lpenv:2 ]", + "[ 5/4 → 3/2 | note:c3 s:sawtooth cutoff:500 lpenv:2 ]", + "[ 3/2 → 7/4 | note:c2 s:sawtooth cutoff:500 lpenv:2 ]", + "[ 7/4 → 2/1 | note:c3 s:sawtooth cutoff:500 lpenv:2 ]", + "[ 2/1 → 9/4 | note:c2 s:sawtooth cutoff:500 lpenv:3 ]", + "[ 9/4 → 5/2 | note:c3 s:sawtooth cutoff:500 lpenv:3 ]", + "[ 5/2 → 11/4 | note:c2 s:sawtooth cutoff:500 lpenv:3 ]", + "[ 11/4 → 3/1 | note:c3 s:sawtooth cutoff:500 lpenv:3 ]", + "[ 3/1 → 13/4 | note:c2 s:sawtooth cutoff:500 lpenv:4 ]", + "[ 13/4 → 7/2 | note:c3 s:sawtooth cutoff:500 lpenv:4 ]", + "[ 7/2 → 15/4 | note:c2 s:sawtooth cutoff:500 lpenv:4 ]", + "[ 15/4 → 4/1 | note:c3 s:sawtooth cutoff:500 lpenv:4 ]", +] +`; + exports[`runs examples > example "lpf" example index 0 1`] = ` [ "[ 0/1 → 1/3 | s:hh cutoff:4000 ]", @@ -2657,6 +2894,156 @@ exports[`runs examples > example "lpq" example index 0 1`] = ` ] `; +exports[`runs examples > example "lprelease" example index 0 1`] = ` +[ + "[ 0/1 → 1/4 | note:c3 lprelease:0.1 ftype:12db ]", + "[ 1/4 → 1/2 | note:e3 lprelease:0.1 ftype:12db ]", + "[ 1/2 → 3/4 | note:g3 lprelease:0.1 ftype:12db ]", + "[ 3/4 → 1/1 | note:c4 lprelease:0.1 ftype:12db ]", + "[ 1/1 → 5/4 | note:c3 lprelease:0.25 ftype:12db ]", + "[ 5/4 → 3/2 | note:e3 lprelease:0.25 ftype:12db ]", + "[ 3/2 → 7/4 | note:g3 lprelease:0.25 ftype:12db ]", + "[ 7/4 → 2/1 | note:c4 lprelease:0.25 ftype:12db ]", + "[ 2/1 → 9/4 | note:c3 lprelease:0.5 ftype:12db ]", + "[ 9/4 → 5/2 | note:e3 lprelease:0.5 ftype:12db ]", + "[ 5/2 → 11/4 | note:g3 lprelease:0.5 ftype:12db ]", + "[ 11/4 → 3/1 | note:c4 lprelease:0.5 ftype:12db ]", + "[ 3/1 → 13/4 | note:c3 lprelease:0.1 ftype:12db ]", + "[ 13/4 → 7/2 | note:e3 lprelease:0.1 ftype:12db ]", + "[ 7/2 → 15/4 | note:g3 lprelease:0.1 ftype:12db ]", + "[ 15/4 → 4/1 | note:c4 lprelease:0.1 ftype:12db ]", +] +`; + +exports[`runs examples > example "lprelease" example index 0 2`] = ` +[ + "[ 0/1 → 1/4 | note:c3 hprelease:0.1 ftype:12db ]", + "[ 1/4 → 1/2 | note:e3 hprelease:0.1 ftype:12db ]", + "[ 1/2 → 3/4 | note:g3 hprelease:0.1 ftype:12db ]", + "[ 3/4 → 1/1 | note:c4 hprelease:0.1 ftype:12db ]", + "[ 1/1 → 5/4 | note:c3 hprelease:0.25 ftype:12db ]", + "[ 5/4 → 3/2 | note:e3 hprelease:0.25 ftype:12db ]", + "[ 3/2 → 7/4 | note:g3 hprelease:0.25 ftype:12db ]", + "[ 7/4 → 2/1 | note:c4 hprelease:0.25 ftype:12db ]", + "[ 2/1 → 9/4 | note:c3 hprelease:0.5 ftype:12db ]", + "[ 9/4 → 5/2 | note:e3 hprelease:0.5 ftype:12db ]", + "[ 5/2 → 11/4 | note:g3 hprelease:0.5 ftype:12db ]", + "[ 11/4 → 3/1 | note:c4 hprelease:0.5 ftype:12db ]", + "[ 3/1 → 13/4 | note:c3 hprelease:0.1 ftype:12db ]", + "[ 13/4 → 7/2 | note:e3 hprelease:0.1 ftype:12db ]", + "[ 7/2 → 15/4 | note:g3 hprelease:0.1 ftype:12db ]", + "[ 15/4 → 4/1 | note:c4 hprelease:0.1 ftype:12db ]", +] +`; + +exports[`runs examples > example "lprelease" example index 0 3`] = ` +[ + "[ 0/1 → 1/4 | note:c3 bprelease:0.1 ftype:12db ]", + "[ 1/4 → 1/2 | note:e3 bprelease:0.1 ftype:12db ]", + "[ 1/2 → 3/4 | note:g3 bprelease:0.1 ftype:12db ]", + "[ 3/4 → 1/1 | note:c4 bprelease:0.1 ftype:12db ]", + "[ 1/1 → 5/4 | note:c3 bprelease:0.25 ftype:12db ]", + "[ 5/4 → 3/2 | note:e3 bprelease:0.25 ftype:12db ]", + "[ 3/2 → 7/4 | note:g3 bprelease:0.25 ftype:12db ]", + "[ 7/4 → 2/1 | note:c4 bprelease:0.25 ftype:12db ]", + "[ 2/1 → 9/4 | note:c3 bprelease:0.5 ftype:12db ]", + "[ 9/4 → 5/2 | note:e3 bprelease:0.5 ftype:12db ]", + "[ 5/2 → 11/4 | note:g3 bprelease:0.5 ftype:12db ]", + "[ 11/4 → 3/1 | note:c4 bprelease:0.5 ftype:12db ]", + "[ 3/1 → 13/4 | note:c3 bprelease:0.1 ftype:12db ]", + "[ 13/4 → 7/2 | note:e3 bprelease:0.1 ftype:12db ]", + "[ 7/2 → 15/4 | note:g3 bprelease:0.1 ftype:12db ]", + "[ 15/4 → 4/1 | note:c4 bprelease:0.1 ftype:12db ]", +] +`; + +exports[`runs examples > example "lpsustain" example index 0 1`] = ` +[ + "[ 0/1 → 1/6 | note:c3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.1 ftype:12db ]", + "[ 1/6 → 1/3 | note:e3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.1 ftype:12db ]", + "[ 1/3 → 1/2 | note:f3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.1 ftype:12db ]", + "[ 1/2 → 2/3 | note:g3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.1 ftype:12db ]", + "[ 2/3 → 5/6 | note:ab3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.1 ftype:12db ]", + "[ 5/6 → 1/1 | note:bb3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.1 ftype:12db ]", + "[ 1/1 → 7/6 | note:c3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.5 ftype:12db ]", + "[ 7/6 → 4/3 | note:e3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.5 ftype:12db ]", + "[ 4/3 → 3/2 | note:f3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.5 ftype:12db ]", + "[ 3/2 → 5/3 | note:g3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.5 ftype:12db ]", + "[ 5/3 → 11/6 | note:ab3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.5 ftype:12db ]", + "[ 11/6 → 2/1 | note:bb3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.5 ftype:12db ]", + "[ 2/1 → 13/6 | note:c3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.75 ftype:12db ]", + "[ 13/6 → 7/3 | note:e3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.75 ftype:12db ]", + "[ 7/3 → 5/2 | note:f3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.75 ftype:12db ]", + "[ 5/2 → 8/3 | note:g3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.75 ftype:12db ]", + "[ 8/3 → 17/6 | note:ab3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.75 ftype:12db ]", + "[ 17/6 → 3/1 | note:bb3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.75 ftype:12db ]", + "[ 3/1 → 19/6 | note:c3 s:square cutoff:200 lpdecay:0.1 lpsustain:1 ftype:12db ]", + "[ 19/6 → 10/3 | note:e3 s:square cutoff:200 lpdecay:0.1 lpsustain:1 ftype:12db ]", + "[ 10/3 → 7/2 | note:f3 s:square cutoff:200 lpdecay:0.1 lpsustain:1 ftype:12db ]", + "[ 7/2 → 11/3 | note:g3 s:square cutoff:200 lpdecay:0.1 lpsustain:1 ftype:12db ]", + "[ 11/3 → 23/6 | note:ab3 s:square cutoff:200 lpdecay:0.1 lpsustain:1 ftype:12db ]", + "[ 23/6 → 4/1 | note:bb3 s:square cutoff:200 lpdecay:0.1 lpsustain:1 ftype:12db ]", +] +`; + +exports[`runs examples > example "lpsustain" example index 0 2`] = ` +[ + "[ 0/1 → 1/6 | note:c3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.1 ftype:12db ]", + "[ 1/6 → 1/3 | note:e3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.1 ftype:12db ]", + "[ 1/3 → 1/2 | note:f3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.1 ftype:12db ]", + "[ 1/2 → 2/3 | note:g3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.1 ftype:12db ]", + "[ 2/3 → 5/6 | note:ab3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.1 ftype:12db ]", + "[ 5/6 → 1/1 | note:bb3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.1 ftype:12db ]", + "[ 1/1 → 7/6 | note:c3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.5 ftype:12db ]", + "[ 7/6 → 4/3 | note:e3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.5 ftype:12db ]", + "[ 4/3 → 3/2 | note:f3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.5 ftype:12db ]", + "[ 3/2 → 5/3 | note:g3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.5 ftype:12db ]", + "[ 5/3 → 11/6 | note:ab3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.5 ftype:12db ]", + "[ 11/6 → 2/1 | note:bb3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.5 ftype:12db ]", + "[ 2/1 → 13/6 | note:c3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.75 ftype:12db ]", + "[ 13/6 → 7/3 | note:e3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.75 ftype:12db ]", + "[ 7/3 → 5/2 | note:f3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.75 ftype:12db ]", + "[ 5/2 → 8/3 | note:g3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.75 ftype:12db ]", + "[ 8/3 → 17/6 | note:ab3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.75 ftype:12db ]", + "[ 17/6 → 3/1 | note:bb3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.75 ftype:12db ]", + "[ 3/1 → 19/6 | note:c3 s:square hcutoff:200 hpdecay:0.1 hpsustain:1 ftype:12db ]", + "[ 19/6 → 10/3 | note:e3 s:square hcutoff:200 hpdecay:0.1 hpsustain:1 ftype:12db ]", + "[ 10/3 → 7/2 | note:f3 s:square hcutoff:200 hpdecay:0.1 hpsustain:1 ftype:12db ]", + "[ 7/2 → 11/3 | note:g3 s:square hcutoff:200 hpdecay:0.1 hpsustain:1 ftype:12db ]", + "[ 11/3 → 23/6 | note:ab3 s:square hcutoff:200 hpdecay:0.1 hpsustain:1 ftype:12db ]", + "[ 23/6 → 4/1 | note:bb3 s:square hcutoff:200 hpdecay:0.1 hpsustain:1 ftype:12db ]", +] +`; + +exports[`runs examples > example "lpsustain" example index 0 3`] = ` +[ + "[ 0/1 → 1/6 | note:c3 s:square bandf:200 bpdecay:0.1 bpsustain:0.1 ftype:12db ]", + "[ 1/6 → 1/3 | note:e3 s:square bandf:200 bpdecay:0.1 bpsustain:0.1 ftype:12db ]", + "[ 1/3 → 1/2 | note:f3 s:square bandf:200 bpdecay:0.1 bpsustain:0.1 ftype:12db ]", + "[ 1/2 → 2/3 | note:g3 s:square bandf:200 bpdecay:0.1 bpsustain:0.1 ftype:12db ]", + "[ 2/3 → 5/6 | note:ab3 s:square bandf:200 bpdecay:0.1 bpsustain:0.1 ftype:12db ]", + "[ 5/6 → 1/1 | note:bb3 s:square bandf:200 bpdecay:0.1 bpsustain:0.1 ftype:12db ]", + "[ 1/1 → 7/6 | note:c3 s:square bandf:200 bpdecay:0.1 bpsustain:0.5 ftype:12db ]", + "[ 7/6 → 4/3 | note:e3 s:square bandf:200 bpdecay:0.1 bpsustain:0.5 ftype:12db ]", + "[ 4/3 → 3/2 | note:f3 s:square bandf:200 bpdecay:0.1 bpsustain:0.5 ftype:12db ]", + "[ 3/2 → 5/3 | note:g3 s:square bandf:200 bpdecay:0.1 bpsustain:0.5 ftype:12db ]", + "[ 5/3 → 11/6 | note:ab3 s:square bandf:200 bpdecay:0.1 bpsustain:0.5 ftype:12db ]", + "[ 11/6 → 2/1 | note:bb3 s:square bandf:200 bpdecay:0.1 bpsustain:0.5 ftype:12db ]", + "[ 2/1 → 13/6 | note:c3 s:square bandf:200 bpdecay:0.1 bpsustain:0.75 ftype:12db ]", + "[ 13/6 → 7/3 | note:e3 s:square bandf:200 bpdecay:0.1 bpsustain:0.75 ftype:12db ]", + "[ 7/3 → 5/2 | note:f3 s:square bandf:200 bpdecay:0.1 bpsustain:0.75 ftype:12db ]", + "[ 5/2 → 8/3 | note:g3 s:square bandf:200 bpdecay:0.1 bpsustain:0.75 ftype:12db ]", + "[ 8/3 → 17/6 | note:ab3 s:square bandf:200 bpdecay:0.1 bpsustain:0.75 ftype:12db ]", + "[ 17/6 → 3/1 | note:bb3 s:square bandf:200 bpdecay:0.1 bpsustain:0.75 ftype:12db ]", + "[ 3/1 → 19/6 | note:c3 s:square bandf:200 bpdecay:0.1 bpsustain:1 ftype:12db ]", + "[ 19/6 → 10/3 | note:e3 s:square bandf:200 bpdecay:0.1 bpsustain:1 ftype:12db ]", + "[ 10/3 → 7/2 | note:f3 s:square bandf:200 bpdecay:0.1 bpsustain:1 ftype:12db ]", + "[ 7/2 → 11/3 | note:g3 s:square bandf:200 bpdecay:0.1 bpsustain:1 ftype:12db ]", + "[ 11/3 → 23/6 | note:ab3 s:square bandf:200 bpdecay:0.1 bpsustain:1 ftype:12db ]", + "[ 23/6 → 4/1 | note:bb3 s:square bandf:200 bpdecay:0.1 bpsustain:1 ftype:12db ]", +] +`; + exports[`runs examples > example "lrate" example index 0 1`] = ` [ "[ 0/1 → 1/1 | n:0 s:supersquare leslie:1 lrate:1 ]", From 3582ae9163e2c95bb7babe6fe4df4ebba44a65f7 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Sun, 10 Sep 2023 18:34:21 +0200 Subject: [PATCH 25/80] adding loopBegin and loopEnd --- packages/core/controls.mjs | 2 ++ packages/superdough/sampler.mjs | 17 +++++++---------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index 71f58427..2b99bdb3 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -882,6 +882,8 @@ const generic_params = [ ['zdelay'], ['tremolo'], ['zzfx'], + ['loopBegin'], + ['loopEnd'], ]; // TODO: slice / splice https://www.youtube.com/watch?v=hKhPdO0RKDQ&list=PL2lW1zNIIwj3bDkh-Y3LUGDuRcoUigoDs&index=13 diff --git a/packages/superdough/sampler.mjs b/packages/superdough/sampler.mjs index 02e5eada..60e61534 100644 --- a/packages/superdough/sampler.mjs +++ b/packages/superdough/sampler.mjs @@ -207,7 +207,9 @@ export async function onTriggerSample(t, value, onended, bank, resolveUrl) { n = 0, note, speed = 1, // sample playback speed + loopBegin = 0, begin = 0, + loopEnd = 1, end = 1, } = value; // load sample @@ -242,19 +244,14 @@ export async function onTriggerSample(t, value, onended, bank, resolveUrl) { // rather than the current playback rate, so even if the sound is playing at twice its normal speed, // the midway point through a 10-second audio buffer is still 5." const offset = begin * bufferSource.buffer.duration; - bufferSource.start(time, offset); const bufferDuration = bufferSource.buffer.duration / bufferSource.playbackRate.value; - /*if (loop) { - // TODO: idea for loopBegin / loopEnd - // if one of [loopBegin,loopEnd] is <= 1, interpret it as normlized - // if [loopBegin,loopEnd] is bigger >= 1, interpret it as sample number - // this will simplify perfectly looping things, while still keeping the normalized option - // the only drawback is that looping between samples 0 and 1 is not possible (which is not real use case) + if (loop) { bufferSource.loop = true; - bufferSource.loopStart = offset; - bufferSource.loopEnd = offset + duration; + bufferSource.loopStart = loopBegin * bufferDuration - offset; + bufferSource.loopEnd = loopEnd * bufferDuration - offset; duration = loop * duration; - }*/ + } + bufferSource.start(time, offset); const { node: envelope, stop: releaseEnvelope } = getEnvelope(attack, decay, sustain, release, 1, t); bufferSource.connect(envelope); const out = ac.createGain(); // we need a separate gain for the cutgroups because firefox... From bac8594c5f1db32d618696c1dacf41bb88a33fb4 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Sun, 10 Sep 2023 20:36:09 +0200 Subject: [PATCH 26/80] beginning documentation work (breaks) --- packages/core/controls.mjs | 39 ++++++++++++++++------- test/__snapshots__/examples.test.mjs.snap | 18 +++++++++++ website/src/pages/learn/synths.mdx | 11 +++++++ 3 files changed, 56 insertions(+), 12 deletions(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index 2b99bdb3..4d427da3 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -309,6 +309,33 @@ const generic_params = [ * */ ['loop'], + /** + * @name loopBegin + * @param {number | Pattern} amount between 0 and 1, where 1 is the length of the sample + * @synonyms loopb + * @example + * s("numbers").loopBegin("<0 .25 .5 .75>").loop(1) + * + */ + ['loopBegin', 'loopb'], + /** + * @name loopEnd + * @param {number | Pattern} amount between 0 and 1, where 1 is the length of the sample + * @synonyms loope + * @example + * s("numbers").loopEnd("<0 .25 .5 .75>").loop(1) + * + */ + ['loopEnd', 'loope'], + /** + * bit crusher effect. + * + * @name crush + * @param {number | Pattern} depth between 1 (for drastic reduction in bit-depth) to 16 (for barely no reduction). + * @example + * s(",hh*3").fast(2).crush("<16 8 7 6 5 4 3 2>") + * + */ // TODO: currently duplicated with "native" legato // TODO: superdirt legato will do more: https://youtu.be/dQPmE1WaD1k?t=419 /** @@ -323,15 +350,6 @@ const generic_params = [ */ // ['legato'], // ['clhatdecay'], - /** - * bit crusher effect. - * - * @name crush - * @param {number | Pattern} depth between 1 (for drastic reduction in bit-depth) to 16 (for barely no reduction). - * @example - * s(",hh*3").fast(2).crush("<16 8 7 6 5 4 3 2>") - * - */ ['crush'], /** * fake-resampling for lowering the sample rate. Caution: This effect seems to only work in chromium based browsers @@ -343,7 +361,6 @@ const generic_params = [ * */ ['coarse'], - /** * choose the channel the pattern is sent to in superdirt * @@ -882,8 +899,6 @@ const generic_params = [ ['zdelay'], ['tremolo'], ['zzfx'], - ['loopBegin'], - ['loopEnd'], ]; // TODO: slice / splice https://www.youtube.com/watch?v=hKhPdO0RKDQ&list=PL2lW1zNIIwj3bDkh-Y3LUGDuRcoUigoDs&index=13 diff --git a/test/__snapshots__/examples.test.mjs.snap b/test/__snapshots__/examples.test.mjs.snap index 60b39c53..3e2d81bd 100644 --- a/test/__snapshots__/examples.test.mjs.snap +++ b/test/__snapshots__/examples.test.mjs.snap @@ -2566,6 +2566,24 @@ exports[`runs examples > example "loopAtCps" example index 0 1`] = ` ] `; +exports[`runs examples > example "loopBegin" example index 0 1`] = ` +[ + "[ 0/1 → 1/1 | s:numbers loopBegin:0 loop:1 ]", + "[ 1/1 → 2/1 | s:numbers loopBegin:0.25 loop:1 ]", + "[ 2/1 → 3/1 | s:numbers loopBegin:0.5 loop:1 ]", + "[ 3/1 → 4/1 | s:numbers loopBegin:0.75 loop:1 ]", +] +`; + +exports[`runs examples > example "loopEnd" example index 0 1`] = ` +[ + "[ 0/1 → 1/1 | s:numbers loopEnd:0 loop:1 ]", + "[ 1/1 → 2/1 | s:numbers loopEnd:0.25 loop:1 ]", + "[ 2/1 → 3/1 | s:numbers loopEnd:0.5 loop:1 ]", + "[ 3/1 → 4/1 | s:numbers loopEnd:0.75 loop:1 ]", +] +`; + exports[`runs examples > example "lpf" example index 0 1`] = ` [ "[ 0/1 → 1/3 | s:hh cutoff:4000 ]", diff --git a/website/src/pages/learn/synths.mdx b/website/src/pages/learn/synths.mdx index b24726cf..6a2d7395 100644 --- a/website/src/pages/learn/synths.mdx +++ b/website/src/pages/learn/synths.mdx @@ -78,6 +78,17 @@ You can use fm with any of the above waveforms, although the below examples all +## Wavetable Synthesis + +Strudel can also use wavetables to create custom waveforms instead of the default ones used by WebAudio. There is a default set of wavetables accessible by default (approximatively 1000 coming from the [AKWF](https://www.adventurekid.se/akrt/waveforms/adventure-kid-waveforms/) set) but you can also import/use your own. A wavetable is a one-cycle waveform, which is then repeated to create a sound at the desired frequency. It is a classic but very effective synthesis technique. Wavetable synthesis is based on sample looping, using the `loop`, `loopBegin` and `loopEnd` properties of the sampler: + +- `loop`: either `0` (no loop) or `1` (loop) +- `loopBegin`: start of the loop (between 0 and 1) +- `loopEnd`: end of the loop (between 0 and 1) + + + + ## ZZFX The "Zuper Zmall Zound Zynth" [ZZFX](https://github.com/KilledByAPixel/ZzFX) is also integrated in strudel. From f09b89ed6320c3364b44aa60c9ec00a9efae4c72 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 10 Sep 2023 20:55:59 +0200 Subject: [PATCH 27/80] fix: duration for loops --- packages/superdough/sampler.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/superdough/sampler.mjs b/packages/superdough/sampler.mjs index 60e61534..13944299 100644 --- a/packages/superdough/sampler.mjs +++ b/packages/superdough/sampler.mjs @@ -262,7 +262,7 @@ export async function onTriggerSample(t, value, onended, bank, resolveUrl) { out.disconnect(); onended(); }; - const stop = (endTime, playWholeBuffer = clip === undefined) => { + const stop = (endTime, playWholeBuffer = clip === undefined && loop === undefined) => { let releaseTime = endTime; if (playWholeBuffer) { releaseTime = t + (end - begin) * bufferDuration; From ba27f2ba28a61fa4914ad394cc1e4c22946e000c Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 10 Sep 2023 21:05:57 +0200 Subject: [PATCH 28/80] fix: looped samples pitch --- packages/superdough/sampler.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/superdough/sampler.mjs b/packages/superdough/sampler.mjs index 13944299..26611c0a 100644 --- a/packages/superdough/sampler.mjs +++ b/packages/superdough/sampler.mjs @@ -244,11 +244,10 @@ export async function onTriggerSample(t, value, onended, bank, resolveUrl) { // rather than the current playback rate, so even if the sound is playing at twice its normal speed, // the midway point through a 10-second audio buffer is still 5." const offset = begin * bufferSource.buffer.duration; - const bufferDuration = bufferSource.buffer.duration / bufferSource.playbackRate.value; if (loop) { bufferSource.loop = true; - bufferSource.loopStart = loopBegin * bufferDuration - offset; - bufferSource.loopEnd = loopEnd * bufferDuration - offset; + bufferSource.loopStart = loopBegin * bufferSource.buffer.duration - offset; + bufferSource.loopEnd = loopEnd * bufferSource.buffer.duration - offset; duration = loop * duration; } bufferSource.start(time, offset); @@ -265,6 +264,7 @@ export async function onTriggerSample(t, value, onended, bank, resolveUrl) { const stop = (endTime, playWholeBuffer = clip === undefined && loop === undefined) => { let releaseTime = endTime; if (playWholeBuffer) { + const bufferDuration = bufferSource.buffer.duration / bufferSource.playbackRate.value; releaseTime = t + (end - begin) * bufferDuration; } bufferSource.stop(releaseTime + release); From 6de04f77817c4ed739ec580ef3b1d638a790490e Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Sun, 10 Sep 2023 23:29:09 +0200 Subject: [PATCH 29/80] turn loop on for samples starting with wt_ --- packages/superdough/sampler.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/superdough/sampler.mjs b/packages/superdough/sampler.mjs index 26611c0a..28f09082 100644 --- a/packages/superdough/sampler.mjs +++ b/packages/superdough/sampler.mjs @@ -196,7 +196,7 @@ export const samples = async (sampleMap, baseUrl = sampleMap._base || '', option const cutGroups = []; export async function onTriggerSample(t, value, onended, bank, resolveUrl) { - const { + let { s, freq, unit, @@ -217,6 +217,7 @@ export async function onTriggerSample(t, value, onended, bank, resolveUrl) { // no playback return; } + loop = s.startsWith('wt_') ? 1 : value.loop; const ac = getAudioContext(); // destructure adsr here, because the default should be different for synths and samples const { attack = 0.001, decay = 0.001, sustain = 1, release = 0.001 } = value; From 7a74189771f2d14ab584275d9423f158ebb4d1d9 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Mon, 11 Sep 2023 00:41:55 +0200 Subject: [PATCH 30/80] document wavetable synthesis --- website/src/pages/learn/synths.mdx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/website/src/pages/learn/synths.mdx b/website/src/pages/learn/synths.mdx index 6a2d7395..26e94467 100644 --- a/website/src/pages/learn/synths.mdx +++ b/website/src/pages/learn/synths.mdx @@ -80,14 +80,20 @@ You can use fm with any of the above waveforms, although the below examples all ## Wavetable Synthesis -Strudel can also use wavetables to create custom waveforms instead of the default ones used by WebAudio. There is a default set of wavetables accessible by default (approximatively 1000 coming from the [AKWF](https://www.adventurekid.se/akrt/waveforms/adventure-kid-waveforms/) set) but you can also import/use your own. A wavetable is a one-cycle waveform, which is then repeated to create a sound at the desired frequency. It is a classic but very effective synthesis technique. Wavetable synthesis is based on sample looping, using the `loop`, `loopBegin` and `loopEnd` properties of the sampler: +Strudel can also use the sampler to load custom waveforms as a replacement of the default waveforms used by WebAudio for the base synth. A default set of more than 1000 wavetables is accessible by default (coming from the [AKWF](https://www.adventurekid.se/akrt/waveforms/adventure-kid-waveforms/) set). You can also import/use your own. A wavetable is a one-cycle waveform, which is then repeated to create a sound at the desired frequency. It is a classic but very effective synthesis technique. -- `loop`: either `0` (no loop) or `1` (loop) -- `loopBegin`: start of the loop (between 0 and 1) -- `loopEnd`: end of the loop (between 0 and 1) +Any sample preceded by the `wt_` prefix will be loaded as a wavetable. This means that the `loop` argument will be set to `1` by defalt. You can scan over the wavetable by using `loopBegin` and `loopEnd` as well. - - +") +.n("<1 2 3 4 5 6 7 8 9 10>/2").room(0.5).size(0.9) +.s('wt_flute').velocity(0.25).often(n => n.ply(2)) +.release(0.125).decay("<0.1 0.25 0.3 0.4>").sustain(0) +.cutoff(2000).scope({}).cutoff("<1000 2000 4000>").fast(2)`} +/> ## ZZFX From 843d9d52c33b33b6d4b3f556ee325e629b28c9ba Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Mon, 11 Sep 2023 00:46:31 +0200 Subject: [PATCH 31/80] add documentation but it crashes --- packages/core/controls.mjs | 13 +++++++++---- website/src/pages/learn/samples.mdx | 12 ++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index 4d427da3..a490463d 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -314,8 +314,10 @@ const generic_params = [ * @param {number | Pattern} amount between 0 and 1, where 1 is the length of the sample * @synonyms loopb * @example - * s("numbers").loopBegin("<0 .25 .5 .75>").loop(1) - * + * s("numbers") + * .loop(1) + * .begin(0).end(1) + * .loopBegin("<0 .25 .5 .75>") */ ['loopBegin', 'loopb'], /** @@ -323,8 +325,11 @@ const generic_params = [ * @param {number | Pattern} amount between 0 and 1, where 1 is the length of the sample * @synonyms loope * @example - * s("numbers").loopEnd("<0 .25 .5 .75>").loop(1) - * + * s("numbers") + * .loop(1) + * .begin(0).end(1) + * .loopBegin("<0 .25 .5 .75>") + * .loopEnd("<0.1 .35 .6 .85>") */ ['loopEnd', 'loope'], /** diff --git a/website/src/pages/learn/samples.mdx b/website/src/pages/learn/samples.mdx index 9f79e54a..b1ef1cd3 100644 --- a/website/src/pages/learn/samples.mdx +++ b/website/src/pages/learn/samples.mdx @@ -303,6 +303,18 @@ Sampler effects are functions that can be used to change the behaviour of sample +### loop + + + +### loopBegin + + + +### loopEnd + + + ### cut From 4a65113bff85ee36dba1511c2f17e9015496aaea Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Mon, 11 Sep 2023 00:52:49 +0200 Subject: [PATCH 32/80] do not panic when no description --- website/src/docs/JsDoc.jsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/website/src/docs/JsDoc.jsx b/website/src/docs/JsDoc.jsx index 88a775a5..1ba80e0a 100644 --- a/website/src/docs/JsDoc.jsx +++ b/website/src/docs/JsDoc.jsx @@ -12,10 +12,11 @@ export function JsDoc({ name, h = 3, hideDescription, punchcard, canvasHeight }) } const synonyms = getTag('synonyms', item)?.split(', ') || []; const CustomHeading = `h${h}`; - const description = item.description.replaceAll(/\{@link ([a-zA-Z\.]+)?#?([a-zA-Z]*)\}/g, (_, a, b) => { - // console.log(_, 'a', a, 'b', b); - return `${a}${b ? `#${b}` : ''}`; - }); + const description = + item.description?.replaceAll(/\{@link ([a-zA-Z\.]+)?#?([a-zA-Z]*)\}/g, (_, a, b) => { + // console.log(_, 'a', a, 'b', b); + return `${a}${b ? `#${b}` : ''}`; + }) || ''; return ( <> {!!h && {item.longname}} From 78adaaedef56b45095cdce922292989980838cb2 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Mon, 11 Sep 2023 00:56:43 +0200 Subject: [PATCH 33/80] fixing minor bugs and adding description --- packages/core/controls.mjs | 7 +++++++ packages/superdough/sampler.mjs | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index a490463d..42f98a17 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -310,6 +310,9 @@ const generic_params = [ */ ['loop'], /** + * Begin to loop at a specific point in the sample (inbetween `begin` and `end`). + * Note that the loop point must be inbetween `begin` and `end`, and before `loopEnd`! + * * @name loopBegin * @param {number | Pattern} amount between 0 and 1, where 1 is the length of the sample * @synonyms loopb @@ -321,6 +324,10 @@ const generic_params = [ */ ['loopBegin', 'loopb'], /** + * + * End the looping section at a specific point in the sample (inbetween `begin` and `end`). + * Note that the loop point must be inbetween `begin` and `end`, and after `loopBegin`! + * * @name loopEnd * @param {number | Pattern} amount between 0 and 1, where 1 is the length of the sample * @synonyms loope diff --git a/packages/superdough/sampler.mjs b/packages/superdough/sampler.mjs index 28f09082..76b6a542 100644 --- a/packages/superdough/sampler.mjs +++ b/packages/superdough/sampler.mjs @@ -249,7 +249,6 @@ export async function onTriggerSample(t, value, onended, bank, resolveUrl) { bufferSource.loop = true; bufferSource.loopStart = loopBegin * bufferSource.buffer.duration - offset; bufferSource.loopEnd = loopEnd * bufferSource.buffer.duration - offset; - duration = loop * duration; } bufferSource.start(time, offset); const { node: envelope, stop: releaseEnvelope } = getEnvelope(attack, decay, sustain, release, 1, t); From 445881992ed15962482ab61b5270c64ef666ea23 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 15 Sep 2023 21:43:03 +0200 Subject: [PATCH 34/80] slow down examples + simplify --- packages/core/controls.mjs | 55 +++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 21 deletions(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index 3bdb885b..c31c68aa 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -384,8 +384,11 @@ const generic_params = [ * @param {number | Pattern} modulation depth of the lowpass filter envelope between 0 and _n_ * @synonyms lpe * @example - * note("c2 c3").fast(2).sound("sawtooth") - * .cutoff(500).lpenv("<1 2 3 4 5 6 7 8>") + * note("") + * .sound('sawtooth') + * .lpf(500) + * .lpa(.1).lpd(.1).lps(.5) + * .lpenv("<8 4 2 0>/4") */ ['lpenv', 'lpe'], /** @@ -414,10 +417,11 @@ const generic_params = [ * @param {number | Pattern} attack time of the filter envelope * @synonyms lpa * @example - * note("c3 e3 f3 g3 ab3 bb3") - * .sound('square').cutoff(1000) - * .lpattack("<0.05 0.1 0.25 0.5>/2").ftype("12db") - * .release(0.2).attack(0) + * note("") + * .sound('sawtooth') + * .lpf(500) + * .lpa("<.5 .25 .1 .01>/4") + * .lpenv(4) */ ['lpattack', 'lpa'], /** @@ -428,7 +432,7 @@ const generic_params = [ * @example * note("c3 e3 f3 g3 ab3 bb3") * .sound('square').hcutoff(1000) - * .hpattack("<0.05 0.1 0.25 0.5>/2").ftype("12db") + * .hpattack("<0.5 0.25 0.1 0.01>/2").ftype("12db") * .release(0.2).attack(0) */ ['hpattack', 'hpa'], @@ -450,11 +454,12 @@ const generic_params = [ * @param {number | Pattern} decay time of the filter envelope * @synonyms lpd * @example - * "baba" - * note("c3 e3 f3 g3 ab3 bb3") - * .sound('square').cutoff(1000) - * .lpdecay("<0.05 0.1 0.125>/2") - * .ftype("12db").lps(0).lpr(0) + * note("") + * .sound('sawtooth') + * .lpf(500) + * .lpd("<.5 .25 .1 0>/4") + * .lps(0.2) + * .lpenv(4) */ ['lpdecay', 'lpd'], /** @@ -489,15 +494,17 @@ const generic_params = [ * @param {number | Pattern} sustain amplitude of the lowpass filter envelope * @synonyms lps * @example - * note("c3 e3 f3 g3 ab3 bb3") - * .sound('square').cutoff(200) - * .lpd(0.1).lpsustain("<0.1 0.5 0.75 1>") - * .ftype("12db") + * note("") + * .sound('sawtooth') + * .lpf(0) + * .lpd(.5) + * .lps("<0 .25 .5 1>/4") + * .lpenv(4) */ ['lpsustain', 'lps'], /** * Sets the sustain amplitude for the highpass filter envelope. - * @name lpsustain + * @name hpsustain * @param {number | Pattern} sustain amplitude of the highpass filter envelope * @synonyms hps * @example @@ -509,7 +516,7 @@ const generic_params = [ ['hpsustain', 'hps'], /** * Sets the sustain amplitude for the bandpass filter envelope. - * @name lpsustain + * @name hpsustain * @param {number | Pattern} sustain amplitude of the bandpass filter envelope * @synonyms bps * @example @@ -525,12 +532,18 @@ const generic_params = [ * @param {number | Pattern} release time of the filter envelope * @synonyms lpr * @example - * note("c3 e3 g3 c4").lpr("<0.1 0.25 0.5>").ftype("12db") + * note("") + * .sound('sawtooth') + * .clip(.5) + * .lpf(0) + * .lpenv(4) + * .lpr("<.5 .25 .1 0>/4") + * .release(.5) */ ['lprelease', 'lpr'], /** * Sets the release time for the highpass filter envelope. - * @name lprelease + * @name hprelease * @param {number | Pattern} release time of the highpass filter envelope * @synonyms hpr * @example @@ -539,7 +552,7 @@ const generic_params = [ ['hprelease', 'hpr'], /** * Sets the release time for the bandpass filter envelope. - * @name lprelease + * @name bprelease * @param {number | Pattern} release time of the bandpass filter envelope * @synonyms bpr * @example From b8932390f7c0f40a9a4f258844d662b10f3e2805 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 15 Sep 2023 21:44:24 +0200 Subject: [PATCH 35/80] update snapshot --- test/__snapshots__/examples.test.mjs.snap | 372 +++++++++------------- 1 file changed, 144 insertions(+), 228 deletions(-) diff --git a/test/__snapshots__/examples.test.mjs.snap b/test/__snapshots__/examples.test.mjs.snap index 4cb261ae..7f9dd6f9 100644 --- a/test/__snapshots__/examples.test.mjs.snap +++ b/test/__snapshots__/examples.test.mjs.snap @@ -988,6 +988,27 @@ exports[`runs examples > example "bpq" example index 0 1`] = ` ] `; +exports[`runs examples > example "bprelease" example index 0 1`] = ` +[ + "[ 0/1 → 1/4 | note:c3 bprelease:0.1 ftype:12db ]", + "[ 1/4 → 1/2 | note:e3 bprelease:0.1 ftype:12db ]", + "[ 1/2 → 3/4 | note:g3 bprelease:0.1 ftype:12db ]", + "[ 3/4 → 1/1 | note:c4 bprelease:0.1 ftype:12db ]", + "[ 1/1 → 5/4 | note:c3 bprelease:0.25 ftype:12db ]", + "[ 5/4 → 3/2 | note:e3 bprelease:0.25 ftype:12db ]", + "[ 3/2 → 7/4 | note:g3 bprelease:0.25 ftype:12db ]", + "[ 7/4 → 2/1 | note:c4 bprelease:0.25 ftype:12db ]", + "[ 2/1 → 9/4 | note:c3 bprelease:0.5 ftype:12db ]", + "[ 9/4 → 5/2 | note:e3 bprelease:0.5 ftype:12db ]", + "[ 5/2 → 11/4 | note:g3 bprelease:0.5 ftype:12db ]", + "[ 11/4 → 3/1 | note:c4 bprelease:0.5 ftype:12db ]", + "[ 3/1 → 13/4 | note:c3 bprelease:0.1 ftype:12db ]", + "[ 13/4 → 7/2 | note:e3 bprelease:0.1 ftype:12db ]", + "[ 7/2 → 15/4 | note:g3 bprelease:0.1 ftype:12db ]", + "[ 15/4 → 4/1 | note:c4 bprelease:0.1 ftype:12db ]", +] +`; + exports[`runs examples > example "cat" example index 0 1`] = ` [ "[ 0/1 → 1/2 | s:hh ]", @@ -2102,30 +2123,30 @@ exports[`runs examples > example "gain" example index 0 1`] = ` exports[`runs examples > example "hpattack" example index 0 1`] = ` [ - "[ 0/1 → 1/6 | note:c3 s:square hcutoff:1000 hpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 1/6 → 1/3 | note:e3 s:square hcutoff:1000 hpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 1/3 → 1/2 | note:f3 s:square hcutoff:1000 hpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 1/2 → 2/3 | note:g3 s:square hcutoff:1000 hpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 2/3 → 5/6 | note:ab3 s:square hcutoff:1000 hpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 5/6 → 1/1 | note:bb3 s:square hcutoff:1000 hpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 1/1 → 7/6 | note:c3 s:square hcutoff:1000 hpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 7/6 → 4/3 | note:e3 s:square hcutoff:1000 hpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 4/3 → 3/2 | note:f3 s:square hcutoff:1000 hpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 3/2 → 5/3 | note:g3 s:square hcutoff:1000 hpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 5/3 → 11/6 | note:ab3 s:square hcutoff:1000 hpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 11/6 → 2/1 | note:bb3 s:square hcutoff:1000 hpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 2/1 → 13/6 | note:c3 s:square hcutoff:1000 hpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 13/6 → 7/3 | note:e3 s:square hcutoff:1000 hpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 7/3 → 5/2 | note:f3 s:square hcutoff:1000 hpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 5/2 → 8/3 | note:g3 s:square hcutoff:1000 hpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 8/3 → 17/6 | note:ab3 s:square hcutoff:1000 hpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 17/6 → 3/1 | note:bb3 s:square hcutoff:1000 hpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 3/1 → 19/6 | note:c3 s:square hcutoff:1000 hpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 19/6 → 10/3 | note:e3 s:square hcutoff:1000 hpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 10/3 → 7/2 | note:f3 s:square hcutoff:1000 hpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 7/2 → 11/3 | note:g3 s:square hcutoff:1000 hpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 11/3 → 23/6 | note:ab3 s:square hcutoff:1000 hpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 23/6 → 4/1 | note:bb3 s:square hcutoff:1000 hpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 0/1 → 1/6 | note:c3 s:square hcutoff:1000 hpattack:0.5 ftype:12db release:0.2 attack:0 ]", + "[ 1/6 → 1/3 | note:e3 s:square hcutoff:1000 hpattack:0.5 ftype:12db release:0.2 attack:0 ]", + "[ 1/3 → 1/2 | note:f3 s:square hcutoff:1000 hpattack:0.5 ftype:12db release:0.2 attack:0 ]", + "[ 1/2 → 2/3 | note:g3 s:square hcutoff:1000 hpattack:0.5 ftype:12db release:0.2 attack:0 ]", + "[ 2/3 → 5/6 | note:ab3 s:square hcutoff:1000 hpattack:0.5 ftype:12db release:0.2 attack:0 ]", + "[ 5/6 → 1/1 | note:bb3 s:square hcutoff:1000 hpattack:0.5 ftype:12db release:0.2 attack:0 ]", + "[ 1/1 → 7/6 | note:c3 s:square hcutoff:1000 hpattack:0.5 ftype:12db release:0.2 attack:0 ]", + "[ 7/6 → 4/3 | note:e3 s:square hcutoff:1000 hpattack:0.5 ftype:12db release:0.2 attack:0 ]", + "[ 4/3 → 3/2 | note:f3 s:square hcutoff:1000 hpattack:0.5 ftype:12db release:0.2 attack:0 ]", + "[ 3/2 → 5/3 | note:g3 s:square hcutoff:1000 hpattack:0.5 ftype:12db release:0.2 attack:0 ]", + "[ 5/3 → 11/6 | note:ab3 s:square hcutoff:1000 hpattack:0.5 ftype:12db release:0.2 attack:0 ]", + "[ 11/6 → 2/1 | note:bb3 s:square hcutoff:1000 hpattack:0.5 ftype:12db release:0.2 attack:0 ]", + "[ 2/1 → 13/6 | note:c3 s:square hcutoff:1000 hpattack:0.25 ftype:12db release:0.2 attack:0 ]", + "[ 13/6 → 7/3 | note:e3 s:square hcutoff:1000 hpattack:0.25 ftype:12db release:0.2 attack:0 ]", + "[ 7/3 → 5/2 | note:f3 s:square hcutoff:1000 hpattack:0.25 ftype:12db release:0.2 attack:0 ]", + "[ 5/2 → 8/3 | note:g3 s:square hcutoff:1000 hpattack:0.25 ftype:12db release:0.2 attack:0 ]", + "[ 8/3 → 17/6 | note:ab3 s:square hcutoff:1000 hpattack:0.25 ftype:12db release:0.2 attack:0 ]", + "[ 17/6 → 3/1 | note:bb3 s:square hcutoff:1000 hpattack:0.25 ftype:12db release:0.2 attack:0 ]", + "[ 3/1 → 19/6 | note:c3 s:square hcutoff:1000 hpattack:0.25 ftype:12db release:0.2 attack:0 ]", + "[ 19/6 → 10/3 | note:e3 s:square hcutoff:1000 hpattack:0.25 ftype:12db release:0.2 attack:0 ]", + "[ 10/3 → 7/2 | note:f3 s:square hcutoff:1000 hpattack:0.25 ftype:12db release:0.2 attack:0 ]", + "[ 7/2 → 11/3 | note:g3 s:square hcutoff:1000 hpattack:0.25 ftype:12db release:0.2 attack:0 ]", + "[ 11/3 → 23/6 | note:ab3 s:square hcutoff:1000 hpattack:0.25 ftype:12db release:0.2 attack:0 ]", + "[ 23/6 → 4/1 | note:bb3 s:square hcutoff:1000 hpattack:0.25 ftype:12db release:0.2 attack:0 ]", ] `; @@ -2295,6 +2316,85 @@ exports[`runs examples > example "hpq" example index 0 1`] = ` ] `; +exports[`runs examples > example "hprelease" example index 0 1`] = ` +[ + "[ 0/1 → 1/4 | note:c3 hprelease:0.1 ftype:12db ]", + "[ 1/4 → 1/2 | note:e3 hprelease:0.1 ftype:12db ]", + "[ 1/2 → 3/4 | note:g3 hprelease:0.1 ftype:12db ]", + "[ 3/4 → 1/1 | note:c4 hprelease:0.1 ftype:12db ]", + "[ 1/1 → 5/4 | note:c3 hprelease:0.25 ftype:12db ]", + "[ 5/4 → 3/2 | note:e3 hprelease:0.25 ftype:12db ]", + "[ 3/2 → 7/4 | note:g3 hprelease:0.25 ftype:12db ]", + "[ 7/4 → 2/1 | note:c4 hprelease:0.25 ftype:12db ]", + "[ 2/1 → 9/4 | note:c3 hprelease:0.5 ftype:12db ]", + "[ 9/4 → 5/2 | note:e3 hprelease:0.5 ftype:12db ]", + "[ 5/2 → 11/4 | note:g3 hprelease:0.5 ftype:12db ]", + "[ 11/4 → 3/1 | note:c4 hprelease:0.5 ftype:12db ]", + "[ 3/1 → 13/4 | note:c3 hprelease:0.1 ftype:12db ]", + "[ 13/4 → 7/2 | note:e3 hprelease:0.1 ftype:12db ]", + "[ 7/2 → 15/4 | note:g3 hprelease:0.1 ftype:12db ]", + "[ 15/4 → 4/1 | note:c4 hprelease:0.1 ftype:12db ]", +] +`; + +exports[`runs examples > example "hpsustain" example index 0 1`] = ` +[ + "[ 0/1 → 1/6 | note:c3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.1 ftype:12db ]", + "[ 1/6 → 1/3 | note:e3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.1 ftype:12db ]", + "[ 1/3 → 1/2 | note:f3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.1 ftype:12db ]", + "[ 1/2 → 2/3 | note:g3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.1 ftype:12db ]", + "[ 2/3 → 5/6 | note:ab3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.1 ftype:12db ]", + "[ 5/6 → 1/1 | note:bb3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.1 ftype:12db ]", + "[ 1/1 → 7/6 | note:c3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.5 ftype:12db ]", + "[ 7/6 → 4/3 | note:e3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.5 ftype:12db ]", + "[ 4/3 → 3/2 | note:f3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.5 ftype:12db ]", + "[ 3/2 → 5/3 | note:g3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.5 ftype:12db ]", + "[ 5/3 → 11/6 | note:ab3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.5 ftype:12db ]", + "[ 11/6 → 2/1 | note:bb3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.5 ftype:12db ]", + "[ 2/1 → 13/6 | note:c3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.75 ftype:12db ]", + "[ 13/6 → 7/3 | note:e3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.75 ftype:12db ]", + "[ 7/3 → 5/2 | note:f3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.75 ftype:12db ]", + "[ 5/2 → 8/3 | note:g3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.75 ftype:12db ]", + "[ 8/3 → 17/6 | note:ab3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.75 ftype:12db ]", + "[ 17/6 → 3/1 | note:bb3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.75 ftype:12db ]", + "[ 3/1 → 19/6 | note:c3 s:square hcutoff:200 hpdecay:0.1 hpsustain:1 ftype:12db ]", + "[ 19/6 → 10/3 | note:e3 s:square hcutoff:200 hpdecay:0.1 hpsustain:1 ftype:12db ]", + "[ 10/3 → 7/2 | note:f3 s:square hcutoff:200 hpdecay:0.1 hpsustain:1 ftype:12db ]", + "[ 7/2 → 11/3 | note:g3 s:square hcutoff:200 hpdecay:0.1 hpsustain:1 ftype:12db ]", + "[ 11/3 → 23/6 | note:ab3 s:square hcutoff:200 hpdecay:0.1 hpsustain:1 ftype:12db ]", + "[ 23/6 → 4/1 | note:bb3 s:square hcutoff:200 hpdecay:0.1 hpsustain:1 ftype:12db ]", +] +`; + +exports[`runs examples > example "hpsustain" example index 0 2`] = ` +[ + "[ 0/1 → 1/6 | note:c3 s:square bandf:200 bpdecay:0.1 bpsustain:0.1 ftype:12db ]", + "[ 1/6 → 1/3 | note:e3 s:square bandf:200 bpdecay:0.1 bpsustain:0.1 ftype:12db ]", + "[ 1/3 → 1/2 | note:f3 s:square bandf:200 bpdecay:0.1 bpsustain:0.1 ftype:12db ]", + "[ 1/2 → 2/3 | note:g3 s:square bandf:200 bpdecay:0.1 bpsustain:0.1 ftype:12db ]", + "[ 2/3 → 5/6 | note:ab3 s:square bandf:200 bpdecay:0.1 bpsustain:0.1 ftype:12db ]", + "[ 5/6 → 1/1 | note:bb3 s:square bandf:200 bpdecay:0.1 bpsustain:0.1 ftype:12db ]", + "[ 1/1 → 7/6 | note:c3 s:square bandf:200 bpdecay:0.1 bpsustain:0.5 ftype:12db ]", + "[ 7/6 → 4/3 | note:e3 s:square bandf:200 bpdecay:0.1 bpsustain:0.5 ftype:12db ]", + "[ 4/3 → 3/2 | note:f3 s:square bandf:200 bpdecay:0.1 bpsustain:0.5 ftype:12db ]", + "[ 3/2 → 5/3 | note:g3 s:square bandf:200 bpdecay:0.1 bpsustain:0.5 ftype:12db ]", + "[ 5/3 → 11/6 | note:ab3 s:square bandf:200 bpdecay:0.1 bpsustain:0.5 ftype:12db ]", + "[ 11/6 → 2/1 | note:bb3 s:square bandf:200 bpdecay:0.1 bpsustain:0.5 ftype:12db ]", + "[ 2/1 → 13/6 | note:c3 s:square bandf:200 bpdecay:0.1 bpsustain:0.75 ftype:12db ]", + "[ 13/6 → 7/3 | note:e3 s:square bandf:200 bpdecay:0.1 bpsustain:0.75 ftype:12db ]", + "[ 7/3 → 5/2 | note:f3 s:square bandf:200 bpdecay:0.1 bpsustain:0.75 ftype:12db ]", + "[ 5/2 → 8/3 | note:g3 s:square bandf:200 bpdecay:0.1 bpsustain:0.75 ftype:12db ]", + "[ 8/3 → 17/6 | note:ab3 s:square bandf:200 bpdecay:0.1 bpsustain:0.75 ftype:12db ]", + "[ 17/6 → 3/1 | note:bb3 s:square bandf:200 bpdecay:0.1 bpsustain:0.75 ftype:12db ]", + "[ 3/1 → 19/6 | note:c3 s:square bandf:200 bpdecay:0.1 bpsustain:1 ftype:12db ]", + "[ 19/6 → 10/3 | note:e3 s:square bandf:200 bpdecay:0.1 bpsustain:1 ftype:12db ]", + "[ 10/3 → 7/2 | note:f3 s:square bandf:200 bpdecay:0.1 bpsustain:1 ftype:12db ]", + "[ 7/2 → 11/3 | note:g3 s:square bandf:200 bpdecay:0.1 bpsustain:1 ftype:12db ]", + "[ 11/3 → 23/6 | note:ab3 s:square bandf:200 bpdecay:0.1 bpsustain:1 ftype:12db ]", + "[ 23/6 → 4/1 | note:bb3 s:square bandf:200 bpdecay:0.1 bpsustain:1 ftype:12db ]", +] +`; + exports[`runs examples > example "hurry" example index 0 1`] = ` [ "[ 0/1 → 3/4 | s:bd speed:1 ]", @@ -2726,80 +2826,28 @@ exports[`runs examples > example "loopAtCps" example index 0 1`] = ` exports[`runs examples > example "lpattack" example index 0 1`] = ` [ - "[ 0/1 → 1/6 | note:c3 s:square cutoff:1000 lpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 1/6 → 1/3 | note:e3 s:square cutoff:1000 lpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 1/3 → 1/2 | note:f3 s:square cutoff:1000 lpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 1/2 → 2/3 | note:g3 s:square cutoff:1000 lpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 2/3 → 5/6 | note:ab3 s:square cutoff:1000 lpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 5/6 → 1/1 | note:bb3 s:square cutoff:1000 lpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 1/1 → 7/6 | note:c3 s:square cutoff:1000 lpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 7/6 → 4/3 | note:e3 s:square cutoff:1000 lpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 4/3 → 3/2 | note:f3 s:square cutoff:1000 lpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 3/2 → 5/3 | note:g3 s:square cutoff:1000 lpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 5/3 → 11/6 | note:ab3 s:square cutoff:1000 lpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 11/6 → 2/1 | note:bb3 s:square cutoff:1000 lpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 2/1 → 13/6 | note:c3 s:square cutoff:1000 lpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 13/6 → 7/3 | note:e3 s:square cutoff:1000 lpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 7/3 → 5/2 | note:f3 s:square cutoff:1000 lpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 5/2 → 8/3 | note:g3 s:square cutoff:1000 lpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 8/3 → 17/6 | note:ab3 s:square cutoff:1000 lpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 17/6 → 3/1 | note:bb3 s:square cutoff:1000 lpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 3/1 → 19/6 | note:c3 s:square cutoff:1000 lpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 19/6 → 10/3 | note:e3 s:square cutoff:1000 lpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 10/3 → 7/2 | note:f3 s:square cutoff:1000 lpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 7/2 → 11/3 | note:g3 s:square cutoff:1000 lpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 11/3 → 23/6 | note:ab3 s:square cutoff:1000 lpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 23/6 → 4/1 | note:bb3 s:square cutoff:1000 lpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 0/1 → 1/1 | note:c2 s:sawtooth cutoff:500 lpattack:0.5 lpenv:4 ]", + "[ 1/1 → 2/1 | note:e2 s:sawtooth cutoff:500 lpattack:0.5 lpenv:4 ]", + "[ 2/1 → 3/1 | note:f2 s:sawtooth cutoff:500 lpattack:0.5 lpenv:4 ]", + "[ 3/1 → 4/1 | note:g2 s:sawtooth cutoff:500 lpattack:0.5 lpenv:4 ]", ] `; exports[`runs examples > example "lpdecay" example index 0 1`] = ` [ - "[ 0/1 → 1/6 | note:c3 s:square cutoff:1000 lpdecay:0.05 ftype:12db lpsustain:0 lprelease:0 ]", - "[ 1/6 → 1/3 | note:e3 s:square cutoff:1000 lpdecay:0.05 ftype:12db lpsustain:0 lprelease:0 ]", - "[ 1/3 → 1/2 | note:f3 s:square cutoff:1000 lpdecay:0.05 ftype:12db lpsustain:0 lprelease:0 ]", - "[ 1/2 → 2/3 | note:g3 s:square cutoff:1000 lpdecay:0.05 ftype:12db lpsustain:0 lprelease:0 ]", - "[ 2/3 → 5/6 | note:ab3 s:square cutoff:1000 lpdecay:0.05 ftype:12db lpsustain:0 lprelease:0 ]", - "[ 5/6 → 1/1 | note:bb3 s:square cutoff:1000 lpdecay:0.05 ftype:12db lpsustain:0 lprelease:0 ]", - "[ 1/1 → 7/6 | note:c3 s:square cutoff:1000 lpdecay:0.05 ftype:12db lpsustain:0 lprelease:0 ]", - "[ 7/6 → 4/3 | note:e3 s:square cutoff:1000 lpdecay:0.05 ftype:12db lpsustain:0 lprelease:0 ]", - "[ 4/3 → 3/2 | note:f3 s:square cutoff:1000 lpdecay:0.05 ftype:12db lpsustain:0 lprelease:0 ]", - "[ 3/2 → 5/3 | note:g3 s:square cutoff:1000 lpdecay:0.05 ftype:12db lpsustain:0 lprelease:0 ]", - "[ 5/3 → 11/6 | note:ab3 s:square cutoff:1000 lpdecay:0.05 ftype:12db lpsustain:0 lprelease:0 ]", - "[ 11/6 → 2/1 | note:bb3 s:square cutoff:1000 lpdecay:0.05 ftype:12db lpsustain:0 lprelease:0 ]", - "[ 2/1 → 13/6 | note:c3 s:square cutoff:1000 lpdecay:0.1 ftype:12db lpsustain:0 lprelease:0 ]", - "[ 13/6 → 7/3 | note:e3 s:square cutoff:1000 lpdecay:0.1 ftype:12db lpsustain:0 lprelease:0 ]", - "[ 7/3 → 5/2 | note:f3 s:square cutoff:1000 lpdecay:0.1 ftype:12db lpsustain:0 lprelease:0 ]", - "[ 5/2 → 8/3 | note:g3 s:square cutoff:1000 lpdecay:0.1 ftype:12db lpsustain:0 lprelease:0 ]", - "[ 8/3 → 17/6 | note:ab3 s:square cutoff:1000 lpdecay:0.1 ftype:12db lpsustain:0 lprelease:0 ]", - "[ 17/6 → 3/1 | note:bb3 s:square cutoff:1000 lpdecay:0.1 ftype:12db lpsustain:0 lprelease:0 ]", - "[ 3/1 → 19/6 | note:c3 s:square cutoff:1000 lpdecay:0.1 ftype:12db lpsustain:0 lprelease:0 ]", - "[ 19/6 → 10/3 | note:e3 s:square cutoff:1000 lpdecay:0.1 ftype:12db lpsustain:0 lprelease:0 ]", - "[ 10/3 → 7/2 | note:f3 s:square cutoff:1000 lpdecay:0.1 ftype:12db lpsustain:0 lprelease:0 ]", - "[ 7/2 → 11/3 | note:g3 s:square cutoff:1000 lpdecay:0.1 ftype:12db lpsustain:0 lprelease:0 ]", - "[ 11/3 → 23/6 | note:ab3 s:square cutoff:1000 lpdecay:0.1 ftype:12db lpsustain:0 lprelease:0 ]", - "[ 23/6 → 4/1 | note:bb3 s:square cutoff:1000 lpdecay:0.1 ftype:12db lpsustain:0 lprelease:0 ]", + "[ 0/1 → 1/1 | note:c2 s:sawtooth cutoff:500 lpdecay:0.5 lpsustain:0.2 lpenv:4 ]", + "[ 1/1 → 2/1 | note:e2 s:sawtooth cutoff:500 lpdecay:0.5 lpsustain:0.2 lpenv:4 ]", + "[ 2/1 → 3/1 | note:f2 s:sawtooth cutoff:500 lpdecay:0.5 lpsustain:0.2 lpenv:4 ]", + "[ 3/1 → 4/1 | note:g2 s:sawtooth cutoff:500 lpdecay:0.5 lpsustain:0.2 lpenv:4 ]", ] `; exports[`runs examples > example "lpenv" example index 0 1`] = ` [ - "[ 0/1 → 1/4 | note:c2 s:sawtooth cutoff:500 lpenv:1 ]", - "[ 1/4 → 1/2 | note:c3 s:sawtooth cutoff:500 lpenv:1 ]", - "[ 1/2 → 3/4 | note:c2 s:sawtooth cutoff:500 lpenv:1 ]", - "[ 3/4 → 1/1 | note:c3 s:sawtooth cutoff:500 lpenv:1 ]", - "[ 1/1 → 5/4 | note:c2 s:sawtooth cutoff:500 lpenv:2 ]", - "[ 5/4 → 3/2 | note:c3 s:sawtooth cutoff:500 lpenv:2 ]", - "[ 3/2 → 7/4 | note:c2 s:sawtooth cutoff:500 lpenv:2 ]", - "[ 7/4 → 2/1 | note:c3 s:sawtooth cutoff:500 lpenv:2 ]", - "[ 2/1 → 9/4 | note:c2 s:sawtooth cutoff:500 lpenv:3 ]", - "[ 9/4 → 5/2 | note:c3 s:sawtooth cutoff:500 lpenv:3 ]", - "[ 5/2 → 11/4 | note:c2 s:sawtooth cutoff:500 lpenv:3 ]", - "[ 11/4 → 3/1 | note:c3 s:sawtooth cutoff:500 lpenv:3 ]", - "[ 3/1 → 13/4 | note:c2 s:sawtooth cutoff:500 lpenv:4 ]", - "[ 13/4 → 7/2 | note:c3 s:sawtooth cutoff:500 lpenv:4 ]", - "[ 7/2 → 15/4 | note:c2 s:sawtooth cutoff:500 lpenv:4 ]", - "[ 15/4 → 4/1 | note:c3 s:sawtooth cutoff:500 lpenv:4 ]", + "[ 0/1 → 1/1 | note:c2 s:sawtooth cutoff:500 lpattack:0.1 lpdecay:0.1 lpsustain:0.5 lpenv:8 ]", + "[ 1/1 → 2/1 | note:e2 s:sawtooth cutoff:500 lpattack:0.1 lpdecay:0.1 lpsustain:0.5 lpenv:8 ]", + "[ 2/1 → 3/1 | note:f2 s:sawtooth cutoff:500 lpattack:0.1 lpdecay:0.1 lpsustain:0.5 lpenv:8 ]", + "[ 3/1 → 4/1 | note:g2 s:sawtooth cutoff:500 lpattack:0.1 lpdecay:0.1 lpsustain:0.5 lpenv:8 ]", ] `; @@ -2896,151 +2944,19 @@ exports[`runs examples > example "lpq" example index 0 1`] = ` exports[`runs examples > example "lprelease" example index 0 1`] = ` [ - "[ 0/1 → 1/4 | note:c3 lprelease:0.1 ftype:12db ]", - "[ 1/4 → 1/2 | note:e3 lprelease:0.1 ftype:12db ]", - "[ 1/2 → 3/4 | note:g3 lprelease:0.1 ftype:12db ]", - "[ 3/4 → 1/1 | note:c4 lprelease:0.1 ftype:12db ]", - "[ 1/1 → 5/4 | note:c3 lprelease:0.25 ftype:12db ]", - "[ 5/4 → 3/2 | note:e3 lprelease:0.25 ftype:12db ]", - "[ 3/2 → 7/4 | note:g3 lprelease:0.25 ftype:12db ]", - "[ 7/4 → 2/1 | note:c4 lprelease:0.25 ftype:12db ]", - "[ 2/1 → 9/4 | note:c3 lprelease:0.5 ftype:12db ]", - "[ 9/4 → 5/2 | note:e3 lprelease:0.5 ftype:12db ]", - "[ 5/2 → 11/4 | note:g3 lprelease:0.5 ftype:12db ]", - "[ 11/4 → 3/1 | note:c4 lprelease:0.5 ftype:12db ]", - "[ 3/1 → 13/4 | note:c3 lprelease:0.1 ftype:12db ]", - "[ 13/4 → 7/2 | note:e3 lprelease:0.1 ftype:12db ]", - "[ 7/2 → 15/4 | note:g3 lprelease:0.1 ftype:12db ]", - "[ 15/4 → 4/1 | note:c4 lprelease:0.1 ftype:12db ]", -] -`; - -exports[`runs examples > example "lprelease" example index 0 2`] = ` -[ - "[ 0/1 → 1/4 | note:c3 hprelease:0.1 ftype:12db ]", - "[ 1/4 → 1/2 | note:e3 hprelease:0.1 ftype:12db ]", - "[ 1/2 → 3/4 | note:g3 hprelease:0.1 ftype:12db ]", - "[ 3/4 → 1/1 | note:c4 hprelease:0.1 ftype:12db ]", - "[ 1/1 → 5/4 | note:c3 hprelease:0.25 ftype:12db ]", - "[ 5/4 → 3/2 | note:e3 hprelease:0.25 ftype:12db ]", - "[ 3/2 → 7/4 | note:g3 hprelease:0.25 ftype:12db ]", - "[ 7/4 → 2/1 | note:c4 hprelease:0.25 ftype:12db ]", - "[ 2/1 → 9/4 | note:c3 hprelease:0.5 ftype:12db ]", - "[ 9/4 → 5/2 | note:e3 hprelease:0.5 ftype:12db ]", - "[ 5/2 → 11/4 | note:g3 hprelease:0.5 ftype:12db ]", - "[ 11/4 → 3/1 | note:c4 hprelease:0.5 ftype:12db ]", - "[ 3/1 → 13/4 | note:c3 hprelease:0.1 ftype:12db ]", - "[ 13/4 → 7/2 | note:e3 hprelease:0.1 ftype:12db ]", - "[ 7/2 → 15/4 | note:g3 hprelease:0.1 ftype:12db ]", - "[ 15/4 → 4/1 | note:c4 hprelease:0.1 ftype:12db ]", -] -`; - -exports[`runs examples > example "lprelease" example index 0 3`] = ` -[ - "[ 0/1 → 1/4 | note:c3 bprelease:0.1 ftype:12db ]", - "[ 1/4 → 1/2 | note:e3 bprelease:0.1 ftype:12db ]", - "[ 1/2 → 3/4 | note:g3 bprelease:0.1 ftype:12db ]", - "[ 3/4 → 1/1 | note:c4 bprelease:0.1 ftype:12db ]", - "[ 1/1 → 5/4 | note:c3 bprelease:0.25 ftype:12db ]", - "[ 5/4 → 3/2 | note:e3 bprelease:0.25 ftype:12db ]", - "[ 3/2 → 7/4 | note:g3 bprelease:0.25 ftype:12db ]", - "[ 7/4 → 2/1 | note:c4 bprelease:0.25 ftype:12db ]", - "[ 2/1 → 9/4 | note:c3 bprelease:0.5 ftype:12db ]", - "[ 9/4 → 5/2 | note:e3 bprelease:0.5 ftype:12db ]", - "[ 5/2 → 11/4 | note:g3 bprelease:0.5 ftype:12db ]", - "[ 11/4 → 3/1 | note:c4 bprelease:0.5 ftype:12db ]", - "[ 3/1 → 13/4 | note:c3 bprelease:0.1 ftype:12db ]", - "[ 13/4 → 7/2 | note:e3 bprelease:0.1 ftype:12db ]", - "[ 7/2 → 15/4 | note:g3 bprelease:0.1 ftype:12db ]", - "[ 15/4 → 4/1 | note:c4 bprelease:0.1 ftype:12db ]", + "[ 0/1 → 1/1 | note:c2 s:sawtooth clip:0.5 cutoff:0 lpenv:4 lprelease:0.5 release:0.5 ]", + "[ 1/1 → 2/1 | note:e2 s:sawtooth clip:0.5 cutoff:0 lpenv:4 lprelease:0.5 release:0.5 ]", + "[ 2/1 → 3/1 | note:f2 s:sawtooth clip:0.5 cutoff:0 lpenv:4 lprelease:0.5 release:0.5 ]", + "[ 3/1 → 4/1 | note:g2 s:sawtooth clip:0.5 cutoff:0 lpenv:4 lprelease:0.5 release:0.5 ]", ] `; exports[`runs examples > example "lpsustain" example index 0 1`] = ` [ - "[ 0/1 → 1/6 | note:c3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.1 ftype:12db ]", - "[ 1/6 → 1/3 | note:e3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.1 ftype:12db ]", - "[ 1/3 → 1/2 | note:f3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.1 ftype:12db ]", - "[ 1/2 → 2/3 | note:g3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.1 ftype:12db ]", - "[ 2/3 → 5/6 | note:ab3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.1 ftype:12db ]", - "[ 5/6 → 1/1 | note:bb3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.1 ftype:12db ]", - "[ 1/1 → 7/6 | note:c3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.5 ftype:12db ]", - "[ 7/6 → 4/3 | note:e3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.5 ftype:12db ]", - "[ 4/3 → 3/2 | note:f3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.5 ftype:12db ]", - "[ 3/2 → 5/3 | note:g3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.5 ftype:12db ]", - "[ 5/3 → 11/6 | note:ab3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.5 ftype:12db ]", - "[ 11/6 → 2/1 | note:bb3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.5 ftype:12db ]", - "[ 2/1 → 13/6 | note:c3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.75 ftype:12db ]", - "[ 13/6 → 7/3 | note:e3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.75 ftype:12db ]", - "[ 7/3 → 5/2 | note:f3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.75 ftype:12db ]", - "[ 5/2 → 8/3 | note:g3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.75 ftype:12db ]", - "[ 8/3 → 17/6 | note:ab3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.75 ftype:12db ]", - "[ 17/6 → 3/1 | note:bb3 s:square cutoff:200 lpdecay:0.1 lpsustain:0.75 ftype:12db ]", - "[ 3/1 → 19/6 | note:c3 s:square cutoff:200 lpdecay:0.1 lpsustain:1 ftype:12db ]", - "[ 19/6 → 10/3 | note:e3 s:square cutoff:200 lpdecay:0.1 lpsustain:1 ftype:12db ]", - "[ 10/3 → 7/2 | note:f3 s:square cutoff:200 lpdecay:0.1 lpsustain:1 ftype:12db ]", - "[ 7/2 → 11/3 | note:g3 s:square cutoff:200 lpdecay:0.1 lpsustain:1 ftype:12db ]", - "[ 11/3 → 23/6 | note:ab3 s:square cutoff:200 lpdecay:0.1 lpsustain:1 ftype:12db ]", - "[ 23/6 → 4/1 | note:bb3 s:square cutoff:200 lpdecay:0.1 lpsustain:1 ftype:12db ]", -] -`; - -exports[`runs examples > example "lpsustain" example index 0 2`] = ` -[ - "[ 0/1 → 1/6 | note:c3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.1 ftype:12db ]", - "[ 1/6 → 1/3 | note:e3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.1 ftype:12db ]", - "[ 1/3 → 1/2 | note:f3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.1 ftype:12db ]", - "[ 1/2 → 2/3 | note:g3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.1 ftype:12db ]", - "[ 2/3 → 5/6 | note:ab3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.1 ftype:12db ]", - "[ 5/6 → 1/1 | note:bb3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.1 ftype:12db ]", - "[ 1/1 → 7/6 | note:c3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.5 ftype:12db ]", - "[ 7/6 → 4/3 | note:e3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.5 ftype:12db ]", - "[ 4/3 → 3/2 | note:f3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.5 ftype:12db ]", - "[ 3/2 → 5/3 | note:g3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.5 ftype:12db ]", - "[ 5/3 → 11/6 | note:ab3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.5 ftype:12db ]", - "[ 11/6 → 2/1 | note:bb3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.5 ftype:12db ]", - "[ 2/1 → 13/6 | note:c3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.75 ftype:12db ]", - "[ 13/6 → 7/3 | note:e3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.75 ftype:12db ]", - "[ 7/3 → 5/2 | note:f3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.75 ftype:12db ]", - "[ 5/2 → 8/3 | note:g3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.75 ftype:12db ]", - "[ 8/3 → 17/6 | note:ab3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.75 ftype:12db ]", - "[ 17/6 → 3/1 | note:bb3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.75 ftype:12db ]", - "[ 3/1 → 19/6 | note:c3 s:square hcutoff:200 hpdecay:0.1 hpsustain:1 ftype:12db ]", - "[ 19/6 → 10/3 | note:e3 s:square hcutoff:200 hpdecay:0.1 hpsustain:1 ftype:12db ]", - "[ 10/3 → 7/2 | note:f3 s:square hcutoff:200 hpdecay:0.1 hpsustain:1 ftype:12db ]", - "[ 7/2 → 11/3 | note:g3 s:square hcutoff:200 hpdecay:0.1 hpsustain:1 ftype:12db ]", - "[ 11/3 → 23/6 | note:ab3 s:square hcutoff:200 hpdecay:0.1 hpsustain:1 ftype:12db ]", - "[ 23/6 → 4/1 | note:bb3 s:square hcutoff:200 hpdecay:0.1 hpsustain:1 ftype:12db ]", -] -`; - -exports[`runs examples > example "lpsustain" example index 0 3`] = ` -[ - "[ 0/1 → 1/6 | note:c3 s:square bandf:200 bpdecay:0.1 bpsustain:0.1 ftype:12db ]", - "[ 1/6 → 1/3 | note:e3 s:square bandf:200 bpdecay:0.1 bpsustain:0.1 ftype:12db ]", - "[ 1/3 → 1/2 | note:f3 s:square bandf:200 bpdecay:0.1 bpsustain:0.1 ftype:12db ]", - "[ 1/2 → 2/3 | note:g3 s:square bandf:200 bpdecay:0.1 bpsustain:0.1 ftype:12db ]", - "[ 2/3 → 5/6 | note:ab3 s:square bandf:200 bpdecay:0.1 bpsustain:0.1 ftype:12db ]", - "[ 5/6 → 1/1 | note:bb3 s:square bandf:200 bpdecay:0.1 bpsustain:0.1 ftype:12db ]", - "[ 1/1 → 7/6 | note:c3 s:square bandf:200 bpdecay:0.1 bpsustain:0.5 ftype:12db ]", - "[ 7/6 → 4/3 | note:e3 s:square bandf:200 bpdecay:0.1 bpsustain:0.5 ftype:12db ]", - "[ 4/3 → 3/2 | note:f3 s:square bandf:200 bpdecay:0.1 bpsustain:0.5 ftype:12db ]", - "[ 3/2 → 5/3 | note:g3 s:square bandf:200 bpdecay:0.1 bpsustain:0.5 ftype:12db ]", - "[ 5/3 → 11/6 | note:ab3 s:square bandf:200 bpdecay:0.1 bpsustain:0.5 ftype:12db ]", - "[ 11/6 → 2/1 | note:bb3 s:square bandf:200 bpdecay:0.1 bpsustain:0.5 ftype:12db ]", - "[ 2/1 → 13/6 | note:c3 s:square bandf:200 bpdecay:0.1 bpsustain:0.75 ftype:12db ]", - "[ 13/6 → 7/3 | note:e3 s:square bandf:200 bpdecay:0.1 bpsustain:0.75 ftype:12db ]", - "[ 7/3 → 5/2 | note:f3 s:square bandf:200 bpdecay:0.1 bpsustain:0.75 ftype:12db ]", - "[ 5/2 → 8/3 | note:g3 s:square bandf:200 bpdecay:0.1 bpsustain:0.75 ftype:12db ]", - "[ 8/3 → 17/6 | note:ab3 s:square bandf:200 bpdecay:0.1 bpsustain:0.75 ftype:12db ]", - "[ 17/6 → 3/1 | note:bb3 s:square bandf:200 bpdecay:0.1 bpsustain:0.75 ftype:12db ]", - "[ 3/1 → 19/6 | note:c3 s:square bandf:200 bpdecay:0.1 bpsustain:1 ftype:12db ]", - "[ 19/6 → 10/3 | note:e3 s:square bandf:200 bpdecay:0.1 bpsustain:1 ftype:12db ]", - "[ 10/3 → 7/2 | note:f3 s:square bandf:200 bpdecay:0.1 bpsustain:1 ftype:12db ]", - "[ 7/2 → 11/3 | note:g3 s:square bandf:200 bpdecay:0.1 bpsustain:1 ftype:12db ]", - "[ 11/3 → 23/6 | note:ab3 s:square bandf:200 bpdecay:0.1 bpsustain:1 ftype:12db ]", - "[ 23/6 → 4/1 | note:bb3 s:square bandf:200 bpdecay:0.1 bpsustain:1 ftype:12db ]", + "[ 0/1 → 1/1 | note:c2 s:sawtooth cutoff:0 lpdecay:0.5 lpsustain:0 lpenv:4 ]", + "[ 1/1 → 2/1 | note:e2 s:sawtooth cutoff:0 lpdecay:0.5 lpsustain:0 lpenv:4 ]", + "[ 2/1 → 3/1 | note:f2 s:sawtooth cutoff:0 lpdecay:0.5 lpsustain:0 lpenv:4 ]", + "[ 3/1 → 4/1 | note:g2 s:sawtooth cutoff:0 lpdecay:0.5 lpsustain:0 lpenv:4 ]", ] `; From 9d5f9190234becd327b800384b30b1960063c1fb Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 15 Sep 2023 23:12:39 +0200 Subject: [PATCH 36/80] add all filter envelope examples to doc --- packages/core/controls.mjs | 100 ++++++++++++++++++---------- website/src/pages/learn/effects.mdx | 69 ++++++++++++++++--- 2 files changed, 127 insertions(+), 42 deletions(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index c31c68aa..dd865df5 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -397,8 +397,17 @@ const generic_params = [ * @param {number | Pattern} modulation depth of the highpass filter envelope between 0 and _n_ * @synonyms hpe * @example - * note("c2 c3").fast(2).sound("sawtooth") - * .hcutoff(500).hpenv("<1 2 3 4 5 6 7 8>") + * note("") + * .sound('sawtooth') + * .hpf(500) + * .hpa(.1).hpd(.1).hps(.5) + * .hpenv("<8 4 2 0>/4") + * @example + * note("") + * .sound('sawtooth') + * .hpf(500) + * .hpa(.5) + * .hpenv("<2 -2>/4") */ ['hpenv', 'hpe'], /** @@ -407,8 +416,11 @@ const generic_params = [ * @param {number | Pattern} modulation depth of the bandpass filter envelope between 0 and _n_ * @synonyms bpe * @example - * note("c2 c3").fast(2).sound("sawtooth") - * .bandf(500).bpenv("<1 2 3 4 5 6 7 8>") + * note("") + * .sound('sawtooth') + * .bpf(500) + * .bpa(.1).bpd(.1).bps(.5) + * .bpenv("<8 4 2 0>/4") */ ['bpenv', 'bpe'], /** @@ -430,22 +442,24 @@ const generic_params = [ * @param {number | Pattern} attack time of the highpass filter envelope * @synonyms hpa * @example - * note("c3 e3 f3 g3 ab3 bb3") - * .sound('square').hcutoff(1000) - * .hpattack("<0.5 0.25 0.1 0.01>/2").ftype("12db") - * .release(0.2).attack(0) + * note("") + * .sound('sawtooth') + * .hpf(500) + * .hpa("<.5 .25 .1 .01>/4") + * .hpenv(4) */ ['hpattack', 'hpa'], /** * Sets the attack duration for the bandpass filter envelope. - * @name hpattack + * @name bpattack * @param {number | Pattern} attack time of the bandpass filter envelope * @synonyms bpa * @example - * note("c3 e3 f3 g3 ab3 bb3") - * .sound('square').bandf(1000) - * .bpattack("<0.05 0.1 0.25 0.5>/2").ftype("12db") - * .release(0.2).attack(0) + * note("") + * .sound('sawtooth') + * .bpf(500) + * .bpa("<.5 .25 .1 .01>/4") + * .bpenv(4) */ ['bpattack', 'bpa'], /** @@ -468,11 +482,12 @@ const generic_params = [ * @param {number | Pattern} decay time of the highpass filter envelope * @synonyms hpd * @example - * "baba" - * note("c3 e3 f3 g3 ab3 bb3") - * .sound('square').hcutoff(1000) - * .hpdecay("<0.05 0.1 0.125>/2") - * .ftype("12db").hps(0).hpr(0) + * note("") + * .sound('sawtooth') + * .hpf(500) + * .hpd("<.5 .25 .1 0>/4") + * .hps(0.2) + * .hpenv(4) */ ['hpdecay', 'hpd'], /** @@ -481,11 +496,12 @@ const generic_params = [ * @param {number | Pattern} decay time of the bandpass filter envelope * @synonyms bpd * @example - * "baba" - * note("c3 e3 f3 g3 ab3 bb3") - * .sound('square').bandf(1000) - * .bpdecay("<0.05 0.1 0.125>/2") - * .ftype("12db").bps(0).bpr(0) + * note("") + * .sound('sawtooth') + * .bpf(500) + * .bpd("<.5 .25 .1 0>/4") + * .bps(0.2) + * .bpenv(4) */ ['bpdecay', 'bpd'], /** @@ -508,22 +524,26 @@ const generic_params = [ * @param {number | Pattern} sustain amplitude of the highpass filter envelope * @synonyms hps * @example - * note("c3 e3 f3 g3 ab3 bb3") - * .sound('square').hcutoff(200) - * .hpd(0.1).hpsustain("<0.1 0.5 0.75 1>") - * .ftype("12db") + * note("") + * .sound('sawtooth') + * .hpf(0) + * .hpd(.5) + * .hps("<0 .25 .5 1>/4") + * .hpenv(4) */ ['hpsustain', 'hps'], /** * Sets the sustain amplitude for the bandpass filter envelope. - * @name hpsustain + * @name bpsustain * @param {number | Pattern} sustain amplitude of the bandpass filter envelope * @synonyms bps * @example - * note("c3 e3 f3 g3 ab3 bb3") - * .sound('square').bandf(200) - * .bpd(0.1).bpsustain("<0.1 0.5 0.75 1>") - * .ftype("12db") + * note("") + * .sound('sawtooth') + * .bpf(0) + * .bpd(.5) + * .bps("<0 .25 .5 1>/4") + * .bpenv(4) */ ['bpsustain', 'bps'], /** @@ -547,7 +567,13 @@ const generic_params = [ * @param {number | Pattern} release time of the highpass filter envelope * @synonyms hpr * @example - * note("c3 e3 g3 c4").hpr("<0.1 0.25 0.5>").ftype("12db") + * note("") + * .sound('sawtooth') + * .clip(.5) + * .hpf(0) + * .hpenv(4) + * .hpr("<.5 .25 .1 0>/4") + * .release(.5) */ ['hprelease', 'hpr'], /** @@ -556,7 +582,13 @@ const generic_params = [ * @param {number | Pattern} release time of the bandpass filter envelope * @synonyms bpr * @example - * note("c3 e3 g3 c4").bpr("<0.1 0.25 0.5>").ftype("12db") + * note("") + * .sound('sawtooth') + * .clip(.5) + * .bpf(0) + * .bpenv(4) + * .bpr("<.5 .25 .1 0>/4") + * .release(.5) */ ['bprelease', 'bpr'], ['ftype'], diff --git a/website/src/pages/learn/effects.mdx b/website/src/pages/learn/effects.mdx index 90f9510e..62e3a52d 100644 --- a/website/src/pages/learn/effects.mdx +++ b/website/src/pages/learn/effects.mdx @@ -93,32 +93,85 @@ There is one filter envelope for each filter type and thus one set of envelope f ## lpattack -- Also `hpattack` and `bpattack`. - ## lpdecay -- Also `hpdecay` and `bpdecay`. - ## lpsustain -- Also `hpsustain` and `bpsustain`. - ## lprelease -- Also `hprelease` and `bprelease`. - ## lpenv +## hpattack + + + +## hpdecay + + + +## hpsustain + + + +## hprelease + + + +## hpenv + + + +## hpattack + + + +## hpdecay + + + +## hpsustain + + + +## hprelease + + + +## hpenv + + + +## bpattack + + + +## bpdecay + + + +## bpsustain + + + +## bprelease + + + +## bpenv + + + + # Dynamics ## gain From 828e4759219b49ec3d403856e6f0502cb72f5aa9 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 15 Sep 2023 23:12:51 +0200 Subject: [PATCH 37/80] support negative fenv --- packages/superdough/helpers.mjs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/packages/superdough/helpers.mjs b/packages/superdough/helpers.mjs index 45162a36..b6530343 100644 --- a/packages/superdough/helpers.mjs +++ b/packages/superdough/helpers.mjs @@ -1,4 +1,5 @@ import { getAudioContext } from './superdough.mjs'; +import { clamp } from './util.mjs'; export function gainNode(value) { const node = getAudioContext().createGain(); @@ -85,9 +86,19 @@ export function createFilter(context, type, frequency, Q, attack, decay, sustain filter.frequency.value = frequency; // Apply ADSR to filter frequency - if (fenv > 0) { - const min = frequency; - const max = Math.min(frequency + 200 * 2 ** fenv, 20000); + if (fenv !== 0) { + let min = 0; + let max = Math.sign(fenv) * 200 * 2 ** Math.abs(fenv); + if (max < min) { + // offset by max: keep range when *penv sign is flipped + // comment those lines out to center around cutoff instead peak + min += Math.abs(max); + max += Math.abs(max); + } + + min = clamp(min + frequency, 0, 20000); + max = clamp(max + frequency, 0, 20000); + // console.log('min', min, 'max', max); getParamADSR(filter.frequency, attack, decay, sustain, release, min, max, start, end); return filter; } From 7e55258bbf63c91756007254f62dd39e152ff5a6 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 15 Sep 2023 23:13:30 +0200 Subject: [PATCH 38/80] update snapshots --- test/__snapshots__/examples.test.mjs.snap | 277 +++++----------------- 1 file changed, 59 insertions(+), 218 deletions(-) diff --git a/test/__snapshots__/examples.test.mjs.snap b/test/__snapshots__/examples.test.mjs.snap index 7f9dd6f9..ed05a561 100644 --- a/test/__snapshots__/examples.test.mjs.snap +++ b/test/__snapshots__/examples.test.mjs.snap @@ -900,53 +900,30 @@ exports[`runs examples > example "begin" example index 0 1`] = ` ] `; +exports[`runs examples > example "bpattack" example index 0 1`] = ` +[ + "[ 0/1 → 1/1 | note:c2 s:sawtooth bandf:500 bpattack:0.5 bpenv:4 ]", + "[ 1/1 → 2/1 | note:e2 s:sawtooth bandf:500 bpattack:0.5 bpenv:4 ]", + "[ 2/1 → 3/1 | note:f2 s:sawtooth bandf:500 bpattack:0.5 bpenv:4 ]", + "[ 3/1 → 4/1 | note:g2 s:sawtooth bandf:500 bpattack:0.5 bpenv:4 ]", +] +`; + exports[`runs examples > example "bpdecay" example index 0 1`] = ` [ - "[ 0/1 → 1/6 | note:c3 s:square bandf:1000 bpdecay:0.05 ftype:12db bpsustain:0 bprelease:0 ]", - "[ 1/6 → 1/3 | note:e3 s:square bandf:1000 bpdecay:0.05 ftype:12db bpsustain:0 bprelease:0 ]", - "[ 1/3 → 1/2 | note:f3 s:square bandf:1000 bpdecay:0.05 ftype:12db bpsustain:0 bprelease:0 ]", - "[ 1/2 → 2/3 | note:g3 s:square bandf:1000 bpdecay:0.05 ftype:12db bpsustain:0 bprelease:0 ]", - "[ 2/3 → 5/6 | note:ab3 s:square bandf:1000 bpdecay:0.05 ftype:12db bpsustain:0 bprelease:0 ]", - "[ 5/6 → 1/1 | note:bb3 s:square bandf:1000 bpdecay:0.05 ftype:12db bpsustain:0 bprelease:0 ]", - "[ 1/1 → 7/6 | note:c3 s:square bandf:1000 bpdecay:0.05 ftype:12db bpsustain:0 bprelease:0 ]", - "[ 7/6 → 4/3 | note:e3 s:square bandf:1000 bpdecay:0.05 ftype:12db bpsustain:0 bprelease:0 ]", - "[ 4/3 → 3/2 | note:f3 s:square bandf:1000 bpdecay:0.05 ftype:12db bpsustain:0 bprelease:0 ]", - "[ 3/2 → 5/3 | note:g3 s:square bandf:1000 bpdecay:0.05 ftype:12db bpsustain:0 bprelease:0 ]", - "[ 5/3 → 11/6 | note:ab3 s:square bandf:1000 bpdecay:0.05 ftype:12db bpsustain:0 bprelease:0 ]", - "[ 11/6 → 2/1 | note:bb3 s:square bandf:1000 bpdecay:0.05 ftype:12db bpsustain:0 bprelease:0 ]", - "[ 2/1 → 13/6 | note:c3 s:square bandf:1000 bpdecay:0.1 ftype:12db bpsustain:0 bprelease:0 ]", - "[ 13/6 → 7/3 | note:e3 s:square bandf:1000 bpdecay:0.1 ftype:12db bpsustain:0 bprelease:0 ]", - "[ 7/3 → 5/2 | note:f3 s:square bandf:1000 bpdecay:0.1 ftype:12db bpsustain:0 bprelease:0 ]", - "[ 5/2 → 8/3 | note:g3 s:square bandf:1000 bpdecay:0.1 ftype:12db bpsustain:0 bprelease:0 ]", - "[ 8/3 → 17/6 | note:ab3 s:square bandf:1000 bpdecay:0.1 ftype:12db bpsustain:0 bprelease:0 ]", - "[ 17/6 → 3/1 | note:bb3 s:square bandf:1000 bpdecay:0.1 ftype:12db bpsustain:0 bprelease:0 ]", - "[ 3/1 → 19/6 | note:c3 s:square bandf:1000 bpdecay:0.1 ftype:12db bpsustain:0 bprelease:0 ]", - "[ 19/6 → 10/3 | note:e3 s:square bandf:1000 bpdecay:0.1 ftype:12db bpsustain:0 bprelease:0 ]", - "[ 10/3 → 7/2 | note:f3 s:square bandf:1000 bpdecay:0.1 ftype:12db bpsustain:0 bprelease:0 ]", - "[ 7/2 → 11/3 | note:g3 s:square bandf:1000 bpdecay:0.1 ftype:12db bpsustain:0 bprelease:0 ]", - "[ 11/3 → 23/6 | note:ab3 s:square bandf:1000 bpdecay:0.1 ftype:12db bpsustain:0 bprelease:0 ]", - "[ 23/6 → 4/1 | note:bb3 s:square bandf:1000 bpdecay:0.1 ftype:12db bpsustain:0 bprelease:0 ]", + "[ 0/1 → 1/1 | note:c2 s:sawtooth bandf:500 bpdecay:0.5 bpsustain:0.2 bpenv:4 ]", + "[ 1/1 → 2/1 | note:e2 s:sawtooth bandf:500 bpdecay:0.5 bpsustain:0.2 bpenv:4 ]", + "[ 2/1 → 3/1 | note:f2 s:sawtooth bandf:500 bpdecay:0.5 bpsustain:0.2 bpenv:4 ]", + "[ 3/1 → 4/1 | note:g2 s:sawtooth bandf:500 bpdecay:0.5 bpsustain:0.2 bpenv:4 ]", ] `; exports[`runs examples > example "bpenv" example index 0 1`] = ` [ - "[ 0/1 → 1/4 | note:c2 s:sawtooth bandf:500 bpenv:1 ]", - "[ 1/4 → 1/2 | note:c3 s:sawtooth bandf:500 bpenv:1 ]", - "[ 1/2 → 3/4 | note:c2 s:sawtooth bandf:500 bpenv:1 ]", - "[ 3/4 → 1/1 | note:c3 s:sawtooth bandf:500 bpenv:1 ]", - "[ 1/1 → 5/4 | note:c2 s:sawtooth bandf:500 bpenv:2 ]", - "[ 5/4 → 3/2 | note:c3 s:sawtooth bandf:500 bpenv:2 ]", - "[ 3/2 → 7/4 | note:c2 s:sawtooth bandf:500 bpenv:2 ]", - "[ 7/4 → 2/1 | note:c3 s:sawtooth bandf:500 bpenv:2 ]", - "[ 2/1 → 9/4 | note:c2 s:sawtooth bandf:500 bpenv:3 ]", - "[ 9/4 → 5/2 | note:c3 s:sawtooth bandf:500 bpenv:3 ]", - "[ 5/2 → 11/4 | note:c2 s:sawtooth bandf:500 bpenv:3 ]", - "[ 11/4 → 3/1 | note:c3 s:sawtooth bandf:500 bpenv:3 ]", - "[ 3/1 → 13/4 | note:c2 s:sawtooth bandf:500 bpenv:4 ]", - "[ 13/4 → 7/2 | note:c3 s:sawtooth bandf:500 bpenv:4 ]", - "[ 7/2 → 15/4 | note:c2 s:sawtooth bandf:500 bpenv:4 ]", - "[ 15/4 → 4/1 | note:c3 s:sawtooth bandf:500 bpenv:4 ]", + "[ 0/1 → 1/1 | note:c2 s:sawtooth bandf:500 bpattack:0.1 bpdecay:0.1 bpsustain:0.5 bpenv:8 ]", + "[ 1/1 → 2/1 | note:e2 s:sawtooth bandf:500 bpattack:0.1 bpdecay:0.1 bpsustain:0.5 bpenv:8 ]", + "[ 2/1 → 3/1 | note:f2 s:sawtooth bandf:500 bpattack:0.1 bpdecay:0.1 bpsustain:0.5 bpenv:8 ]", + "[ 3/1 → 4/1 | note:g2 s:sawtooth bandf:500 bpattack:0.1 bpdecay:0.1 bpsustain:0.5 bpenv:8 ]", ] `; @@ -990,22 +967,19 @@ exports[`runs examples > example "bpq" example index 0 1`] = ` exports[`runs examples > example "bprelease" example index 0 1`] = ` [ - "[ 0/1 → 1/4 | note:c3 bprelease:0.1 ftype:12db ]", - "[ 1/4 → 1/2 | note:e3 bprelease:0.1 ftype:12db ]", - "[ 1/2 → 3/4 | note:g3 bprelease:0.1 ftype:12db ]", - "[ 3/4 → 1/1 | note:c4 bprelease:0.1 ftype:12db ]", - "[ 1/1 → 5/4 | note:c3 bprelease:0.25 ftype:12db ]", - "[ 5/4 → 3/2 | note:e3 bprelease:0.25 ftype:12db ]", - "[ 3/2 → 7/4 | note:g3 bprelease:0.25 ftype:12db ]", - "[ 7/4 → 2/1 | note:c4 bprelease:0.25 ftype:12db ]", - "[ 2/1 → 9/4 | note:c3 bprelease:0.5 ftype:12db ]", - "[ 9/4 → 5/2 | note:e3 bprelease:0.5 ftype:12db ]", - "[ 5/2 → 11/4 | note:g3 bprelease:0.5 ftype:12db ]", - "[ 11/4 → 3/1 | note:c4 bprelease:0.5 ftype:12db ]", - "[ 3/1 → 13/4 | note:c3 bprelease:0.1 ftype:12db ]", - "[ 13/4 → 7/2 | note:e3 bprelease:0.1 ftype:12db ]", - "[ 7/2 → 15/4 | note:g3 bprelease:0.1 ftype:12db ]", - "[ 15/4 → 4/1 | note:c4 bprelease:0.1 ftype:12db ]", + "[ 0/1 → 1/1 | note:c2 s:sawtooth clip:0.5 bandf:0 bpenv:4 bprelease:0.5 release:0.5 ]", + "[ 1/1 → 2/1 | note:e2 s:sawtooth clip:0.5 bandf:0 bpenv:4 bprelease:0.5 release:0.5 ]", + "[ 2/1 → 3/1 | note:f2 s:sawtooth clip:0.5 bandf:0 bpenv:4 bprelease:0.5 release:0.5 ]", + "[ 3/1 → 4/1 | note:g2 s:sawtooth clip:0.5 bandf:0 bpenv:4 bprelease:0.5 release:0.5 ]", +] +`; + +exports[`runs examples > example "bpsustain" example index 0 1`] = ` +[ + "[ 0/1 → 1/1 | note:c2 s:sawtooth bandf:0 bpdecay:0.5 bpsustain:0 bpenv:4 ]", + "[ 1/1 → 2/1 | note:e2 s:sawtooth bandf:0 bpdecay:0.5 bpsustain:0 bpenv:4 ]", + "[ 2/1 → 3/1 | note:f2 s:sawtooth bandf:0 bpdecay:0.5 bpsustain:0 bpenv:4 ]", + "[ 3/1 → 4/1 | note:g2 s:sawtooth bandf:0 bpdecay:0.5 bpsustain:0 bpenv:4 ]", ] `; @@ -2123,109 +2097,37 @@ exports[`runs examples > example "gain" example index 0 1`] = ` exports[`runs examples > example "hpattack" example index 0 1`] = ` [ - "[ 0/1 → 1/6 | note:c3 s:square hcutoff:1000 hpattack:0.5 ftype:12db release:0.2 attack:0 ]", - "[ 1/6 → 1/3 | note:e3 s:square hcutoff:1000 hpattack:0.5 ftype:12db release:0.2 attack:0 ]", - "[ 1/3 → 1/2 | note:f3 s:square hcutoff:1000 hpattack:0.5 ftype:12db release:0.2 attack:0 ]", - "[ 1/2 → 2/3 | note:g3 s:square hcutoff:1000 hpattack:0.5 ftype:12db release:0.2 attack:0 ]", - "[ 2/3 → 5/6 | note:ab3 s:square hcutoff:1000 hpattack:0.5 ftype:12db release:0.2 attack:0 ]", - "[ 5/6 → 1/1 | note:bb3 s:square hcutoff:1000 hpattack:0.5 ftype:12db release:0.2 attack:0 ]", - "[ 1/1 → 7/6 | note:c3 s:square hcutoff:1000 hpattack:0.5 ftype:12db release:0.2 attack:0 ]", - "[ 7/6 → 4/3 | note:e3 s:square hcutoff:1000 hpattack:0.5 ftype:12db release:0.2 attack:0 ]", - "[ 4/3 → 3/2 | note:f3 s:square hcutoff:1000 hpattack:0.5 ftype:12db release:0.2 attack:0 ]", - "[ 3/2 → 5/3 | note:g3 s:square hcutoff:1000 hpattack:0.5 ftype:12db release:0.2 attack:0 ]", - "[ 5/3 → 11/6 | note:ab3 s:square hcutoff:1000 hpattack:0.5 ftype:12db release:0.2 attack:0 ]", - "[ 11/6 → 2/1 | note:bb3 s:square hcutoff:1000 hpattack:0.5 ftype:12db release:0.2 attack:0 ]", - "[ 2/1 → 13/6 | note:c3 s:square hcutoff:1000 hpattack:0.25 ftype:12db release:0.2 attack:0 ]", - "[ 13/6 → 7/3 | note:e3 s:square hcutoff:1000 hpattack:0.25 ftype:12db release:0.2 attack:0 ]", - "[ 7/3 → 5/2 | note:f3 s:square hcutoff:1000 hpattack:0.25 ftype:12db release:0.2 attack:0 ]", - "[ 5/2 → 8/3 | note:g3 s:square hcutoff:1000 hpattack:0.25 ftype:12db release:0.2 attack:0 ]", - "[ 8/3 → 17/6 | note:ab3 s:square hcutoff:1000 hpattack:0.25 ftype:12db release:0.2 attack:0 ]", - "[ 17/6 → 3/1 | note:bb3 s:square hcutoff:1000 hpattack:0.25 ftype:12db release:0.2 attack:0 ]", - "[ 3/1 → 19/6 | note:c3 s:square hcutoff:1000 hpattack:0.25 ftype:12db release:0.2 attack:0 ]", - "[ 19/6 → 10/3 | note:e3 s:square hcutoff:1000 hpattack:0.25 ftype:12db release:0.2 attack:0 ]", - "[ 10/3 → 7/2 | note:f3 s:square hcutoff:1000 hpattack:0.25 ftype:12db release:0.2 attack:0 ]", - "[ 7/2 → 11/3 | note:g3 s:square hcutoff:1000 hpattack:0.25 ftype:12db release:0.2 attack:0 ]", - "[ 11/3 → 23/6 | note:ab3 s:square hcutoff:1000 hpattack:0.25 ftype:12db release:0.2 attack:0 ]", - "[ 23/6 → 4/1 | note:bb3 s:square hcutoff:1000 hpattack:0.25 ftype:12db release:0.2 attack:0 ]", -] -`; - -exports[`runs examples > example "hpattack" example index 0 2`] = ` -[ - "[ 0/1 → 1/6 | note:c3 s:square bandf:1000 bpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 1/6 → 1/3 | note:e3 s:square bandf:1000 bpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 1/3 → 1/2 | note:f3 s:square bandf:1000 bpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 1/2 → 2/3 | note:g3 s:square bandf:1000 bpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 2/3 → 5/6 | note:ab3 s:square bandf:1000 bpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 5/6 → 1/1 | note:bb3 s:square bandf:1000 bpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 1/1 → 7/6 | note:c3 s:square bandf:1000 bpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 7/6 → 4/3 | note:e3 s:square bandf:1000 bpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 4/3 → 3/2 | note:f3 s:square bandf:1000 bpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 3/2 → 5/3 | note:g3 s:square bandf:1000 bpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 5/3 → 11/6 | note:ab3 s:square bandf:1000 bpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 11/6 → 2/1 | note:bb3 s:square bandf:1000 bpattack:0.05 ftype:12db release:0.2 attack:0 ]", - "[ 2/1 → 13/6 | note:c3 s:square bandf:1000 bpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 13/6 → 7/3 | note:e3 s:square bandf:1000 bpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 7/3 → 5/2 | note:f3 s:square bandf:1000 bpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 5/2 → 8/3 | note:g3 s:square bandf:1000 bpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 8/3 → 17/6 | note:ab3 s:square bandf:1000 bpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 17/6 → 3/1 | note:bb3 s:square bandf:1000 bpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 3/1 → 19/6 | note:c3 s:square bandf:1000 bpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 19/6 → 10/3 | note:e3 s:square bandf:1000 bpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 10/3 → 7/2 | note:f3 s:square bandf:1000 bpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 7/2 → 11/3 | note:g3 s:square bandf:1000 bpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 11/3 → 23/6 | note:ab3 s:square bandf:1000 bpattack:0.1 ftype:12db release:0.2 attack:0 ]", - "[ 23/6 → 4/1 | note:bb3 s:square bandf:1000 bpattack:0.1 ftype:12db release:0.2 attack:0 ]", + "[ 0/1 → 1/1 | note:c2 s:sawtooth hcutoff:500 hpattack:0.5 hpenv:4 ]", + "[ 1/1 → 2/1 | note:e2 s:sawtooth hcutoff:500 hpattack:0.5 hpenv:4 ]", + "[ 2/1 → 3/1 | note:f2 s:sawtooth hcutoff:500 hpattack:0.5 hpenv:4 ]", + "[ 3/1 → 4/1 | note:g2 s:sawtooth hcutoff:500 hpattack:0.5 hpenv:4 ]", ] `; exports[`runs examples > example "hpdecay" example index 0 1`] = ` [ - "[ 0/1 → 1/6 | note:c3 s:square hcutoff:1000 hpdecay:0.05 ftype:12db hpsustain:0 hprelease:0 ]", - "[ 1/6 → 1/3 | note:e3 s:square hcutoff:1000 hpdecay:0.05 ftype:12db hpsustain:0 hprelease:0 ]", - "[ 1/3 → 1/2 | note:f3 s:square hcutoff:1000 hpdecay:0.05 ftype:12db hpsustain:0 hprelease:0 ]", - "[ 1/2 → 2/3 | note:g3 s:square hcutoff:1000 hpdecay:0.05 ftype:12db hpsustain:0 hprelease:0 ]", - "[ 2/3 → 5/6 | note:ab3 s:square hcutoff:1000 hpdecay:0.05 ftype:12db hpsustain:0 hprelease:0 ]", - "[ 5/6 → 1/1 | note:bb3 s:square hcutoff:1000 hpdecay:0.05 ftype:12db hpsustain:0 hprelease:0 ]", - "[ 1/1 → 7/6 | note:c3 s:square hcutoff:1000 hpdecay:0.05 ftype:12db hpsustain:0 hprelease:0 ]", - "[ 7/6 → 4/3 | note:e3 s:square hcutoff:1000 hpdecay:0.05 ftype:12db hpsustain:0 hprelease:0 ]", - "[ 4/3 → 3/2 | note:f3 s:square hcutoff:1000 hpdecay:0.05 ftype:12db hpsustain:0 hprelease:0 ]", - "[ 3/2 → 5/3 | note:g3 s:square hcutoff:1000 hpdecay:0.05 ftype:12db hpsustain:0 hprelease:0 ]", - "[ 5/3 → 11/6 | note:ab3 s:square hcutoff:1000 hpdecay:0.05 ftype:12db hpsustain:0 hprelease:0 ]", - "[ 11/6 → 2/1 | note:bb3 s:square hcutoff:1000 hpdecay:0.05 ftype:12db hpsustain:0 hprelease:0 ]", - "[ 2/1 → 13/6 | note:c3 s:square hcutoff:1000 hpdecay:0.1 ftype:12db hpsustain:0 hprelease:0 ]", - "[ 13/6 → 7/3 | note:e3 s:square hcutoff:1000 hpdecay:0.1 ftype:12db hpsustain:0 hprelease:0 ]", - "[ 7/3 → 5/2 | note:f3 s:square hcutoff:1000 hpdecay:0.1 ftype:12db hpsustain:0 hprelease:0 ]", - "[ 5/2 → 8/3 | note:g3 s:square hcutoff:1000 hpdecay:0.1 ftype:12db hpsustain:0 hprelease:0 ]", - "[ 8/3 → 17/6 | note:ab3 s:square hcutoff:1000 hpdecay:0.1 ftype:12db hpsustain:0 hprelease:0 ]", - "[ 17/6 → 3/1 | note:bb3 s:square hcutoff:1000 hpdecay:0.1 ftype:12db hpsustain:0 hprelease:0 ]", - "[ 3/1 → 19/6 | note:c3 s:square hcutoff:1000 hpdecay:0.1 ftype:12db hpsustain:0 hprelease:0 ]", - "[ 19/6 → 10/3 | note:e3 s:square hcutoff:1000 hpdecay:0.1 ftype:12db hpsustain:0 hprelease:0 ]", - "[ 10/3 → 7/2 | note:f3 s:square hcutoff:1000 hpdecay:0.1 ftype:12db hpsustain:0 hprelease:0 ]", - "[ 7/2 → 11/3 | note:g3 s:square hcutoff:1000 hpdecay:0.1 ftype:12db hpsustain:0 hprelease:0 ]", - "[ 11/3 → 23/6 | note:ab3 s:square hcutoff:1000 hpdecay:0.1 ftype:12db hpsustain:0 hprelease:0 ]", - "[ 23/6 → 4/1 | note:bb3 s:square hcutoff:1000 hpdecay:0.1 ftype:12db hpsustain:0 hprelease:0 ]", + "[ 0/1 → 1/1 | note:c2 s:sawtooth hcutoff:500 hpdecay:0.5 hpsustain:0.2 hpenv:4 ]", + "[ 1/1 → 2/1 | note:e2 s:sawtooth hcutoff:500 hpdecay:0.5 hpsustain:0.2 hpenv:4 ]", + "[ 2/1 → 3/1 | note:f2 s:sawtooth hcutoff:500 hpdecay:0.5 hpsustain:0.2 hpenv:4 ]", + "[ 3/1 → 4/1 | note:g2 s:sawtooth hcutoff:500 hpdecay:0.5 hpsustain:0.2 hpenv:4 ]", ] `; exports[`runs examples > example "hpenv" example index 0 1`] = ` [ - "[ 0/1 → 1/4 | note:c2 s:sawtooth hcutoff:500 hpenv:1 ]", - "[ 1/4 → 1/2 | note:c3 s:sawtooth hcutoff:500 hpenv:1 ]", - "[ 1/2 → 3/4 | note:c2 s:sawtooth hcutoff:500 hpenv:1 ]", - "[ 3/4 → 1/1 | note:c3 s:sawtooth hcutoff:500 hpenv:1 ]", - "[ 1/1 → 5/4 | note:c2 s:sawtooth hcutoff:500 hpenv:2 ]", - "[ 5/4 → 3/2 | note:c3 s:sawtooth hcutoff:500 hpenv:2 ]", - "[ 3/2 → 7/4 | note:c2 s:sawtooth hcutoff:500 hpenv:2 ]", - "[ 7/4 → 2/1 | note:c3 s:sawtooth hcutoff:500 hpenv:2 ]", - "[ 2/1 → 9/4 | note:c2 s:sawtooth hcutoff:500 hpenv:3 ]", - "[ 9/4 → 5/2 | note:c3 s:sawtooth hcutoff:500 hpenv:3 ]", - "[ 5/2 → 11/4 | note:c2 s:sawtooth hcutoff:500 hpenv:3 ]", - "[ 11/4 → 3/1 | note:c3 s:sawtooth hcutoff:500 hpenv:3 ]", - "[ 3/1 → 13/4 | note:c2 s:sawtooth hcutoff:500 hpenv:4 ]", - "[ 13/4 → 7/2 | note:c3 s:sawtooth hcutoff:500 hpenv:4 ]", - "[ 7/2 → 15/4 | note:c2 s:sawtooth hcutoff:500 hpenv:4 ]", - "[ 15/4 → 4/1 | note:c3 s:sawtooth hcutoff:500 hpenv:4 ]", + "[ 0/1 → 1/1 | note:c2 s:sawtooth hcutoff:500 hpattack:0.1 hpdecay:0.1 hpsustain:0.5 hpenv:8 ]", + "[ 1/1 → 2/1 | note:e2 s:sawtooth hcutoff:500 hpattack:0.1 hpdecay:0.1 hpsustain:0.5 hpenv:8 ]", + "[ 2/1 → 3/1 | note:f2 s:sawtooth hcutoff:500 hpattack:0.1 hpdecay:0.1 hpsustain:0.5 hpenv:8 ]", + "[ 3/1 → 4/1 | note:g2 s:sawtooth hcutoff:500 hpattack:0.1 hpdecay:0.1 hpsustain:0.5 hpenv:8 ]", +] +`; + +exports[`runs examples > example "hpenv" example index 1 1`] = ` +[ + "[ 0/1 → 1/1 | note:c2 s:sawtooth hcutoff:500 hpattack:0.5 hpenv:2 ]", + "[ 1/1 → 2/1 | note:e2 s:sawtooth hcutoff:500 hpattack:0.5 hpenv:2 ]", + "[ 2/1 → 3/1 | note:f2 s:sawtooth hcutoff:500 hpattack:0.5 hpenv:2 ]", + "[ 3/1 → 4/1 | note:g2 s:sawtooth hcutoff:500 hpattack:0.5 hpenv:2 ]", ] `; @@ -2318,80 +2220,19 @@ exports[`runs examples > example "hpq" example index 0 1`] = ` exports[`runs examples > example "hprelease" example index 0 1`] = ` [ - "[ 0/1 → 1/4 | note:c3 hprelease:0.1 ftype:12db ]", - "[ 1/4 → 1/2 | note:e3 hprelease:0.1 ftype:12db ]", - "[ 1/2 → 3/4 | note:g3 hprelease:0.1 ftype:12db ]", - "[ 3/4 → 1/1 | note:c4 hprelease:0.1 ftype:12db ]", - "[ 1/1 → 5/4 | note:c3 hprelease:0.25 ftype:12db ]", - "[ 5/4 → 3/2 | note:e3 hprelease:0.25 ftype:12db ]", - "[ 3/2 → 7/4 | note:g3 hprelease:0.25 ftype:12db ]", - "[ 7/4 → 2/1 | note:c4 hprelease:0.25 ftype:12db ]", - "[ 2/1 → 9/4 | note:c3 hprelease:0.5 ftype:12db ]", - "[ 9/4 → 5/2 | note:e3 hprelease:0.5 ftype:12db ]", - "[ 5/2 → 11/4 | note:g3 hprelease:0.5 ftype:12db ]", - "[ 11/4 → 3/1 | note:c4 hprelease:0.5 ftype:12db ]", - "[ 3/1 → 13/4 | note:c3 hprelease:0.1 ftype:12db ]", - "[ 13/4 → 7/2 | note:e3 hprelease:0.1 ftype:12db ]", - "[ 7/2 → 15/4 | note:g3 hprelease:0.1 ftype:12db ]", - "[ 15/4 → 4/1 | note:c4 hprelease:0.1 ftype:12db ]", + "[ 0/1 → 1/1 | note:c2 s:sawtooth clip:0.5 hcutoff:0 hpenv:4 hprelease:0.5 release:0.5 ]", + "[ 1/1 → 2/1 | note:e2 s:sawtooth clip:0.5 hcutoff:0 hpenv:4 hprelease:0.5 release:0.5 ]", + "[ 2/1 → 3/1 | note:f2 s:sawtooth clip:0.5 hcutoff:0 hpenv:4 hprelease:0.5 release:0.5 ]", + "[ 3/1 → 4/1 | note:g2 s:sawtooth clip:0.5 hcutoff:0 hpenv:4 hprelease:0.5 release:0.5 ]", ] `; exports[`runs examples > example "hpsustain" example index 0 1`] = ` [ - "[ 0/1 → 1/6 | note:c3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.1 ftype:12db ]", - "[ 1/6 → 1/3 | note:e3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.1 ftype:12db ]", - "[ 1/3 → 1/2 | note:f3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.1 ftype:12db ]", - "[ 1/2 → 2/3 | note:g3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.1 ftype:12db ]", - "[ 2/3 → 5/6 | note:ab3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.1 ftype:12db ]", - "[ 5/6 → 1/1 | note:bb3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.1 ftype:12db ]", - "[ 1/1 → 7/6 | note:c3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.5 ftype:12db ]", - "[ 7/6 → 4/3 | note:e3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.5 ftype:12db ]", - "[ 4/3 → 3/2 | note:f3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.5 ftype:12db ]", - "[ 3/2 → 5/3 | note:g3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.5 ftype:12db ]", - "[ 5/3 → 11/6 | note:ab3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.5 ftype:12db ]", - "[ 11/6 → 2/1 | note:bb3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.5 ftype:12db ]", - "[ 2/1 → 13/6 | note:c3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.75 ftype:12db ]", - "[ 13/6 → 7/3 | note:e3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.75 ftype:12db ]", - "[ 7/3 → 5/2 | note:f3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.75 ftype:12db ]", - "[ 5/2 → 8/3 | note:g3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.75 ftype:12db ]", - "[ 8/3 → 17/6 | note:ab3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.75 ftype:12db ]", - "[ 17/6 → 3/1 | note:bb3 s:square hcutoff:200 hpdecay:0.1 hpsustain:0.75 ftype:12db ]", - "[ 3/1 → 19/6 | note:c3 s:square hcutoff:200 hpdecay:0.1 hpsustain:1 ftype:12db ]", - "[ 19/6 → 10/3 | note:e3 s:square hcutoff:200 hpdecay:0.1 hpsustain:1 ftype:12db ]", - "[ 10/3 → 7/2 | note:f3 s:square hcutoff:200 hpdecay:0.1 hpsustain:1 ftype:12db ]", - "[ 7/2 → 11/3 | note:g3 s:square hcutoff:200 hpdecay:0.1 hpsustain:1 ftype:12db ]", - "[ 11/3 → 23/6 | note:ab3 s:square hcutoff:200 hpdecay:0.1 hpsustain:1 ftype:12db ]", - "[ 23/6 → 4/1 | note:bb3 s:square hcutoff:200 hpdecay:0.1 hpsustain:1 ftype:12db ]", -] -`; - -exports[`runs examples > example "hpsustain" example index 0 2`] = ` -[ - "[ 0/1 → 1/6 | note:c3 s:square bandf:200 bpdecay:0.1 bpsustain:0.1 ftype:12db ]", - "[ 1/6 → 1/3 | note:e3 s:square bandf:200 bpdecay:0.1 bpsustain:0.1 ftype:12db ]", - "[ 1/3 → 1/2 | note:f3 s:square bandf:200 bpdecay:0.1 bpsustain:0.1 ftype:12db ]", - "[ 1/2 → 2/3 | note:g3 s:square bandf:200 bpdecay:0.1 bpsustain:0.1 ftype:12db ]", - "[ 2/3 → 5/6 | note:ab3 s:square bandf:200 bpdecay:0.1 bpsustain:0.1 ftype:12db ]", - "[ 5/6 → 1/1 | note:bb3 s:square bandf:200 bpdecay:0.1 bpsustain:0.1 ftype:12db ]", - "[ 1/1 → 7/6 | note:c3 s:square bandf:200 bpdecay:0.1 bpsustain:0.5 ftype:12db ]", - "[ 7/6 → 4/3 | note:e3 s:square bandf:200 bpdecay:0.1 bpsustain:0.5 ftype:12db ]", - "[ 4/3 → 3/2 | note:f3 s:square bandf:200 bpdecay:0.1 bpsustain:0.5 ftype:12db ]", - "[ 3/2 → 5/3 | note:g3 s:square bandf:200 bpdecay:0.1 bpsustain:0.5 ftype:12db ]", - "[ 5/3 → 11/6 | note:ab3 s:square bandf:200 bpdecay:0.1 bpsustain:0.5 ftype:12db ]", - "[ 11/6 → 2/1 | note:bb3 s:square bandf:200 bpdecay:0.1 bpsustain:0.5 ftype:12db ]", - "[ 2/1 → 13/6 | note:c3 s:square bandf:200 bpdecay:0.1 bpsustain:0.75 ftype:12db ]", - "[ 13/6 → 7/3 | note:e3 s:square bandf:200 bpdecay:0.1 bpsustain:0.75 ftype:12db ]", - "[ 7/3 → 5/2 | note:f3 s:square bandf:200 bpdecay:0.1 bpsustain:0.75 ftype:12db ]", - "[ 5/2 → 8/3 | note:g3 s:square bandf:200 bpdecay:0.1 bpsustain:0.75 ftype:12db ]", - "[ 8/3 → 17/6 | note:ab3 s:square bandf:200 bpdecay:0.1 bpsustain:0.75 ftype:12db ]", - "[ 17/6 → 3/1 | note:bb3 s:square bandf:200 bpdecay:0.1 bpsustain:0.75 ftype:12db ]", - "[ 3/1 → 19/6 | note:c3 s:square bandf:200 bpdecay:0.1 bpsustain:1 ftype:12db ]", - "[ 19/6 → 10/3 | note:e3 s:square bandf:200 bpdecay:0.1 bpsustain:1 ftype:12db ]", - "[ 10/3 → 7/2 | note:f3 s:square bandf:200 bpdecay:0.1 bpsustain:1 ftype:12db ]", - "[ 7/2 → 11/3 | note:g3 s:square bandf:200 bpdecay:0.1 bpsustain:1 ftype:12db ]", - "[ 11/3 → 23/6 | note:ab3 s:square bandf:200 bpdecay:0.1 bpsustain:1 ftype:12db ]", - "[ 23/6 → 4/1 | note:bb3 s:square bandf:200 bpdecay:0.1 bpsustain:1 ftype:12db ]", + "[ 0/1 → 1/1 | note:c2 s:sawtooth hcutoff:0 hpdecay:0.5 hpsustain:0 hpenv:4 ]", + "[ 1/1 → 2/1 | note:e2 s:sawtooth hcutoff:0 hpdecay:0.5 hpsustain:0 hpenv:4 ]", + "[ 2/1 → 3/1 | note:f2 s:sawtooth hcutoff:0 hpdecay:0.5 hpsustain:0 hpenv:4 ]", + "[ 3/1 → 4/1 | note:g2 s:sawtooth hcutoff:0 hpdecay:0.5 hpsustain:0 hpenv:4 ]", ] `; From 4688c0bf103b5157ae91d8c3de375abbf709f69d Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 15 Sep 2023 23:13:49 +0200 Subject: [PATCH 39/80] format --- website/src/pages/learn/effects.mdx | 1 - 1 file changed, 1 deletion(-) diff --git a/website/src/pages/learn/effects.mdx b/website/src/pages/learn/effects.mdx index 62e3a52d..f5ee12ab 100644 --- a/website/src/pages/learn/effects.mdx +++ b/website/src/pages/learn/effects.mdx @@ -171,7 +171,6 @@ There is one filter envelope for each filter type and thus one set of envelope f - # Dynamics ## gain From 9142fb753a143e3c5bf641d534cec624a8e14c37 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 15 Sep 2023 23:36:55 +0200 Subject: [PATCH 40/80] cleaner default filter envelope - fixes some unexpected envelope glitches --- packages/superdough/superdough.mjs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/superdough/superdough.mjs b/packages/superdough/superdough.mjs index 3afe470e..601ab9e0 100644 --- a/packages/superdough/superdough.mjs +++ b/packages/superdough/superdough.mjs @@ -183,24 +183,24 @@ export const superdough = async (value, deadline, hapDuration) => { cutoff, lpenv, lpattack = 0.01, - lpdecay = 0.5, - lpsustain = 0.6, + lpdecay = 0.01, + lpsustain = 1, lprelease = 0.01, resonance = 1, // high pass hpenv, hcutoff, hpattack = 0.01, - hpdecay = 0.5, - hpsustain = 0.6, + hpdecay = 0.01, + hpsustain = 1, hprelease = 0.01, hresonance = 1, // band pass bpenv, bandf, bpattack = 0.01, - bpdecay = 0.5, - bpsustain = 0.6, + bpdecay = 0.01, + bpsustain = 1, bprelease = 0.01, bandq = 1, // From 88c029202cd24bf3e2457b4c61307e7e94461837 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 15 Sep 2023 23:37:27 +0200 Subject: [PATCH 41/80] simplify fenv examples --- packages/core/controls.mjs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index dd865df5..36742755 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -387,8 +387,8 @@ const generic_params = [ * note("") * .sound('sawtooth') * .lpf(500) - * .lpa(.1).lpd(.1).lps(.5) - * .lpenv("<8 4 2 0>/4") + * .lpa(.5) + * .lpenv("<4 2 1 0>/4") */ ['lpenv', 'lpe'], /** @@ -400,8 +400,8 @@ const generic_params = [ * note("") * .sound('sawtooth') * .hpf(500) - * .hpa(.1).hpd(.1).hps(.5) - * .hpenv("<8 4 2 0>/4") + * .hpa(.5) + * .hpenv("<4 2 1 0>/4") * @example * note("") * .sound('sawtooth') @@ -419,8 +419,8 @@ const generic_params = [ * note("") * .sound('sawtooth') * .bpf(500) - * .bpa(.1).bpd(.1).bps(.5) - * .bpenv("<8 4 2 0>/4") + * .bpa(.5) + * .bpenv("<4 2 1 0>/4") */ ['bpenv', 'bpe'], /** From 9049a8b964d277d60071667a247ed37e77d42736 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 15 Sep 2023 23:37:36 +0200 Subject: [PATCH 42/80] simplify fenv --- packages/superdough/helpers.mjs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/superdough/helpers.mjs b/packages/superdough/helpers.mjs index b6530343..45371500 100644 --- a/packages/superdough/helpers.mjs +++ b/packages/superdough/helpers.mjs @@ -87,18 +87,16 @@ export function createFilter(context, type, frequency, Q, attack, decay, sustain // Apply ADSR to filter frequency if (fenv !== 0) { - let min = 0; - let max = Math.sign(fenv) * 200 * 2 ** Math.abs(fenv); - if (max < min) { - // offset by max: keep range when *penv sign is flipped - // comment those lines out to center around cutoff instead peak - min += Math.abs(max); - max += Math.abs(max); + let min = frequency; + let max = frequency * 2 ** Math.abs(fenv); + if (fenv < 0) { + // flip min max to keep range the same for negative envelope + // comment this out to flip the range as well... + [min, max] = [max, min]; } - + // console.log('min', min, 'max', max); min = clamp(min + frequency, 0, 20000); max = clamp(max + frequency, 0, 20000); - // console.log('min', min, 'max', max); getParamADSR(filter.frequency, attack, decay, sustain, release, min, max, start, end); return filter; } From ee314e9b03538c0ccd25296e281dd58aefcea15f Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 15 Sep 2023 23:38:37 +0200 Subject: [PATCH 43/80] snapshot --- test/__snapshots__/examples.test.mjs.snap | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/__snapshots__/examples.test.mjs.snap b/test/__snapshots__/examples.test.mjs.snap index ed05a561..a40ede3b 100644 --- a/test/__snapshots__/examples.test.mjs.snap +++ b/test/__snapshots__/examples.test.mjs.snap @@ -920,10 +920,10 @@ exports[`runs examples > example "bpdecay" example index 0 1`] = ` exports[`runs examples > example "bpenv" example index 0 1`] = ` [ - "[ 0/1 → 1/1 | note:c2 s:sawtooth bandf:500 bpattack:0.1 bpdecay:0.1 bpsustain:0.5 bpenv:8 ]", - "[ 1/1 → 2/1 | note:e2 s:sawtooth bandf:500 bpattack:0.1 bpdecay:0.1 bpsustain:0.5 bpenv:8 ]", - "[ 2/1 → 3/1 | note:f2 s:sawtooth bandf:500 bpattack:0.1 bpdecay:0.1 bpsustain:0.5 bpenv:8 ]", - "[ 3/1 → 4/1 | note:g2 s:sawtooth bandf:500 bpattack:0.1 bpdecay:0.1 bpsustain:0.5 bpenv:8 ]", + "[ 0/1 → 1/1 | note:c2 s:sawtooth bandf:500 bpattack:0.5 bpenv:4 ]", + "[ 1/1 → 2/1 | note:e2 s:sawtooth bandf:500 bpattack:0.5 bpenv:4 ]", + "[ 2/1 → 3/1 | note:f2 s:sawtooth bandf:500 bpattack:0.5 bpenv:4 ]", + "[ 3/1 → 4/1 | note:g2 s:sawtooth bandf:500 bpattack:0.5 bpenv:4 ]", ] `; @@ -2115,10 +2115,10 @@ exports[`runs examples > example "hpdecay" example index 0 1`] = ` exports[`runs examples > example "hpenv" example index 0 1`] = ` [ - "[ 0/1 → 1/1 | note:c2 s:sawtooth hcutoff:500 hpattack:0.1 hpdecay:0.1 hpsustain:0.5 hpenv:8 ]", - "[ 1/1 → 2/1 | note:e2 s:sawtooth hcutoff:500 hpattack:0.1 hpdecay:0.1 hpsustain:0.5 hpenv:8 ]", - "[ 2/1 → 3/1 | note:f2 s:sawtooth hcutoff:500 hpattack:0.1 hpdecay:0.1 hpsustain:0.5 hpenv:8 ]", - "[ 3/1 → 4/1 | note:g2 s:sawtooth hcutoff:500 hpattack:0.1 hpdecay:0.1 hpsustain:0.5 hpenv:8 ]", + "[ 0/1 → 1/1 | note:c2 s:sawtooth hcutoff:500 hpattack:0.5 hpenv:4 ]", + "[ 1/1 → 2/1 | note:e2 s:sawtooth hcutoff:500 hpattack:0.5 hpenv:4 ]", + "[ 2/1 → 3/1 | note:f2 s:sawtooth hcutoff:500 hpattack:0.5 hpenv:4 ]", + "[ 3/1 → 4/1 | note:g2 s:sawtooth hcutoff:500 hpattack:0.5 hpenv:4 ]", ] `; @@ -2685,10 +2685,10 @@ exports[`runs examples > example "lpdecay" example index 0 1`] = ` exports[`runs examples > example "lpenv" example index 0 1`] = ` [ - "[ 0/1 → 1/1 | note:c2 s:sawtooth cutoff:500 lpattack:0.1 lpdecay:0.1 lpsustain:0.5 lpenv:8 ]", - "[ 1/1 → 2/1 | note:e2 s:sawtooth cutoff:500 lpattack:0.1 lpdecay:0.1 lpsustain:0.5 lpenv:8 ]", - "[ 2/1 → 3/1 | note:f2 s:sawtooth cutoff:500 lpattack:0.1 lpdecay:0.1 lpsustain:0.5 lpenv:8 ]", - "[ 3/1 → 4/1 | note:g2 s:sawtooth cutoff:500 lpattack:0.1 lpdecay:0.1 lpsustain:0.5 lpenv:8 ]", + "[ 0/1 → 1/1 | note:c2 s:sawtooth cutoff:500 lpattack:0.5 lpenv:4 ]", + "[ 1/1 → 2/1 | note:e2 s:sawtooth cutoff:500 lpattack:0.5 lpenv:4 ]", + "[ 2/1 → 3/1 | note:f2 s:sawtooth cutoff:500 lpattack:0.5 lpenv:4 ]", + "[ 3/1 → 4/1 | note:g2 s:sawtooth cutoff:500 lpattack:0.5 lpenv:4 ]", ] `; From df211c994d2ed795036da9e8a1d831a60df55095 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sat, 16 Sep 2023 00:44:03 +0200 Subject: [PATCH 44/80] anchored fenv, more logical with negative values - defaulting to .5 for now... --- packages/superdough/helpers.mjs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/superdough/helpers.mjs b/packages/superdough/helpers.mjs index 45371500..0f50a527 100644 --- a/packages/superdough/helpers.mjs +++ b/packages/superdough/helpers.mjs @@ -87,14 +87,15 @@ export function createFilter(context, type, frequency, Q, attack, decay, sustain // Apply ADSR to filter frequency if (fenv !== 0) { - let min = frequency; - let max = frequency * 2 ** Math.abs(fenv); - if (fenv < 0) { - // flip min max to keep range the same for negative envelope - // comment this out to flip the range as well... - [min, max] = [max, min]; - } - // console.log('min', min, 'max', max); + let anchor = 0.5; + let offset = fenv * anchor; + let min = 2 ** -offset; + let max = 2 ** (fenv - offset); + min *= frequency; + max *= frequency; + + //console.log('min', min, 'max', max); + min = clamp(min + frequency, 0, 20000); max = clamp(max + frequency, 0, 20000); getParamADSR(filter.frequency, attack, decay, sustain, release, min, max, start, end); From 40de717cc90f410115069ee34792cc1a55a90be4 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sat, 16 Sep 2023 00:46:50 +0200 Subject: [PATCH 45/80] fix: don't add frequency --- packages/superdough/helpers.mjs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/superdough/helpers.mjs b/packages/superdough/helpers.mjs index 0f50a527..92a5584f 100644 --- a/packages/superdough/helpers.mjs +++ b/packages/superdough/helpers.mjs @@ -94,10 +94,11 @@ export function createFilter(context, type, frequency, Q, attack, decay, sustain min *= frequency; max *= frequency; - //console.log('min', min, 'max', max); + min = clamp(min, 0, 20000); + max = clamp(max, 0, 20000); + + console.log('min', min, 'max', max); - min = clamp(min + frequency, 0, 20000); - max = clamp(max + frequency, 0, 20000); getParamADSR(filter.frequency, attack, decay, sustain, release, min, max, start, end); return filter; } From 7f86eac8f1b611b77484e8db3c5d28a20b2762b2 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sat, 16 Sep 2023 00:51:36 +0200 Subject: [PATCH 46/80] simplify --- packages/superdough/helpers.mjs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/packages/superdough/helpers.mjs b/packages/superdough/helpers.mjs index 92a5584f..c15bdb83 100644 --- a/packages/superdough/helpers.mjs +++ b/packages/superdough/helpers.mjs @@ -82,22 +82,17 @@ export function createFilter(context, type, frequency, Q, attack, decay, sustain const filter = context.createBiquadFilter(); filter.type = type; filter.Q.value = Q; - frequency = Math.max(frequency, 20); filter.frequency.value = frequency; // Apply ADSR to filter frequency if (fenv !== 0) { - let anchor = 0.5; - let offset = fenv * anchor; - let min = 2 ** -offset; - let max = 2 ** (fenv - offset); - min *= frequency; - max *= frequency; + const anchor = 0.5; + const offset = fenv * anchor; - min = clamp(min, 0, 20000); - max = clamp(max, 0, 20000); + const min = clamp(2 ** -offset * frequency, 0, 20000); + const max = clamp(2 ** (fenv - offset) * frequency, 0, 20000); - console.log('min', min, 'max', max); + // console.log('min', min, 'max', max); getParamADSR(filter.frequency, attack, decay, sustain, release, min, max, start, end); return filter; From 7dbcc90450d032a63e8feaf9c75053b1b0cedbe6 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sat, 16 Sep 2023 01:07:10 +0200 Subject: [PATCH 47/80] fix: docs after fenv change --- packages/core/controls.mjs | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index 36742755..ce52d670 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -388,7 +388,7 @@ const generic_params = [ * .sound('sawtooth') * .lpf(500) * .lpa(.5) - * .lpenv("<4 2 1 0>/4") + * .lpenv("<4 2 1 0 -1 -2 -4>/4") */ ['lpenv', 'lpe'], /** @@ -401,13 +401,7 @@ const generic_params = [ * .sound('sawtooth') * .hpf(500) * .hpa(.5) - * .hpenv("<4 2 1 0>/4") - * @example - * note("") - * .sound('sawtooth') - * .hpf(500) - * .hpa(.5) - * .hpenv("<2 -2>/4") + * .hpenv("<4 2 1 0 -1 -2 -4>/4") */ ['hpenv', 'hpe'], /** @@ -420,7 +414,7 @@ const generic_params = [ * .sound('sawtooth') * .bpf(500) * .bpa(.5) - * .bpenv("<4 2 1 0>/4") + * .bpenv("<4 2 1 0 -1 -2 -4>/4") */ ['bpenv', 'bpe'], /** @@ -512,7 +506,7 @@ const generic_params = [ * @example * note("") * .sound('sawtooth') - * .lpf(0) + * .lpf(500) * .lpd(.5) * .lps("<0 .25 .5 1>/4") * .lpenv(4) @@ -526,7 +520,7 @@ const generic_params = [ * @example * note("") * .sound('sawtooth') - * .hpf(0) + * .hpf(500) * .hpd(.5) * .hps("<0 .25 .5 1>/4") * .hpenv(4) @@ -540,7 +534,7 @@ const generic_params = [ * @example * note("") * .sound('sawtooth') - * .bpf(0) + * .bpf(500) * .bpd(.5) * .bps("<0 .25 .5 1>/4") * .bpenv(4) @@ -555,7 +549,7 @@ const generic_params = [ * note("") * .sound('sawtooth') * .clip(.5) - * .lpf(0) + * .lpf(500) * .lpenv(4) * .lpr("<.5 .25 .1 0>/4") * .release(.5) @@ -570,7 +564,7 @@ const generic_params = [ * note("") * .sound('sawtooth') * .clip(.5) - * .hpf(0) + * .hpf(500) * .hpenv(4) * .hpr("<.5 .25 .1 0>/4") * .release(.5) @@ -585,7 +579,7 @@ const generic_params = [ * note("") * .sound('sawtooth') * .clip(.5) - * .bpf(0) + * .bpf(500) * .bpenv(4) * .bpr("<.5 .25 .1 0>/4") * .release(.5) From e959c275fd6915b9562801e2f04de4143b08cd1a Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sat, 16 Sep 2023 01:14:14 +0200 Subject: [PATCH 48/80] add fanchor --- packages/core/controls.mjs | 1 + packages/superdough/helpers.mjs | 18 +++++++++++++++--- packages/superdough/superdough.mjs | 18 +++++++++++++++++- 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index ce52d670..58c4efa1 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -586,6 +586,7 @@ const generic_params = [ */ ['bprelease', 'bpr'], ['ftype'], + ['fanchor'], /** * Applies the cutoff frequency of the **h**igh-**p**ass **f**ilter. * diff --git a/packages/superdough/helpers.mjs b/packages/superdough/helpers.mjs index c15bdb83..92f670d9 100644 --- a/packages/superdough/helpers.mjs +++ b/packages/superdough/helpers.mjs @@ -78,7 +78,20 @@ export const getParamADSR = (param, attack, decay, sustain, release, min, max, b param.linearRampToValueAtTime(min, end + Math.max(release, 0.1)); }; -export function createFilter(context, type, frequency, Q, attack, decay, sustain, release, fenv, start, end) { +export function createFilter( + context, + type, + frequency, + Q, + attack, + decay, + sustain, + release, + fenv, + start, + end, + fanchor = 0.5, +) { const filter = context.createBiquadFilter(); filter.type = type; filter.Q.value = Q; @@ -86,8 +99,7 @@ export function createFilter(context, type, frequency, Q, attack, decay, sustain // Apply ADSR to filter frequency if (fenv !== 0) { - const anchor = 0.5; - const offset = fenv * anchor; + const offset = fenv * fanchor; const min = clamp(2 ** -offset * frequency, 0, 20000); const max = clamp(2 ** (fenv - offset) * frequency, 0, 20000); diff --git a/packages/superdough/superdough.mjs b/packages/superdough/superdough.mjs index 601ab9e0..289e8d97 100644 --- a/packages/superdough/superdough.mjs +++ b/packages/superdough/superdough.mjs @@ -179,6 +179,7 @@ export const superdough = async (value, deadline, hapDuration) => { gain = 0.8, // filters ftype = '12db', + fanchor = 0.5, // low pass cutoff, lpenv, @@ -270,6 +271,7 @@ export const superdough = async (value, deadline, hapDuration) => { lpenv, t, t + hapDuration, + fanchor, ); chain.push(lp()); if (ftype === '24db') { @@ -291,6 +293,7 @@ export const superdough = async (value, deadline, hapDuration) => { hpenv, t, t + hapDuration, + fanchor, ); chain.push(hp()); if (ftype === '24db') { @@ -300,7 +303,20 @@ export const superdough = async (value, deadline, hapDuration) => { if (bandf !== undefined) { let bp = () => - createFilter(ac, 'bandpass', bandf, bandq, bpattack, bpdecay, bpsustain, bprelease, bpenv, t, t + hapDuration); + createFilter( + ac, + 'bandpass', + bandf, + bandq, + bpattack, + bpdecay, + bpsustain, + bprelease, + bpenv, + t, + t + hapDuration, + fanchor, + ); chain.push(bp()); if (ftype === '24db') { chain.push(bp()); From 735f892a087ce949dfb482e605eb4947b7dfb469 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sat, 16 Sep 2023 01:14:53 +0200 Subject: [PATCH 49/80] fix: snapshots --- test/__snapshots__/examples.test.mjs.snap | 57 ++++++++++------------- 1 file changed, 24 insertions(+), 33 deletions(-) diff --git a/test/__snapshots__/examples.test.mjs.snap b/test/__snapshots__/examples.test.mjs.snap index a40ede3b..c46ca717 100644 --- a/test/__snapshots__/examples.test.mjs.snap +++ b/test/__snapshots__/examples.test.mjs.snap @@ -967,19 +967,19 @@ exports[`runs examples > example "bpq" example index 0 1`] = ` exports[`runs examples > example "bprelease" example index 0 1`] = ` [ - "[ 0/1 → 1/1 | note:c2 s:sawtooth clip:0.5 bandf:0 bpenv:4 bprelease:0.5 release:0.5 ]", - "[ 1/1 → 2/1 | note:e2 s:sawtooth clip:0.5 bandf:0 bpenv:4 bprelease:0.5 release:0.5 ]", - "[ 2/1 → 3/1 | note:f2 s:sawtooth clip:0.5 bandf:0 bpenv:4 bprelease:0.5 release:0.5 ]", - "[ 3/1 → 4/1 | note:g2 s:sawtooth clip:0.5 bandf:0 bpenv:4 bprelease:0.5 release:0.5 ]", + "[ 0/1 → 1/1 | note:c2 s:sawtooth clip:0.5 bandf:500 bpenv:4 bprelease:0.5 release:0.5 ]", + "[ 1/1 → 2/1 | note:e2 s:sawtooth clip:0.5 bandf:500 bpenv:4 bprelease:0.5 release:0.5 ]", + "[ 2/1 → 3/1 | note:f2 s:sawtooth clip:0.5 bandf:500 bpenv:4 bprelease:0.5 release:0.5 ]", + "[ 3/1 → 4/1 | note:g2 s:sawtooth clip:0.5 bandf:500 bpenv:4 bprelease:0.5 release:0.5 ]", ] `; exports[`runs examples > example "bpsustain" example index 0 1`] = ` [ - "[ 0/1 → 1/1 | note:c2 s:sawtooth bandf:0 bpdecay:0.5 bpsustain:0 bpenv:4 ]", - "[ 1/1 → 2/1 | note:e2 s:sawtooth bandf:0 bpdecay:0.5 bpsustain:0 bpenv:4 ]", - "[ 2/1 → 3/1 | note:f2 s:sawtooth bandf:0 bpdecay:0.5 bpsustain:0 bpenv:4 ]", - "[ 3/1 → 4/1 | note:g2 s:sawtooth bandf:0 bpdecay:0.5 bpsustain:0 bpenv:4 ]", + "[ 0/1 → 1/1 | note:c2 s:sawtooth bandf:500 bpdecay:0.5 bpsustain:0 bpenv:4 ]", + "[ 1/1 → 2/1 | note:e2 s:sawtooth bandf:500 bpdecay:0.5 bpsustain:0 bpenv:4 ]", + "[ 2/1 → 3/1 | note:f2 s:sawtooth bandf:500 bpdecay:0.5 bpsustain:0 bpenv:4 ]", + "[ 3/1 → 4/1 | note:g2 s:sawtooth bandf:500 bpdecay:0.5 bpsustain:0 bpenv:4 ]", ] `; @@ -2122,15 +2122,6 @@ exports[`runs examples > example "hpenv" example index 0 1`] = ` ] `; -exports[`runs examples > example "hpenv" example index 1 1`] = ` -[ - "[ 0/1 → 1/1 | note:c2 s:sawtooth hcutoff:500 hpattack:0.5 hpenv:2 ]", - "[ 1/1 → 2/1 | note:e2 s:sawtooth hcutoff:500 hpattack:0.5 hpenv:2 ]", - "[ 2/1 → 3/1 | note:f2 s:sawtooth hcutoff:500 hpattack:0.5 hpenv:2 ]", - "[ 3/1 → 4/1 | note:g2 s:sawtooth hcutoff:500 hpattack:0.5 hpenv:2 ]", -] -`; - exports[`runs examples > example "hpf" example index 0 1`] = ` [ "[ 0/1 → 1/4 | s:hh hcutoff:4000 ]", @@ -2220,19 +2211,19 @@ exports[`runs examples > example "hpq" example index 0 1`] = ` exports[`runs examples > example "hprelease" example index 0 1`] = ` [ - "[ 0/1 → 1/1 | note:c2 s:sawtooth clip:0.5 hcutoff:0 hpenv:4 hprelease:0.5 release:0.5 ]", - "[ 1/1 → 2/1 | note:e2 s:sawtooth clip:0.5 hcutoff:0 hpenv:4 hprelease:0.5 release:0.5 ]", - "[ 2/1 → 3/1 | note:f2 s:sawtooth clip:0.5 hcutoff:0 hpenv:4 hprelease:0.5 release:0.5 ]", - "[ 3/1 → 4/1 | note:g2 s:sawtooth clip:0.5 hcutoff:0 hpenv:4 hprelease:0.5 release:0.5 ]", + "[ 0/1 → 1/1 | note:c2 s:sawtooth clip:0.5 hcutoff:500 hpenv:4 hprelease:0.5 release:0.5 ]", + "[ 1/1 → 2/1 | note:e2 s:sawtooth clip:0.5 hcutoff:500 hpenv:4 hprelease:0.5 release:0.5 ]", + "[ 2/1 → 3/1 | note:f2 s:sawtooth clip:0.5 hcutoff:500 hpenv:4 hprelease:0.5 release:0.5 ]", + "[ 3/1 → 4/1 | note:g2 s:sawtooth clip:0.5 hcutoff:500 hpenv:4 hprelease:0.5 release:0.5 ]", ] `; exports[`runs examples > example "hpsustain" example index 0 1`] = ` [ - "[ 0/1 → 1/1 | note:c2 s:sawtooth hcutoff:0 hpdecay:0.5 hpsustain:0 hpenv:4 ]", - "[ 1/1 → 2/1 | note:e2 s:sawtooth hcutoff:0 hpdecay:0.5 hpsustain:0 hpenv:4 ]", - "[ 2/1 → 3/1 | note:f2 s:sawtooth hcutoff:0 hpdecay:0.5 hpsustain:0 hpenv:4 ]", - "[ 3/1 → 4/1 | note:g2 s:sawtooth hcutoff:0 hpdecay:0.5 hpsustain:0 hpenv:4 ]", + "[ 0/1 → 1/1 | note:c2 s:sawtooth hcutoff:500 hpdecay:0.5 hpsustain:0 hpenv:4 ]", + "[ 1/1 → 2/1 | note:e2 s:sawtooth hcutoff:500 hpdecay:0.5 hpsustain:0 hpenv:4 ]", + "[ 2/1 → 3/1 | note:f2 s:sawtooth hcutoff:500 hpdecay:0.5 hpsustain:0 hpenv:4 ]", + "[ 3/1 → 4/1 | note:g2 s:sawtooth hcutoff:500 hpdecay:0.5 hpsustain:0 hpenv:4 ]", ] `; @@ -2785,19 +2776,19 @@ exports[`runs examples > example "lpq" example index 0 1`] = ` exports[`runs examples > example "lprelease" example index 0 1`] = ` [ - "[ 0/1 → 1/1 | note:c2 s:sawtooth clip:0.5 cutoff:0 lpenv:4 lprelease:0.5 release:0.5 ]", - "[ 1/1 → 2/1 | note:e2 s:sawtooth clip:0.5 cutoff:0 lpenv:4 lprelease:0.5 release:0.5 ]", - "[ 2/1 → 3/1 | note:f2 s:sawtooth clip:0.5 cutoff:0 lpenv:4 lprelease:0.5 release:0.5 ]", - "[ 3/1 → 4/1 | note:g2 s:sawtooth clip:0.5 cutoff:0 lpenv:4 lprelease:0.5 release:0.5 ]", + "[ 0/1 → 1/1 | note:c2 s:sawtooth clip:0.5 cutoff:500 lpenv:4 lprelease:0.5 release:0.5 ]", + "[ 1/1 → 2/1 | note:e2 s:sawtooth clip:0.5 cutoff:500 lpenv:4 lprelease:0.5 release:0.5 ]", + "[ 2/1 → 3/1 | note:f2 s:sawtooth clip:0.5 cutoff:500 lpenv:4 lprelease:0.5 release:0.5 ]", + "[ 3/1 → 4/1 | note:g2 s:sawtooth clip:0.5 cutoff:500 lpenv:4 lprelease:0.5 release:0.5 ]", ] `; exports[`runs examples > example "lpsustain" example index 0 1`] = ` [ - "[ 0/1 → 1/1 | note:c2 s:sawtooth cutoff:0 lpdecay:0.5 lpsustain:0 lpenv:4 ]", - "[ 1/1 → 2/1 | note:e2 s:sawtooth cutoff:0 lpdecay:0.5 lpsustain:0 lpenv:4 ]", - "[ 2/1 → 3/1 | note:f2 s:sawtooth cutoff:0 lpdecay:0.5 lpsustain:0 lpenv:4 ]", - "[ 3/1 → 4/1 | note:g2 s:sawtooth cutoff:0 lpdecay:0.5 lpsustain:0 lpenv:4 ]", + "[ 0/1 → 1/1 | note:c2 s:sawtooth cutoff:500 lpdecay:0.5 lpsustain:0 lpenv:4 ]", + "[ 1/1 → 2/1 | note:e2 s:sawtooth cutoff:500 lpdecay:0.5 lpsustain:0 lpenv:4 ]", + "[ 2/1 → 3/1 | note:f2 s:sawtooth cutoff:500 lpdecay:0.5 lpsustain:0 lpenv:4 ]", + "[ 3/1 → 4/1 | note:g2 s:sawtooth cutoff:500 lpdecay:0.5 lpsustain:0 lpenv:4 ]", ] `; From 989dc0aabe4111891049fa5fadf4c857dfde8d6c Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sat, 16 Sep 2023 01:33:09 +0200 Subject: [PATCH 50/80] fix: filters without envelopes --- packages/superdough/helpers.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/superdough/helpers.mjs b/packages/superdough/helpers.mjs index 92f670d9..32ca0bb2 100644 --- a/packages/superdough/helpers.mjs +++ b/packages/superdough/helpers.mjs @@ -98,7 +98,7 @@ export function createFilter( filter.frequency.value = frequency; // Apply ADSR to filter frequency - if (fenv !== 0) { + if (!isNaN(fenv) && fenv !== 0) { const offset = fenv * fanchor; const min = clamp(2 ** -offset * frequency, 0, 20000); From b96e8093a02c8f824c25267b0dc23552ed2b58c7 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sat, 16 Sep 2023 01:33:17 +0200 Subject: [PATCH 51/80] doc: fenv --- packages/core/controls.mjs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index 58c4efa1..780b4a44 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -585,6 +585,17 @@ const generic_params = [ * .release(.5) */ ['bprelease', 'bpr'], + /** + * Sets the filter type. The 24db filter is more aggressive. More types might be added in the future. + * @name ftype + * @param {number | Pattern} type 12db (default) or 24db + * @example + * note("") + * .sound('sawtooth') + * .lpf(500) + * .bpenv(4) + * .ftype("<12db 24db>") + */ ['ftype'], ['fanchor'], /** From af6a5b85f55eef2527639df6b632c0619d581c83 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sat, 16 Sep 2023 01:33:34 +0200 Subject: [PATCH 52/80] keep only lp envelopes as examples --- website/src/pages/learn/effects.mdx | 64 ++--------------------------- 1 file changed, 4 insertions(+), 60 deletions(-) diff --git a/website/src/pages/learn/effects.mdx b/website/src/pages/learn/effects.mdx index f5ee12ab..4982f4cd 100644 --- a/website/src/pages/learn/effects.mdx +++ b/website/src/pages/learn/effects.mdx @@ -49,6 +49,10 @@ Each filter has 2 parameters: +## ftype + + + ## vowel @@ -111,66 +115,6 @@ There is one filter envelope for each filter type and thus one set of envelope f -## hpattack - - - -## hpdecay - - - -## hpsustain - - - -## hprelease - - - -## hpenv - - - -## hpattack - - - -## hpdecay - - - -## hpsustain - - - -## hprelease - - - -## hpenv - - - -## bpattack - - - -## bpdecay - - - -## bpsustain - - - -## bprelease - - - -## bpenv - - - # Dynamics ## gain From a7eb0bb04af0d83283d3407999990fac9967ac2a Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sat, 16 Sep 2023 01:34:00 +0200 Subject: [PATCH 53/80] snapshot --- test/__snapshots__/examples.test.mjs.snap | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/__snapshots__/examples.test.mjs.snap b/test/__snapshots__/examples.test.mjs.snap index c46ca717..cd7595b5 100644 --- a/test/__snapshots__/examples.test.mjs.snap +++ b/test/__snapshots__/examples.test.mjs.snap @@ -2058,6 +2058,15 @@ exports[`runs examples > example "freq" example index 1 1`] = ` ] `; +exports[`runs examples > example "ftype" example index 0 1`] = ` +[ + "[ 0/1 → 1/1 | note:c2 s:sawtooth cutoff:500 bpenv:4 ftype:12db ]", + "[ 1/1 → 2/1 | note:e2 s:sawtooth cutoff:500 bpenv:4 ftype:24db ]", + "[ 2/1 → 3/1 | note:f2 s:sawtooth cutoff:500 bpenv:4 ftype:12db ]", + "[ 3/1 → 4/1 | note:g2 s:sawtooth cutoff:500 bpenv:4 ftype:24db ]", +] +`; + exports[`runs examples > example "gain" example index 0 1`] = ` [ "[ 0/1 → 1/8 | s:hh gain:0.4 ]", From 536427310d4f3f551429a446a81b928ef07ddc19 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sat, 16 Sep 2023 01:50:23 +0200 Subject: [PATCH 54/80] add some filter envelopes here and there --- website/src/repl/tunes.mjs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/website/src/repl/tunes.mjs b/website/src/repl/tunes.mjs index dd524283..2ab546b7 100644 --- a/website/src/repl/tunes.mjs +++ b/website/src/repl/tunes.mjs @@ -229,7 +229,9 @@ stack( .add("0,.02") .note().gain(.3) .clip("<1@3 [.3 1]>/2") - .s('sawtooth').cutoff(600).color('#F8E71C'), + .cutoff(600) + .lpa(.2).lpenv(-4) + .s('sawtooth').color('#F8E71C'), ).fast(3/2) //.pianoroll({fold:1})`; @@ -468,7 +470,9 @@ stack( .note() .s("sawtooth,square") .gain(.3).attack(0.01).decay(0.1).sustain(.5) - .apply(filter1), + .apply(filter1) + .lpa(.1).lpenv(2).ftype('24db') + , "~@3 [<2 3>,<4 5>]" .echo(4,1/16,.7) .scale(scales) @@ -803,14 +807,14 @@ stack( sine.add(saw.slow(4)).range(0,7).segment(8) .superimpose(x=>x.add(.1)) .scale('G0 minor').note() - .s("sawtooth").decay(.1).sustain(0) + .s("sawtooth").decay(.1).sustain(0).lpa(.1).lpenv(4) .gain(.4).cutoff(perlin.range(300,3000).slow(8)).resonance(10) .degradeBy("0 0.1 .5 .1") .rarely(add(note("12"))) , // chord note("Bb3,D4".superimpose(x=>x.add(.2))) - .s('sawtooth').cutoff(1000).struct("<~@3 [~ x]>") + .s('sawtooth').lpf(1000).struct("<~@3 [~ x]>") .decay(.05).sustain(.0).delay(.8).delaytime(.125).room(.8) , // alien From e0c424eb9262a331f31cbcae4e5a0c2369dd2c10 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sat, 16 Sep 2023 01:50:45 +0200 Subject: [PATCH 55/80] update snapshots --- test/__snapshots__/tunes.test.mjs.snap | 232 ++++++++++++------------- 1 file changed, 116 insertions(+), 116 deletions(-) diff --git a/test/__snapshots__/tunes.test.mjs.snap b/test/__snapshots__/tunes.test.mjs.snap index 3c072ca2..484c1380 100644 --- a/test/__snapshots__/tunes.test.mjs.snap +++ b/test/__snapshots__/tunes.test.mjs.snap @@ -3,23 +3,23 @@ exports[`renders tunes > tune: amensister 1`] = ` [ "[ 0/1 → 1/16 | s:breath room:1 shape:0.6 begin:0.9375 end:1 ]", - "[ 0/1 → 1/8 | note:Eb1 s:sawtooth decay:0.1 sustain:0 gain:0.4 cutoff:300.0066107586751 resonance:10 ]", - "[ 0/1 → 1/8 | note:F1 s:sawtooth decay:0.1 sustain:0 gain:0.4 cutoff:300.0066107586751 resonance:10 ]", + "[ 0/1 → 1/8 | note:Eb1 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:4 gain:0.4 cutoff:300.0066107586751 resonance:10 ]", + "[ 0/1 → 1/8 | note:F1 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:4 gain:0.4 cutoff:300.0066107586751 resonance:10 ]", "[ 0/1 → 1/4 | n:0 s:amencutup room:0.5 ]", "[ 1/16 → 1/8 | s:breath room:1 shape:0.6 begin:0.875 end:0.9375 ]", "[ 1/8 → 3/16 | s:breath room:1 shape:0.6 begin:0.8125 end:0.875 ]", - "[ 1/8 → 1/4 | note:45 s:sawtooth decay:0.1 sustain:0 gain:0.4 cutoff:300.174310575404 resonance:10 ]", - "[ 1/8 → 1/4 | note:45 s:sawtooth decay:0.1 sustain:0 gain:0.4 cutoff:300.174310575404 resonance:10 ]", + "[ 1/8 → 1/4 | note:45 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:4 gain:0.4 cutoff:300.174310575404 resonance:10 ]", + "[ 1/8 → 1/4 | note:45 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:4 gain:0.4 cutoff:300.174310575404 resonance:10 ]", "[ 3/16 → 1/4 | s:breath room:1 shape:0.6 begin:0.75 end:0.8125 ]", "[ 1/4 → 5/16 | s:breath room:1 shape:0.6 begin:0.6875 end:0.75 ]", "[ 1/4 → 3/8 | n:1 speed:2 delay:0.5 s:amencutup room:0.5 ]", - "[ 1/4 → 3/8 | note:A1 s:sawtooth decay:0.1 sustain:0 gain:0.4 cutoff:300.7878869297153 resonance:10 ]", - "[ 1/4 → 3/8 | note:A1 s:sawtooth decay:0.1 sustain:0 gain:0.4 cutoff:300.7878869297153 resonance:10 ]", + "[ 1/4 → 3/8 | note:A1 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:4 gain:0.4 cutoff:300.7878869297153 resonance:10 ]", + "[ 1/4 → 3/8 | note:A1 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:4 gain:0.4 cutoff:300.7878869297153 resonance:10 ]", "[ 5/16 → 3/8 | s:breath room:1 shape:0.6 begin:0.625 end:0.6875 ]", "[ 3/8 → 7/16 | s:breath room:1 shape:0.6 begin:0.5625 end:0.625 ]", "[ 3/8 → 1/2 | n:1 s:amencutup room:0.5 ]", - "[ 3/8 → 1/2 | note:F1 s:sawtooth decay:0.1 sustain:0 gain:0.4 cutoff:302.11020572391345 resonance:10 ]", - "[ 3/8 → 1/2 | note:F1 s:sawtooth decay:0.1 sustain:0 gain:0.4 cutoff:302.11020572391345 resonance:10 ]", + "[ 3/8 → 1/2 | note:F1 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:4 gain:0.4 cutoff:302.11020572391345 resonance:10 ]", + "[ 3/8 → 1/2 | note:F1 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:4 gain:0.4 cutoff:302.11020572391345 resonance:10 ]", "[ 7/16 → 1/2 | s:breath room:1 shape:0.6 begin:0.5 end:0.5625 ]", "[ 1/2 → 9/16 | s:breath room:1 shape:0.6 begin:0.4375 end:0.5 ]", "[ 1/2 → 3/4 | n:2 s:amencutup room:0.5 ]", @@ -28,13 +28,13 @@ exports[`renders tunes > tune: amensister 1`] = ` "[ 11/16 → 3/4 | s:breath room:1 shape:0.6 begin:0.25 end:0.3125 ]", "[ 3/4 → 13/16 | s:breath room:1 shape:0.6 begin:0.1875 end:0.25 ]", "[ 3/4 → 7/8 | n:3 s:amencutup room:0.5 ]", - "[ 3/4 → 7/8 | note:Bb0 s:sawtooth decay:0.1 sustain:0 gain:0.4 cutoff:312.54769231985796 resonance:10 ]", - "[ 3/4 → 7/8 | note:Bb0 s:sawtooth decay:0.1 sustain:0 gain:0.4 cutoff:312.54769231985796 resonance:10 ]", + "[ 3/4 → 7/8 | note:Bb0 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:4 gain:0.4 cutoff:312.54769231985796 resonance:10 ]", + "[ 3/4 → 7/8 | note:Bb0 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:4 gain:0.4 cutoff:312.54769231985796 resonance:10 ]", "[ 13/16 → 7/8 | s:breath room:1 shape:0.6 begin:0.125 end:0.1875 ]", "[ 7/8 → 15/16 | s:breath room:1 shape:0.6 begin:0.0625 end:0.125 ]", "[ 7/8 → 1/1 | n:3 s:amencutup room:0.5 ]", - "[ 7/8 → 1/1 | note:D1 s:sawtooth decay:0.1 sustain:0 gain:0.4 cutoff:318.7927796831686 resonance:10 ]", - "[ 7/8 → 1/1 | note:D1 s:sawtooth decay:0.1 sustain:0 gain:0.4 cutoff:318.7927796831686 resonance:10 ]", + "[ 7/8 → 1/1 | note:D1 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:4 gain:0.4 cutoff:318.7927796831686 resonance:10 ]", + "[ 7/8 → 1/1 | note:D1 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:4 gain:0.4 cutoff:318.7927796831686 resonance:10 ]", "[ 15/16 → 1/1 | s:breath room:1 shape:0.6 begin:0 end:0.0625 ]", ] `; @@ -323,8 +323,8 @@ exports[`renders tunes > tune: blippyRhodes 1`] = ` [ "[ 0/1 → 1/6 | note:G4 clip:0.3 s:rhodes room:0.5 delay:0.3 delayfeedback:0.4 delaytime:0.08333333333333333 gain:0.5 ]", "[ 0/1 → 1/3 | s:bd ]", - "[ (0/1 → 2/3) ⇝ 4/3 | note:36 gain:0.3 clip:1 s:sawtooth cutoff:600 ]", - "[ (0/1 → 2/3) ⇝ 4/3 | note:36.02 gain:0.3 clip:1 s:sawtooth cutoff:600 ]", + "[ (0/1 → 2/3) ⇝ 4/3 | note:36 gain:0.3 clip:1 cutoff:600 lpattack:0.2 lpenv:-4 s:sawtooth ]", + "[ (0/1 → 2/3) ⇝ 4/3 | note:36.02 gain:0.3 clip:1 cutoff:600 lpattack:0.2 lpenv:-4 s:sawtooth ]", "[ 1/6 → 1/3 | note:G4 clip:0.3 s:rhodes room:0.5 delay:0.3 delayfeedback:0.4 delaytime:0.08333333333333333 gain:0.5 ]", "[ 1/3 → 1/2 | note:B3 clip:0.3 s:rhodes room:0.5 delay:0.3 delayfeedback:0.4 delaytime:0.08333333333333333 gain:0.5 ]", "[ 1/3 → 1/2 | note:E4 clip:0.3 s:rhodes room:0.5 delay:0.3 delayfeedback:0.4 delaytime:0.08333333333333333 gain:0.5 ]", @@ -332,8 +332,8 @@ exports[`renders tunes > tune: blippyRhodes 1`] = ` "[ 1/2 → 2/3 | note:B3 clip:0.3 s:rhodes room:0.5 delay:0.3 delayfeedback:0.4 delaytime:0.08333333333333333 gain:0.5 ]", "[ 1/2 → 2/3 | note:E4 clip:0.3 s:rhodes room:0.5 delay:0.3 delayfeedback:0.4 delaytime:0.08333333333333333 gain:0.5 ]", "[ 2/3 → 5/6 | note:G3 clip:0.3 s:rhodes room:0.5 delay:0.3 delayfeedback:0.4 delaytime:0.08333333333333333 gain:0.5 ]", - "[ 0/1 ⇜ (2/3 → 1/1) ⇝ 4/3 | note:36 gain:0.3 clip:1 s:sawtooth cutoff:600 ]", - "[ 0/1 ⇜ (2/3 → 1/1) ⇝ 4/3 | note:36.02 gain:0.3 clip:1 s:sawtooth cutoff:600 ]", + "[ 0/1 ⇜ (2/3 → 1/1) ⇝ 4/3 | note:36 gain:0.3 clip:1 cutoff:600 lpattack:0.2 lpenv:-4 s:sawtooth ]", + "[ 0/1 ⇜ (2/3 → 1/1) ⇝ 4/3 | note:36.02 gain:0.3 clip:1 cutoff:600 lpattack:0.2 lpenv:-4 s:sawtooth ]", "[ 2/3 → 1/1 | s:sn ]", "[ 5/6 → 1/1 | note:G3 clip:0.3 s:rhodes room:0.5 delay:0.3 delayfeedback:0.4 delaytime:0.08333333333333333 gain:0.5 ]", ] @@ -7722,8 +7722,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ -1/8 ⇜ (0/1 → 3/8) | note:B3 s:square gain:0.7 attack:0.01 decay:0.1 sustain:0 cutoff:1699.6897509708342 ]", "[ -1/4 ⇜ (1/12 → 1/8) | note:A5 s:sawtooth gain:0.2536811842784369 attack:0.001 decay:0.2 sustain:0 hcutoff:5999.785818935017 cutoff:4000 ]", "[ -1/4 ⇜ (1/12 → 1/8) | note:C#5 s:sawtooth gain:0.2536811842784369 attack:0.001 decay:0.2 sustain:0 hcutoff:5999.785818935017 cutoff:4000 ]", - "[ 1/8 → 1/4 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:1699.6897509708342 ]", - "[ 1/8 → 1/4 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:1699.6897509708342 ]", + "[ 1/8 → 1/4 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:1699.6897509708342 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 1/8 → 1/4 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:1699.6897509708342 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (1/8 → 5/12) ⇝ 1/2 | note:A5 s:sawtooth gain:0.26836160127988246 attack:0.001 decay:0.2 sustain:0 hcutoff:5994.647308096509 cutoff:4000 ]", "[ (1/8 → 5/12) ⇝ 1/2 | note:C#5 s:sawtooth gain:0.26836160127988246 attack:0.001 decay:0.2 sustain:0 hcutoff:5994.647308096509 cutoff:4000 ]", "[ -1/8 ⇜ (1/6 → 1/4) | note:F#5 s:sawtooth gain:0.2573601511491127 attack:0.001 decay:0.2 sustain:0 hcutoff:5999.143312438893 cutoff:4000 ]", @@ -7735,14 +7735,14 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (1/4 → 7/12) ⇝ 5/8 | note:E5 s:sawtooth gain:0.2756442833140452 attack:0.001 decay:0.2 sustain:0 hcutoff:5989.512318936654 cutoff:4000 ]", "[ 0/1 ⇜ (1/3 → 3/8) | note:A5 s:sawtooth gain:0.26103468453995016 attack:0.001 decay:0.2 sustain:0 hcutoff:5998.072590601808 cutoff:4000 ]", "[ 0/1 ⇜ (1/3 → 3/8) | note:C#5 s:sawtooth gain:0.26103468453995016 attack:0.001 decay:0.2 sustain:0 hcutoff:5998.072590601808 cutoff:4000 ]", - "[ 3/8 → 1/2 | note:D2 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:1765.826371664994 ]", - "[ 3/8 → 1/2 | note:D2 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:1765.826371664994 ]", + "[ 3/8 → 1/2 | note:D2 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:1765.826371664994 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 3/8 → 1/2 | note:D2 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:1765.826371664994 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (3/8 → 2/3) ⇝ 3/4 | note:A5 s:sawtooth gain:0.2828651860235305 attack:0.001 decay:0.2 sustain:0 hcutoff:5982.671142387316 cutoff:4000 ]", "[ (3/8 → 2/3) ⇝ 3/4 | note:C#5 s:sawtooth gain:0.2828651860235305 attack:0.001 decay:0.2 sustain:0 hcutoff:5982.671142387316 cutoff:4000 ]", "[ 1/8 ⇜ (5/12 → 1/2) | note:F#5 s:sawtooth gain:0.26836160127988246 attack:0.001 decay:0.2 sustain:0 hcutoff:5994.647308096509 cutoff:4000 ]", "[ 1/8 ⇜ (5/12 → 1/2) | note:A4 s:sawtooth gain:0.26836160127988246 attack:0.001 decay:0.2 sustain:0 hcutoff:5994.647308096509 cutoff:4000 ]", - "[ 1/2 → 5/8 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:1798.799979846742 ]", - "[ 1/2 → 5/8 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:1798.799979846742 ]", + "[ 1/2 → 5/8 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:1798.799979846742 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 1/2 → 5/8 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:1798.799979846742 lpattack:0.1 lpenv:2 ftype:24db ]", "[ 1/2 → 3/4 | note:F#5 s:sawtooth gain:0.28644702698548963 attack:0.001 decay:0.2 sustain:0 hcutoff:5978.612153434527 cutoff:4000 ]", "[ 1/2 → 3/4 | note:A4 s:sawtooth gain:0.28644702698548963 attack:0.001 decay:0.2 sustain:0 hcutoff:5978.612153434527 cutoff:4000 ]", "[ 1/2 → 3/4 | s:bd gain:0.7 ]", @@ -7755,8 +7755,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (5/8 → 11/12) ⇝ 1/1 | note:C#5 s:sawtooth gain:0.29705226105983373 attack:0.001 decay:0.2 sustain:0 hcutoff:5963.890147645195 cutoff:4000 ]", "[ 3/8 ⇜ (2/3 → 3/4) | note:F#5 s:sawtooth gain:0.2828651860235305 attack:0.001 decay:0.2 sustain:0 hcutoff:5982.671142387316 cutoff:4000 ]", "[ 3/8 ⇜ (2/3 → 3/4) | note:A4 s:sawtooth gain:0.2828651860235305 attack:0.001 decay:0.2 sustain:0 hcutoff:5982.671142387316 cutoff:4000 ]", - "[ 3/4 → 7/8 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:1864.4584935007128 ]", - "[ 3/4 → 7/8 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:1864.4584935007128 ]", + "[ 3/4 → 7/8 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:1864.4584935007128 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 3/4 → 7/8 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:1864.4584935007128 lpattack:0.1 lpenv:2 ftype:24db ]", "[ 3/4 → 1/1 | note:F#5 s:sawtooth gain:0.300533478008833 attack:0.001 decay:0.2 sustain:0 hcutoff:5958.137268909887 cutoff:4000 ]", "[ 3/4 → 1/1 | note:A4 s:sawtooth gain:0.300533478008833 attack:0.001 decay:0.2 sustain:0 hcutoff:5958.137268909887 cutoff:4000 ]", "[ 3/4 → 1/1 | s:hh3 gain:0.7 ]", @@ -7764,8 +7764,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (3/4 → 1/1) ⇝ 9/8 | note:E5 s:sawtooth gain:0.30398425548024827 attack:0.001 decay:0.2 sustain:0 hcutoff:5951.963201008076 cutoff:4000 ]", "[ 1/2 ⇜ (5/6 → 7/8) | note:A5 s:sawtooth gain:0.29000691362123476 attack:0.001 decay:0.2 sustain:0 hcutoff:5974.128467049176 cutoff:4000 ]", "[ 1/2 ⇜ (5/6 → 7/8) | note:C#5 s:sawtooth gain:0.29000691362123476 attack:0.001 decay:0.2 sustain:0 hcutoff:5974.128467049176 cutoff:4000 ]", - "[ 7/8 → 1/1 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:1897.1038487394403 ]", - "[ 7/8 → 1/1 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:1897.1038487394403 ]", + "[ 7/8 → 1/1 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:1897.1038487394403 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 7/8 → 1/1 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:1897.1038487394403 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (7/8 → 1/1) ⇝ 5/4 | note:A5 s:sawtooth gain:0.3107861971007485 attack:0.001 decay:0.2 sustain:0 hcutoff:5938.355801271282 cutoff:4000 ]", "[ (7/8 → 1/1) ⇝ 5/4 | note:C#5 s:sawtooth gain:0.3107861971007485 attack:0.001 decay:0.2 sustain:0 hcutoff:5938.355801271282 cutoff:4000 ]", "[ 5/8 ⇜ (11/12 → 1/1) | note:F#5 s:sawtooth gain:0.29705226105983373 attack:0.001 decay:0.2 sustain:0 hcutoff:5963.890147645195 cutoff:4000 ]", @@ -7781,8 +7781,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (1/1 → 4/3) ⇝ 11/8 | note:E5 s:sawtooth gain:0.317441699448191 attack:0.001 decay:0.2 sustain:0 hcutoff:5923.077274266886 cutoff:4000 ]", "[ 3/4 ⇜ (13/12 → 9/8) | note:A5 s:sawtooth gain:0.30398425548024827 attack:0.001 decay:0.2 sustain:0 hcutoff:5951.963201008076 cutoff:4000 ]", "[ 3/4 ⇜ (13/12 → 9/8) | note:C#5 s:sawtooth gain:0.30398425548024827 attack:0.001 decay:0.2 sustain:0 hcutoff:5951.963201008076 cutoff:4000 ]", - "[ 9/8 → 5/4 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:1961.928446178906 ]", - "[ 9/8 → 5/4 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:1961.928446178906 ]", + "[ 9/8 → 5/4 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:1961.928446178906 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 9/8 → 5/4 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:1961.928446178906 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (9/8 → 17/12) ⇝ 3/2 | note:A5 s:sawtooth gain:0.3239347288344676 attack:0.001 decay:0.2 sustain:0 hcutoff:5906.1380911341175 cutoff:4000 ]", "[ (9/8 → 17/12) ⇝ 3/2 | note:C#5 s:sawtooth gain:0.3239347288344676 attack:0.001 decay:0.2 sustain:0 hcutoff:5906.1380911341175 cutoff:4000 ]", "[ 7/8 ⇜ (7/6 → 5/4) | note:F#5 s:sawtooth gain:0.3107861971007485 attack:0.001 decay:0.2 sustain:0 hcutoff:5938.355801271282 cutoff:4000 ]", @@ -7794,14 +7794,14 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (5/4 → 19/12) ⇝ 13/8 | note:E5 s:sawtooth gain:0.3302496429830646 attack:0.001 decay:0.2 sustain:0 hcutoff:5887.549861142967 cutoff:4000 ]", "[ 1/1 ⇜ (4/3 → 11/8) | note:A5 s:sawtooth gain:0.317441699448191 attack:0.001 decay:0.2 sustain:0 hcutoff:5923.077274266886 cutoff:4000 ]", "[ 1/1 ⇜ (4/3 → 11/8) | note:C#5 s:sawtooth gain:0.317441699448191 attack:0.001 decay:0.2 sustain:0 hcutoff:5923.077274266886 cutoff:4000 ]", - "[ 11/8 → 3/2 | note:D2 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2026.0015806698216 ]", - "[ 11/8 → 3/2 | note:D2 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2026.0015806698216 ]", + "[ 11/8 → 3/2 | note:D2 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2026.0015806698216 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 11/8 → 3/2 | note:D2 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2026.0015806698216 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (11/8 → 5/3) ⇝ 7/4 | note:A5 s:sawtooth gain:0.3363712287126769 attack:0.001 decay:0.2 sustain:0 hcutoff:5867.325323737765 cutoff:4000 ]", "[ (11/8 → 5/3) ⇝ 7/4 | note:C#5 s:sawtooth gain:0.3363712287126769 attack:0.001 decay:0.2 sustain:0 hcutoff:5867.325323737765 cutoff:4000 ]", "[ 9/8 ⇜ (17/12 → 3/2) | note:F#5 s:sawtooth gain:0.3239347288344676 attack:0.001 decay:0.2 sustain:0 hcutoff:5906.1380911341175 cutoff:4000 ]", "[ 9/8 ⇜ (17/12 → 3/2) | note:A4 s:sawtooth gain:0.3239347288344676 attack:0.001 decay:0.2 sustain:0 hcutoff:5906.1380911341175 cutoff:4000 ]", - "[ 3/2 → 13/8 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2057.708031580958 ]", - "[ 3/2 → 13/8 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2057.708031580958 ]", + "[ 3/2 → 13/8 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2057.708031580958 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 3/2 → 13/8 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2057.708031580958 lpattack:0.1 lpenv:2 ftype:24db ]", "[ 3/2 → 7/4 | note:F#5 s:sawtooth gain:0.339354895673865 attack:0.001 decay:0.2 sustain:0 hcutoff:5856.603727730447 cutoff:4000 ]", "[ 3/2 → 7/4 | note:A4 s:sawtooth gain:0.339354895673865 attack:0.001 decay:0.2 sustain:0 hcutoff:5856.603727730447 cutoff:4000 ]", "[ 3/2 → 7/4 | s:bd gain:0.7 ]", @@ -7818,8 +7818,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (13/8 → 2/1) ⇝ 17/8 | note:A3 s:square gain:0.7 attack:0.01 decay:0.1 sustain:0 cutoff:2120.3652183367367 ]", "[ 11/8 ⇜ (5/3 → 7/4) | note:F#5 s:sawtooth gain:0.3363712287126769 attack:0.001 decay:0.2 sustain:0 hcutoff:5867.325323737765 cutoff:4000 ]", "[ 11/8 ⇜ (5/3 → 7/4) | note:A4 s:sawtooth gain:0.3363712287126769 attack:0.001 decay:0.2 sustain:0 hcutoff:5867.325323737765 cutoff:4000 ]", - "[ 7/4 → 15/8 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2120.3652183367367 ]", - "[ 7/4 → 15/8 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2120.3652183367367 ]", + "[ 7/4 → 15/8 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2120.3652183367367 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 7/4 → 15/8 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2120.3652183367367 lpattack:0.1 lpenv:2 ftype:24db ]", "[ 7/4 → 2/1 | note:F#5 s:sawtooth gain:0.3507338432270528 attack:0.001 decay:0.2 sustain:0 hcutoff:5809.698831278217 cutoff:4000 ]", "[ 7/4 → 2/1 | note:A4 s:sawtooth gain:0.3507338432270528 attack:0.001 decay:0.2 sustain:0 hcutoff:5809.698831278217 cutoff:4000 ]", "[ 7/4 → 2/1 | s:hh3 gain:0.7 ]", @@ -7829,8 +7829,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (7/4 → 2/1) ⇝ 9/4 | note:A3 s:square gain:0.7 attack:0.01 decay:0.1 sustain:0 cutoff:2135.8582993222344 ]", "[ 3/2 ⇜ (11/6 → 15/8) | note:A5 s:sawtooth gain:0.3422847385870941 attack:0.001 decay:0.2 sustain:0 hcutoff:5845.47833980621 cutoff:4000 ]", "[ 3/2 ⇜ (11/6 → 15/8) | note:C#5 s:sawtooth gain:0.3422847385870941 attack:0.001 decay:0.2 sustain:0 hcutoff:5845.47833980621 cutoff:4000 ]", - "[ 15/8 → 2/1 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2151.2782118349805 ]", - "[ 15/8 → 2/1 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2151.2782118349805 ]", + "[ 15/8 → 2/1 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2151.2782118349805 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 15/8 → 2/1 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2151.2782118349805 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (15/8 → 2/1) ⇝ 9/4 | note:A5 s:sawtooth gain:0.35343108171056004 attack:0.001 decay:0.2 sustain:0 hcutoff:5796.978025372246 cutoff:4000 ]", "[ (15/8 → 2/1) ⇝ 9/4 | note:C#5 s:sawtooth gain:0.35343108171056004 attack:0.001 decay:0.2 sustain:0 hcutoff:5796.978025372246 cutoff:4000 ]", "[ (15/8 → 2/1) ⇝ 19/8 | note:F#3 s:square gain:0.7 attack:0.01 decay:0.1 sustain:0 cutoff:2151.2782118349805 ]", @@ -7854,8 +7854,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ 15/8 ⇜ (2/1 → 19/8) | note:A3 s:square gain:0.7 attack:0.01 decay:0.1 sustain:0 cutoff:2212.17990613181 ]", "[ 7/4 ⇜ (25/12 → 17/8) | note:A5 s:sawtooth gain:0.3586370624427201 attack:0.001 decay:0.2 sustain:0 hcutoff:5770.357934562703 cutoff:4000 ]", "[ 7/4 ⇜ (25/12 → 17/8) | note:C#5 s:sawtooth gain:0.3586370624427201 attack:0.001 decay:0.2 sustain:0 hcutoff:5770.357934562703 cutoff:4000 ]", - "[ 17/8 → 9/4 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2212.17990613181 ]", - "[ 17/8 → 9/4 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2212.17990613181 ]", + "[ 17/8 → 9/4 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2212.17990613181 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 17/8 → 9/4 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2212.17990613181 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (17/8 → 29/12) ⇝ 5/2 | note:A5 s:sawtooth gain:0.368251964143991 attack:0.001 decay:0.2 sustain:0 hcutoff:5712.469093657604 cutoff:4000 ]", "[ (17/8 → 29/12) ⇝ 5/2 | note:C#5 s:sawtooth gain:0.368251964143991 attack:0.001 decay:0.2 sustain:0 hcutoff:5712.469093657604 cutoff:4000 ]", "[ 15/8 ⇜ (13/6 → 9/4) | note:F#5 s:sawtooth gain:0.36114266880324397 attack:0.001 decay:0.2 sustain:0 hcutoff:5756.463210874651 cutoff:4000 ]", @@ -7867,14 +7867,14 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (9/4 → 31/12) ⇝ 21/8 | note:E5 s:sawtooth gain:0.3726377219727376 attack:0.001 decay:0.2 sustain:0 hcutoff:5681.240017681994 cutoff:4000 ]", "[ 2/1 ⇜ (7/3 → 19/8) | note:A5 s:sawtooth gain:0.3635813269759728 attack:0.001 decay:0.2 sustain:0 hcutoff:5742.18185383172 cutoff:4000 ]", "[ 2/1 ⇜ (7/3 → 19/8) | note:C#5 s:sawtooth gain:0.3635813269759728 attack:0.001 decay:0.2 sustain:0 hcutoff:5742.18185383172 cutoff:4000 ]", - "[ 19/8 → 5/2 | note:D2 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2271.727259793624 ]", - "[ 19/8 → 5/2 | note:D2 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2271.727259793624 ]", + "[ 19/8 → 5/2 | note:D2 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2271.727259793624 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 19/8 → 5/2 | note:D2 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2271.727259793624 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (19/8 → 8/3) ⇝ 11/4 | note:A5 s:sawtooth gain:0.3767280347874561 attack:0.001 decay:0.2 sustain:0 hcutoff:5648.516028753632 cutoff:4000 ]", "[ (19/8 → 8/3) ⇝ 11/4 | note:C#5 s:sawtooth gain:0.3767280347874561 attack:0.001 decay:0.2 sustain:0 hcutoff:5648.516028753632 cutoff:4000 ]", "[ 17/8 ⇜ (29/12 → 5/2) | note:F#5 s:sawtooth gain:0.368251964143991 attack:0.001 decay:0.2 sustain:0 hcutoff:5712.469093657604 cutoff:4000 ]", "[ 17/8 ⇜ (29/12 → 5/2) | note:A4 s:sawtooth gain:0.368251964143991 attack:0.001 decay:0.2 sustain:0 hcutoff:5712.469093657604 cutoff:4000 ]", - "[ 5/2 → 21/8 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2300.948092306816 ]", - "[ 5/2 → 21/8 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2300.948092306816 ]", + "[ 5/2 → 21/8 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2300.948092306816 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 5/2 → 21/8 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2300.948092306816 lpattack:0.1 lpenv:2 ftype:24db ]", "[ 5/2 → 11/4 | note:F#5 s:sawtooth gain:0.37865929150004085 attack:0.001 decay:0.2 sustain:0 hcutoff:5631.60041088523 cutoff:4000 ]", "[ 5/2 → 11/4 | note:A4 s:sawtooth gain:0.37865929150004085 attack:0.001 decay:0.2 sustain:0 hcutoff:5631.60041088523 cutoff:4000 ]", "[ 5/2 → 11/4 | s:bd gain:0.7 ]", @@ -7887,8 +7887,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (21/8 → 35/12) ⇝ 3/1 | note:C#5 s:sawtooth gain:0.38398364517932737 attack:0.001 decay:0.2 sustain:0 hcutoff:5578.674030756363 cutoff:4000 ]", "[ 19/8 ⇜ (8/3 → 11/4) | note:F#5 s:sawtooth gain:0.3767280347874561 attack:0.001 decay:0.2 sustain:0 hcutoff:5648.516028753632 cutoff:4000 ]", "[ 19/8 ⇜ (8/3 → 11/4) | note:A4 s:sawtooth gain:0.3767280347874561 attack:0.001 decay:0.2 sustain:0 hcutoff:5648.516028753632 cutoff:4000 ]", - "[ 11/4 → 23/8 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2358.1960716159333 ]", - "[ 11/4 → 23/8 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2358.1960716159333 ]", + "[ 11/4 → 23/8 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2358.1960716159333 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 11/4 → 23/8 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2358.1960716159333 lpattack:0.1 lpenv:2 ftype:24db ]", "[ 11/4 → 3/1 | note:F#5 s:sawtooth gain:0.3855983939685166 attack:0.001 decay:0.2 sustain:0 hcutoff:5560.31547155504 cutoff:4000 ]", "[ 11/4 → 3/1 | note:A4 s:sawtooth gain:0.3855983939685166 attack:0.001 decay:0.2 sustain:0 hcutoff:5560.31547155504 cutoff:4000 ]", "[ 11/4 → 3/1 | s:hh3 gain:0.7 ]", @@ -7896,8 +7896,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (11/4 → 3/1) ⇝ 25/8 | note:E5 s:sawtooth gain:0.3871314633555296 attack:0.001 decay:0.2 sustain:0 hcutoff:5541.603887904197 cutoff:4000 ]", "[ 5/2 ⇜ (17/6 → 23/8) | note:A5 s:sawtooth gain:0.38051304866630675 attack:0.001 decay:0.2 sustain:0 hcutoff:5614.319554259933 cutoff:4000 ]", "[ 5/2 ⇜ (17/6 → 23/8) | note:C#5 s:sawtooth gain:0.38051304866630675 attack:0.001 decay:0.2 sustain:0 hcutoff:5614.319554259933 cutoff:4000 ]", - "[ 23/8 → 3/1 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2386.1887343697626 ]", - "[ 23/8 → 3/1 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2386.1887343697626 ]", + "[ 23/8 → 3/1 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2386.1887343697626 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 23/8 → 3/1 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2386.1887343697626 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (23/8 → 3/1) ⇝ 13/4 | note:A5 s:sawtooth gain:0.38994891982521085 attack:0.001 decay:0.2 sustain:0 hcutoff:5503.134531727652 cutoff:4000 ]", "[ (23/8 → 3/1) ⇝ 13/4 | note:C#5 s:sawtooth gain:0.38994891982521085 attack:0.001 decay:0.2 sustain:0 hcutoff:5503.134531727652 cutoff:4000 ]", "[ 21/8 ⇜ (35/12 → 3/1) | note:F#5 s:sawtooth gain:0.38398364517932737 attack:0.001 decay:0.2 sustain:0 hcutoff:5578.674030756363 cutoff:4000 ]", @@ -7913,8 +7913,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (3/1 → 10/3) ⇝ 27/8 | note:E5 s:sawtooth gain:0.39242922708895556 attack:0.001 decay:0.2 sustain:0 hcutoff:5463.2923272018625 cutoff:4000 ]", "[ 11/4 ⇜ (37/12 → 25/8) | note:A5 s:sawtooth gain:0.3871314633555296 attack:0.001 decay:0.2 sustain:0 hcutoff:5541.603887904197 cutoff:4000 ]", "[ 11/4 ⇜ (37/12 → 25/8) | note:C#5 s:sawtooth gain:0.3871314633555296 attack:0.001 decay:0.2 sustain:0 hcutoff:5541.603887904197 cutoff:4000 ]", - "[ 25/8 → 13/4 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2440.8271075661924 ]", - "[ 25/8 → 13/4 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2440.8271075661924 ]", + "[ 25/8 → 13/4 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2440.8271075661924 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 25/8 → 13/4 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2440.8271075661924 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (25/8 → 41/12) ⇝ 7/2 | note:A5 s:sawtooth gain:0.394566409869316 attack:0.001 decay:0.2 sustain:0 hcutoff:5422.104580183649 cutoff:4000 ]", "[ (25/8 → 41/12) ⇝ 7/2 | note:C#5 s:sawtooth gain:0.394566409869316 attack:0.001 decay:0.2 sustain:0 hcutoff:5422.104580183649 cutoff:4000 ]", "[ 23/8 ⇜ (19/6 → 13/4) | note:F#5 s:sawtooth gain:0.38994891982521085 attack:0.001 decay:0.2 sustain:0 hcutoff:5503.134531727652 cutoff:4000 ]", @@ -7926,14 +7926,14 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (13/4 → 43/12) ⇝ 29/8 | note:E5 s:sawtooth gain:0.3963553195057793 attack:0.001 decay:0.2 sustain:0 hcutoff:5379.599518697443 cutoff:4000 ]", "[ 3/1 ⇜ (10/3 → 27/8) | note:A5 s:sawtooth gain:0.39242922708895556 attack:0.001 decay:0.2 sustain:0 hcutoff:5463.2923272018625 cutoff:4000 ]", "[ 3/1 ⇜ (10/3 → 27/8) | note:C#5 s:sawtooth gain:0.39242922708895556 attack:0.001 decay:0.2 sustain:0 hcutoff:5463.2923272018625 cutoff:4000 ]", - "[ 27/8 → 7/2 | note:D2 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2493.5603089922215 ]", - "[ 27/8 → 7/2 | note:D2 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2493.5603089922215 ]", + "[ 27/8 → 7/2 | note:D2 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2493.5603089922215 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 27/8 → 7/2 | note:D2 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2493.5603089922215 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (27/8 → 11/3) ⇝ 15/4 | note:A5 s:sawtooth gain:0.3977916463583412 attack:0.001 decay:0.2 sustain:0 hcutoff:5335.806273589214 cutoff:4000 ]", "[ (27/8 → 11/3) ⇝ 15/4 | note:C#5 s:sawtooth gain:0.3977916463583412 attack:0.001 decay:0.2 sustain:0 hcutoff:5335.806273589214 cutoff:4000 ]", "[ 25/8 ⇜ (41/12 → 7/2) | note:F#5 s:sawtooth gain:0.394566409869316 attack:0.001 decay:0.2 sustain:0 hcutoff:5422.104580183649 cutoff:4000 ]", "[ 25/8 ⇜ (41/12 → 7/2) | note:A4 s:sawtooth gain:0.394566409869316 attack:0.001 decay:0.2 sustain:0 hcutoff:5422.104580183649 cutoff:4000 ]", - "[ 7/2 → 29/8 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2519.1725829012184 ]", - "[ 7/2 → 29/8 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2519.1725829012184 ]", + "[ 7/2 → 29/8 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2519.1725829012184 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 7/2 → 29/8 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2519.1725829012184 lpattack:0.1 lpenv:2 ftype:24db ]", "[ 7/2 → 15/4 | note:F#5 s:sawtooth gain:0.3983764764947172 attack:0.001 decay:0.2 sustain:0 hcutoff:5313.435927530719 cutoff:4000 ]", "[ 7/2 → 15/4 | note:A4 s:sawtooth gain:0.3983764764947172 attack:0.001 decay:0.2 sustain:0 hcutoff:5313.435927530719 cutoff:4000 ]", "[ 7/2 → 15/4 | s:bd gain:0.7 ]", @@ -7950,8 +7950,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (29/8 → 4/1) ⇝ 33/8 | note:B3 s:square gain:0.7 attack:0.01 decay:0.1 sustain:0 cutoff:2568.811347023862 ]", "[ 27/8 ⇜ (11/3 → 15/4) | note:F#5 s:sawtooth gain:0.3977916463583412 attack:0.001 decay:0.2 sustain:0 hcutoff:5335.806273589214 cutoff:4000 ]", "[ 27/8 ⇜ (11/3 → 15/4) | note:A4 s:sawtooth gain:0.3977916463583412 attack:0.001 decay:0.2 sustain:0 hcutoff:5335.806273589214 cutoff:4000 ]", - "[ 15/4 → 31/8 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2568.811347023862 ]", - "[ 15/4 → 31/8 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2568.811347023862 ]", + "[ 15/4 → 31/8 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2568.811347023862 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 15/4 → 31/8 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2568.811347023862 lpattack:0.1 lpenv:2 ftype:24db ]", "[ 15/4 → 4/1 | note:F#5 s:sawtooth gain:0.3998193184307759 attack:0.001 decay:0.2 sustain:0 hcutoff:5220.886439234386 cutoff:4000 ]", "[ 15/4 → 4/1 | note:A4 s:sawtooth gain:0.3998193184307759 attack:0.001 decay:0.2 sustain:0 hcutoff:5220.886439234386 cutoff:4000 ]", "[ 15/4 → 4/1 | s:hh3 gain:0.7 ]", @@ -7961,8 +7961,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (15/4 → 4/1) ⇝ 17/4 | note:B3 s:square gain:0.7 attack:0.01 decay:0.1 sustain:0 cutoff:2580.8797353950404 ]", "[ 7/2 ⇜ (23/6 → 31/8) | note:A5 s:sawtooth gain:0.3988719301898066 attack:0.001 decay:0.2 sustain:0 hcutoff:5290.754858561636 cutoff:4000 ]", "[ 7/2 ⇜ (23/6 → 31/8) | note:C#5 s:sawtooth gain:0.3988719301898066 attack:0.001 decay:0.2 sustain:0 hcutoff:5290.754858561636 cutoff:4000 ]", - "[ 31/8 → 4/1 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2592.8079367021132 ]", - "[ 31/8 → 4/1 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2592.8079367021132 ]", + "[ 31/8 → 4/1 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2592.8079367021132 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 31/8 → 4/1 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2592.8079367021132 lpattack:0.1 lpenv:2 ftype:24db ]", "[ 31/8 → 4/1 | s:bd gain:0.7 ]", "[ (31/8 → 4/1) ⇝ 17/4 | note:A5 s:sawtooth gain:0.3999548228044306 attack:0.001 decay:0.2 sustain:0 hcutoff:5197.0018638323545 cutoff:4000 ]", "[ (31/8 → 4/1) ⇝ 17/4 | note:C#5 s:sawtooth gain:0.3999548228044306 attack:0.001 decay:0.2 sustain:0 hcutoff:5197.0018638323545 cutoff:4000 ]", @@ -7987,8 +7987,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ 31/8 ⇜ (4/1 → 35/8) | note:B3 s:square gain:0.7 attack:0.01 decay:0.1 sustain:0 cutoff:2639.083266757757 ]", "[ 15/4 ⇜ (49/12 → 33/8) | note:A5 s:sawtooth gain:0.3999548228044306 attack:0.001 decay:0.2 sustain:0 hcutoff:5148.3645377501725 cutoff:4000 ]", "[ 15/4 ⇜ (49/12 → 33/8) | note:C#5 s:sawtooth gain:0.3999548228044306 attack:0.001 decay:0.2 sustain:0 hcutoff:5148.3645377501725 cutoff:4000 ]", - "[ 33/8 → 17/4 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2639.083266757757 ]", - "[ 33/8 → 17/4 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2639.083266757757 ]", + "[ 33/8 → 17/4 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2639.083266757757 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 33/8 → 17/4 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2639.083266757757 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (33/8 → 53/12) ⇝ 9/2 | note:A5 s:sawtooth gain:0.3988719301898066 attack:0.001 decay:0.2 sustain:0 hcutoff:5047.734873274585 cutoff:4000 ]", "[ (33/8 → 53/12) ⇝ 9/2 | note:C#5 s:sawtooth gain:0.3988719301898066 attack:0.001 decay:0.2 sustain:0 hcutoff:5047.734873274585 cutoff:4000 ]", "[ 31/8 ⇜ (25/6 → 17/4) | note:F#5 s:sawtooth gain:0.3998193184307759 attack:0.001 decay:0.2 sustain:0 hcutoff:5123.62012082546 cutoff:4000 ]", @@ -8000,14 +8000,14 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (17/4 → 55/12) ⇝ 37/8 | note:E5 s:sawtooth gain:0.3977916463583412 attack:0.001 decay:0.2 sustain:0 hcutoff:4995.811501426648 cutoff:4000 ]", "[ 4/1 ⇜ (13/3 → 35/8) | note:A5 s:sawtooth gain:0.3995935685018036 attack:0.001 decay:0.2 sustain:0 hcutoff:5098.597504951462 cutoff:4000 ]", "[ 4/1 ⇜ (13/3 → 35/8) | note:C#5 s:sawtooth gain:0.3995935685018036 attack:0.001 decay:0.2 sustain:0 hcutoff:5098.597504951462 cutoff:4000 ]", - "[ 35/8 → 9/2 | note:D2 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2682.97580859032 ]", - "[ 35/8 → 9/2 | note:D2 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2682.97580859032 ]", + "[ 35/8 → 9/2 | note:D2 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2682.97580859032 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 35/8 → 9/2 | note:D2 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2682.97580859032 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (35/8 → 14/3) ⇝ 19/4 | note:A5 s:sawtooth gain:0.3963553195057793 attack:0.001 decay:0.2 sustain:0 hcutoff:4942.862975093085 cutoff:4000 ]", "[ (35/8 → 14/3) ⇝ 19/4 | note:C#5 s:sawtooth gain:0.3963553195057793 attack:0.001 decay:0.2 sustain:0 hcutoff:4942.862975093085 cutoff:4000 ]", "[ 33/8 ⇜ (53/12 → 9/2) | note:F#5 s:sawtooth gain:0.3988719301898066 attack:0.001 decay:0.2 sustain:0 hcutoff:5047.734873274585 cutoff:4000 ]", "[ 33/8 ⇜ (53/12 → 9/2) | note:A4 s:sawtooth gain:0.3988719301898066 attack:0.001 decay:0.2 sustain:0 hcutoff:5047.734873274585 cutoff:4000 ]", - "[ 9/2 → 37/8 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2703.995258572327 ]", - "[ 9/2 → 37/8 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2703.995258572327 ]", + "[ 9/2 → 37/8 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2703.995258572327 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 9/2 → 37/8 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2703.995258572327 lpattack:0.1 lpenv:2 ftype:24db ]", "[ 9/2 → 19/4 | note:F#5 s:sawtooth gain:0.3955046879791817 attack:0.001 decay:0.2 sustain:0 hcutoff:4916.015592312082 cutoff:4000 ]", "[ 9/2 → 19/4 | note:A4 s:sawtooth gain:0.3955046879791817 attack:0.001 decay:0.2 sustain:0 hcutoff:4916.015592312082 cutoff:4000 ]", "[ 9/2 → 19/4 | s:bd gain:0.7 ]", @@ -8020,8 +8020,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (37/8 → 59/12) ⇝ 5/1 | note:C#5 s:sawtooth gain:0.39242922708895556 attack:0.001 decay:0.2 sustain:0 hcutoff:4834.036289789029 cutoff:4000 ]", "[ 35/8 ⇜ (14/3 → 19/4) | note:F#5 s:sawtooth gain:0.3963553195057793 attack:0.001 decay:0.2 sustain:0 hcutoff:4942.862975093085 cutoff:4000 ]", "[ 35/8 ⇜ (14/3 → 19/4) | note:A4 s:sawtooth gain:0.3963553195057793 attack:0.001 decay:0.2 sustain:0 hcutoff:4942.862975093085 cutoff:4000 ]", - "[ 19/4 → 39/8 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2744.1172176410028 ]", - "[ 19/4 → 39/8 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2744.1172176410028 ]", + "[ 19/4 → 39/8 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2744.1172176410028 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 19/4 → 39/8 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2744.1172176410028 lpattack:0.1 lpenv:2 ftype:24db ]", "[ 19/4 → 5/1 | note:F#5 s:sawtooth gain:0.3912316097774532 attack:0.001 decay:0.2 sustain:0 hcutoff:4806.246411789873 cutoff:4000 ]", "[ 19/4 → 5/1 | note:A4 s:sawtooth gain:0.3912316097774532 attack:0.001 decay:0.2 sustain:0 hcutoff:4806.246411789873 cutoff:4000 ]", "[ 19/4 → 5/1 | s:hh3 gain:0.7 ]", @@ -8029,8 +8029,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (19/4 → 5/1) ⇝ 41/8 | note:E5 s:sawtooth gain:0.38994891982521085 attack:0.001 decay:0.2 sustain:0 hcutoff:4778.23271519263 cutoff:4000 ]", "[ 9/2 ⇜ (29/6 → 39/8) | note:A5 s:sawtooth gain:0.394566409869316 attack:0.001 decay:0.2 sustain:0 hcutoff:4888.925582549005 cutoff:4000 ]", "[ 9/2 ⇜ (29/6 → 39/8) | note:C#5 s:sawtooth gain:0.394566409869316 attack:0.001 decay:0.2 sustain:0 hcutoff:4888.925582549005 cutoff:4000 ]", - "[ 39/8 → 5/1 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2763.195558759784 ]", - "[ 39/8 → 5/1 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2763.195558759784 ]", + "[ 39/8 → 5/1 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2763.195558759784 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 39/8 → 5/1 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2763.195558759784 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (39/8 → 5/1) ⇝ 21/4 | note:A5 s:sawtooth gain:0.3871314633555296 attack:0.001 decay:0.2 sustain:0 hcutoff:4721.553103742387 cutoff:4000 ]", "[ (39/8 → 5/1) ⇝ 21/4 | note:C#5 s:sawtooth gain:0.3871314633555296 attack:0.001 decay:0.2 sustain:0 hcutoff:4721.553103742387 cutoff:4000 ]", "[ 37/8 ⇜ (59/12 → 5/1) | note:F#5 s:sawtooth gain:0.39242922708895556 attack:0.001 decay:0.2 sustain:0 hcutoff:4834.036289789029 cutoff:4000 ]", @@ -8046,8 +8046,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (5/1 → 16/3) ⇝ 43/8 | note:E5 s:sawtooth gain:0.38398364517932737 attack:0.001 decay:0.2 sustain:0 hcutoff:4664.036300812779 cutoff:4000 ]", "[ 19/4 ⇜ (61/12 → 41/8) | note:A5 s:sawtooth gain:0.38994891982521085 attack:0.001 decay:0.2 sustain:0 hcutoff:4778.23271519263 cutoff:4000 ]", "[ 19/4 ⇜ (61/12 → 41/8) | note:C#5 s:sawtooth gain:0.38994891982521085 attack:0.001 decay:0.2 sustain:0 hcutoff:4778.23271519263 cutoff:4000 ]", - "[ 41/8 → 21/4 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2799.329510692108 ]", - "[ 41/8 → 21/4 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2799.329510692108 ]", + "[ 41/8 → 21/4 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2799.329510692108 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 41/8 → 21/4 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2799.329510692108 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (41/8 → 65/12) ⇝ 11/2 | note:A5 s:sawtooth gain:0.38051304866630675 attack:0.001 decay:0.2 sustain:0 hcutoff:4605.721725547503 cutoff:4000 ]", "[ (41/8 → 65/12) ⇝ 11/2 | note:C#5 s:sawtooth gain:0.38051304866630675 attack:0.001 decay:0.2 sustain:0 hcutoff:4605.721725547503 cutoff:4000 ]", "[ 39/8 ⇜ (31/6 → 21/4) | note:F#5 s:sawtooth gain:0.3871314633555296 attack:0.001 decay:0.2 sustain:0 hcutoff:4721.553103742387 cutoff:4000 ]", @@ -8059,14 +8059,14 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (21/4 → 67/12) ⇝ 45/8 | note:E5 s:sawtooth gain:0.3767280347874561 attack:0.001 decay:0.2 sustain:0 hcutoff:4546.64934384357 cutoff:4000 ]", "[ 5/1 ⇜ (16/3 → 43/8) | note:A5 s:sawtooth gain:0.38398364517932737 attack:0.001 decay:0.2 sustain:0 hcutoff:4664.036300812779 cutoff:4000 ]", "[ 5/1 ⇜ (16/3 → 43/8) | note:C#5 s:sawtooth gain:0.38398364517932737 attack:0.001 decay:0.2 sustain:0 hcutoff:4664.036300812779 cutoff:4000 ]", - "[ 43/8 → 11/2 | note:D2 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2832.694627163799 ]", - "[ 43/8 → 11/2 | note:D2 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2832.694627163799 ]", + "[ 43/8 → 11/2 | note:D2 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2832.694627163799 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 43/8 → 11/2 | note:D2 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2832.694627163799 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (43/8 → 17/3) ⇝ 23/4 | note:A5 s:sawtooth gain:0.3726377219727376 attack:0.001 decay:0.2 sustain:0 hcutoff:4486.859640960669 cutoff:4000 ]", "[ (43/8 → 17/3) ⇝ 23/4 | note:C#5 s:sawtooth gain:0.3726377219727376 attack:0.001 decay:0.2 sustain:0 hcutoff:4486.859640960669 cutoff:4000 ]", "[ 41/8 ⇜ (65/12 → 11/2) | note:F#5 s:sawtooth gain:0.38051304866630675 attack:0.001 decay:0.2 sustain:0 hcutoff:4605.721725547503 cutoff:4000 ]", "[ 41/8 ⇜ (65/12 → 11/2) | note:A4 s:sawtooth gain:0.38051304866630675 attack:0.001 decay:0.2 sustain:0 hcutoff:4605.721725547503 cutoff:4000 ]", - "[ 11/2 → 45/8 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2848.313487543853 ]", - "[ 11/2 → 45/8 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2848.313487543853 ]", + "[ 11/2 → 45/8 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2848.313487543853 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 11/2 → 45/8 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2848.313487543853 lpattack:0.1 lpenv:2 ftype:24db ]", "[ 11/2 → 23/4 | note:F#5 s:sawtooth gain:0.3704811297220968 attack:0.001 decay:0.2 sustain:0 hcutoff:4456.708580912725 cutoff:4000 ]", "[ 11/2 → 23/4 | note:A4 s:sawtooth gain:0.3704811297220968 attack:0.001 decay:0.2 sustain:0 hcutoff:4456.708580912725 cutoff:4000 ]", "[ 11/2 → 23/4 | s:bd gain:0.7 ]", @@ -8083,8 +8083,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (45/8 → 6/1) ⇝ 49/8 | note:A3 s:square gain:0.7 attack:0.01 decay:0.1 sustain:0 cutoff:2877.376777172205 ]", "[ 43/8 ⇜ (17/3 → 23/4) | note:F#5 s:sawtooth gain:0.3726377219727376 attack:0.001 decay:0.2 sustain:0 hcutoff:4486.859640960669 cutoff:4000 ]", "[ 43/8 ⇜ (17/3 → 23/4) | note:A4 s:sawtooth gain:0.3726377219727376 attack:0.001 decay:0.2 sustain:0 hcutoff:4486.859640960669 cutoff:4000 ]", - "[ 23/4 → 47/8 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2877.376777172205 ]", - "[ 23/4 → 47/8 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2877.376777172205 ]", + "[ 23/4 → 47/8 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2877.376777172205 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 23/4 → 47/8 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2877.376777172205 lpattack:0.1 lpenv:2 ftype:24db ]", "[ 23/4 → 6/1 | note:F#5 s:sawtooth gain:0.36114266880324386 attack:0.001 decay:0.2 sustain:0 hcutoff:4334.517148084427 cutoff:4000 ]", "[ 23/4 → 6/1 | note:A4 s:sawtooth gain:0.36114266880324386 attack:0.001 decay:0.2 sustain:0 hcutoff:4334.517148084427 cutoff:4000 ]", "[ 23/4 → 6/1 | s:hh3 gain:0.7 ]", @@ -8094,8 +8094,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (23/4 → 6/1) ⇝ 25/4 | note:A3 s:square gain:0.7 attack:0.01 decay:0.1 sustain:0 cutoff:2884.183170199766 ]", "[ 11/2 ⇜ (35/6 → 47/8) | note:A5 s:sawtooth gain:0.368251964143991 attack:0.001 decay:0.2 sustain:0 hcutoff:4426.39359377459 cutoff:4000 ]", "[ 11/2 ⇜ (35/6 → 47/8) | note:C#5 s:sawtooth gain:0.368251964143991 attack:0.001 decay:0.2 sustain:0 hcutoff:4426.39359377459 cutoff:4000 ]", - "[ 47/8 → 6/1 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2890.803699781578 ]", - "[ 47/8 → 6/1 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2890.803699781578 ]", + "[ 47/8 → 6/1 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2890.803699781578 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 47/8 → 6/1 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2890.803699781578 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (47/8 → 6/1) ⇝ 25/4 | note:A5 s:sawtooth gain:0.3586370624427201 attack:0.001 decay:0.2 sustain:0 hcutoff:4303.598663257904 cutoff:4000 ]", "[ (47/8 → 6/1) ⇝ 25/4 | note:C#5 s:sawtooth gain:0.3586370624427201 attack:0.001 decay:0.2 sustain:0 hcutoff:4303.598663257904 cutoff:4000 ]", "[ (47/8 → 6/1) ⇝ 51/8 | note:F#3 s:square gain:0.7 attack:0.01 decay:0.1 sustain:0 cutoff:2890.803699781578 ]", @@ -8119,8 +8119,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ 47/8 ⇜ (6/1 → 51/8) | note:A3 s:square gain:0.7 attack:0.01 decay:0.1 sustain:0 cutoff:2915.4076660819765 ]", "[ 23/4 ⇜ (73/12 → 49/8) | note:A5 s:sawtooth gain:0.35343108171056015 attack:0.001 decay:0.2 sustain:0 hcutoff:4241.3539374389275 cutoff:4000 ]", "[ 23/4 ⇜ (73/12 → 49/8) | note:C#5 s:sawtooth gain:0.35343108171056015 attack:0.001 decay:0.2 sustain:0 hcutoff:4241.3539374389275 cutoff:4000 ]", - "[ 49/8 → 25/4 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2915.4076660819765 ]", - "[ 49/8 → 25/4 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2915.4076660819765 ]", + "[ 49/8 → 25/4 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2915.4076660819765 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 49/8 → 25/4 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2915.4076660819765 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (49/8 → 77/12) ⇝ 13/2 | note:A5 s:sawtooth gain:0.3422847385870941 attack:0.001 decay:0.2 sustain:0 hcutoff:4115.383232572483 cutoff:4000 ]", "[ (49/8 → 77/12) ⇝ 13/2 | note:C#5 s:sawtooth gain:0.3422847385870941 attack:0.001 decay:0.2 sustain:0 hcutoff:4115.383232572483 cutoff:4000 ]", "[ 47/8 ⇜ (37/6 → 25/4) | note:F#5 s:sawtooth gain:0.3507338432270528 attack:0.001 decay:0.2 sustain:0 hcutoff:4210.038361759807 cutoff:4000 ]", @@ -8132,14 +8132,14 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (25/4 → 79/12) ⇝ 53/8 | note:E5 s:sawtooth gain:0.3363712287126769 attack:0.001 decay:0.2 sustain:0 hcutoff:4051.743587553753 cutoff:4000 ]", "[ 6/1 ⇜ (19/3 → 51/8) | note:A5 s:sawtooth gain:0.3479759264430665 attack:0.001 decay:0.2 sustain:0 hcutoff:4178.601124662687 cutoff:4000 ]", "[ 6/1 ⇜ (19/3 → 51/8) | note:C#5 s:sawtooth gain:0.3479759264430665 attack:0.001 decay:0.2 sustain:0 hcutoff:4178.601124662687 cutoff:4000 ]", - "[ 51/8 → 13/2 | note:D2 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2936.9631544781614 ]", - "[ 51/8 → 13/2 | note:D2 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2936.9631544781614 ]", + "[ 51/8 → 13/2 | note:D2 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2936.9631544781614 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 51/8 → 13/2 | note:D2 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2936.9631544781614 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (51/8 → 20/3) ⇝ 27/4 | note:A5 s:sawtooth gain:0.3302496429830646 attack:0.001 decay:0.2 sustain:0 hcutoff:3987.7258050403216 cutoff:4000 ]", "[ (51/8 → 20/3) ⇝ 27/4 | note:C#5 s:sawtooth gain:0.3302496429830646 attack:0.001 decay:0.2 sustain:0 hcutoff:3987.7258050403216 cutoff:4000 ]", "[ 49/8 ⇜ (77/12 → 13/2) | note:F#5 s:sawtooth gain:0.3422847385870941 attack:0.001 decay:0.2 sustain:0 hcutoff:4115.383232572483 cutoff:4000 ]", "[ 49/8 ⇜ (77/12 → 13/2) | note:A4 s:sawtooth gain:0.3422847385870941 attack:0.001 decay:0.2 sustain:0 hcutoff:4115.383232572483 cutoff:4000 ]", - "[ 13/2 → 53/8 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2946.5812012110136 ]", - "[ 13/2 → 53/8 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2946.5812012110136 ]", + "[ 13/2 → 53/8 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2946.5812012110136 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 13/2 → 53/8 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2946.5812012110136 lpattack:0.1 lpenv:2 ftype:24db ]", "[ 13/2 → 27/4 | note:F#5 s:sawtooth gain:0.3271154116289833 attack:0.001 decay:0.2 sustain:0 hcutoff:3955.588813730369 cutoff:4000 ]", "[ 13/2 → 27/4 | note:A4 s:sawtooth gain:0.3271154116289833 attack:0.001 decay:0.2 sustain:0 hcutoff:3955.588813730369 cutoff:4000 ]", "[ 13/2 → 27/4 | s:bd gain:0.7 ]", @@ -8152,8 +8152,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (53/8 → 83/12) ⇝ 7/1 | note:C#5 s:sawtooth gain:0.3174416994481911 attack:0.001 decay:0.2 sustain:0 hcutoff:3858.7315549779487 cutoff:4000 ]", "[ 51/8 ⇜ (20/3 → 27/4) | note:F#5 s:sawtooth gain:0.3302496429830646 attack:0.001 decay:0.2 sustain:0 hcutoff:3987.7258050403216 cutoff:4000 ]", "[ 51/8 ⇜ (20/3 → 27/4) | note:A4 s:sawtooth gain:0.3302496429830646 attack:0.001 decay:0.2 sustain:0 hcutoff:3987.7258050403216 cutoff:4000 ]", - "[ 27/4 → 55/8 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2963.468935477506 ]", - "[ 27/4 → 55/8 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2963.468935477506 ]", + "[ 27/4 → 55/8 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2963.468935477506 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 27/4 → 55/8 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2963.468935477506 lpattack:0.1 lpenv:2 ftype:24db ]", "[ 27/4 → 7/1 | note:F#5 s:sawtooth gain:0.31413326401454233 attack:0.001 decay:0.2 sustain:0 hcutoff:3826.315480550129 cutoff:4000 ]", "[ 27/4 → 7/1 | note:A4 s:sawtooth gain:0.31413326401454233 attack:0.001 decay:0.2 sustain:0 hcutoff:3826.315480550129 cutoff:4000 ]", "[ 27/4 → 7/1 | s:hh3 gain:0.7 ]", @@ -8161,8 +8161,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (27/4 → 7/1) ⇝ 57/8 | note:E5 s:sawtooth gain:0.3107861971007485 attack:0.001 decay:0.2 sustain:0 hcutoff:3793.8434936445938 cutoff:4000 ]", "[ 13/2 ⇜ (41/6 → 55/8) | note:A5 s:sawtooth gain:0.32393472883446767 attack:0.001 decay:0.2 sustain:0 hcutoff:3923.373759622562 cutoff:4000 ]", "[ 13/2 ⇜ (41/6 → 55/8) | note:C#5 s:sawtooth gain:0.32393472883446767 attack:0.001 decay:0.2 sustain:0 hcutoff:3923.373759622562 cutoff:4000 ]", - "[ 55/8 → 7/1 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2970.728450471497 ]", - "[ 55/8 → 7/1 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2970.728450471497 ]", + "[ 55/8 → 7/1 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2970.728450471497 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 55/8 → 7/1 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2970.728450471497 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (55/8 → 7/1) ⇝ 29/4 | note:A5 s:sawtooth gain:0.30398425548024827 attack:0.001 decay:0.2 sustain:0 hcutoff:3728.7540466585065 cutoff:4000 ]", "[ (55/8 → 7/1) ⇝ 29/4 | note:C#5 s:sawtooth gain:0.30398425548024827 attack:0.001 decay:0.2 sustain:0 hcutoff:3728.7540466585065 cutoff:4000 ]", "[ 53/8 ⇜ (83/12 → 7/1) | note:F#5 s:sawtooth gain:0.3174416994481911 attack:0.001 decay:0.2 sustain:0 hcutoff:3858.7315549779487 cutoff:4000 ]", @@ -8178,8 +8178,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (7/1 → 22/3) ⇝ 59/8 | note:E5 s:sawtooth gain:0.29705226105983373 attack:0.001 decay:0.2 sustain:0 hcutoff:3663.507823075358 cutoff:4000 ]", "[ 27/4 ⇜ (85/12 → 57/8) | note:A5 s:sawtooth gain:0.3107861971007485 attack:0.001 decay:0.2 sustain:0 hcutoff:3793.8434936445938 cutoff:4000 ]", "[ 27/4 ⇜ (85/12 → 57/8) | note:C#5 s:sawtooth gain:0.3107861971007485 attack:0.001 decay:0.2 sustain:0 hcutoff:3793.8434936445938 cutoff:4000 ]", - "[ 57/8 → 29/4 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2982.856914513109 ]", - "[ 57/8 → 29/4 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2982.856914513109 ]", + "[ 57/8 → 29/4 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2982.856914513109 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 57/8 → 29/4 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2982.856914513109 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (57/8 → 89/12) ⇝ 15/2 | note:A5 s:sawtooth gain:0.29000691362123476 attack:0.001 decay:0.2 sustain:0 hcutoff:3598.149539397671 cutoff:4000 ]", "[ (57/8 → 89/12) ⇝ 15/2 | note:C#5 s:sawtooth gain:0.29000691362123476 attack:0.001 decay:0.2 sustain:0 hcutoff:3598.149539397671 cutoff:4000 ]", "[ 55/8 ⇜ (43/6 → 29/4) | note:F#5 s:sawtooth gain:0.30398425548024827 attack:0.001 decay:0.2 sustain:0 hcutoff:3728.7540466585065 cutoff:4000 ]", @@ -8191,14 +8191,14 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (29/4 → 91/12) ⇝ 61/8 | note:E5 s:sawtooth gain:0.28286518602353056 attack:0.001 decay:0.2 sustain:0 hcutoff:3532.7239889283615 cutoff:4000 ]", "[ 7/1 ⇜ (22/3 → 59/8) | note:A5 s:sawtooth gain:0.29705226105983373 attack:0.001 decay:0.2 sustain:0 hcutoff:3663.507823075358 cutoff:4000 ]", "[ 7/1 ⇜ (22/3 → 59/8) | note:C#5 s:sawtooth gain:0.29705226105983373 attack:0.001 decay:0.2 sustain:0 hcutoff:3663.507823075358 cutoff:4000 ]", - "[ 59/8 → 15/2 | note:D2 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2991.774409503181 ]", - "[ 59/8 → 15/2 | note:D2 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2991.774409503181 ]", + "[ 59/8 → 15/2 | note:D2 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2991.774409503181 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 59/8 → 15/2 | note:D2 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2991.774409503181 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (59/8 → 23/3) ⇝ 31/4 | note:A5 s:sawtooth gain:0.2756442833140452 attack:0.001 decay:0.2 sustain:0 hcutoff:3467.276011071639 cutoff:4000 ]", "[ (59/8 → 23/3) ⇝ 31/4 | note:C#5 s:sawtooth gain:0.2756442833140452 attack:0.001 decay:0.2 sustain:0 hcutoff:3467.276011071639 cutoff:4000 ]", "[ 57/8 ⇜ (89/12 → 15/2) | note:F#5 s:sawtooth gain:0.29000691362123476 attack:0.001 decay:0.2 sustain:0 hcutoff:3598.149539397671 cutoff:4000 ]", "[ 57/8 ⇜ (89/12 → 15/2) | note:A4 s:sawtooth gain:0.29000691362123476 attack:0.001 decay:0.2 sustain:0 hcutoff:3598.149539397671 cutoff:4000 ]", - "[ 15/2 → 61/8 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2995.0220264467503 ]", - "[ 15/2 → 61/8 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2995.0220264467503 ]", + "[ 15/2 → 61/8 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2995.0220264467503 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 15/2 → 61/8 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2995.0220264467503 lpattack:0.1 lpenv:2 ftype:24db ]", "[ 15/2 → 31/4 | note:F#5 s:sawtooth gain:0.2720095711683043 attack:0.001 decay:0.2 sustain:0 hcutoff:3434.557629230318 cutoff:4000 ]", "[ 15/2 → 31/4 | note:A4 s:sawtooth gain:0.2720095711683043 attack:0.001 decay:0.2 sustain:0 hcutoff:3434.557629230318 cutoff:4000 ]", "[ 15/2 → 31/4 | s:bd gain:0.7 ]", @@ -8215,8 +8215,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (61/8 → 8/1) ⇝ 65/8 | note:B3 s:square gain:0.7 attack:0.01 decay:0.1 sustain:0 cutoff:2999.0852191942718 ]", "[ 59/8 ⇜ (23/3 → 31/4) | note:F#5 s:sawtooth gain:0.2756442833140452 attack:0.001 decay:0.2 sustain:0 hcutoff:3467.276011071639 cutoff:4000 ]", "[ 59/8 ⇜ (23/3 → 31/4) | note:A4 s:sawtooth gain:0.2756442833140452 attack:0.001 decay:0.2 sustain:0 hcutoff:3467.276011071639 cutoff:4000 ]", - "[ 31/4 → 63/8 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2999.0852191942718 ]", - "[ 31/4 → 63/8 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2999.0852191942718 ]", + "[ 31/4 → 63/8 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2999.0852191942718 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 31/4 → 63/8 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2999.0852191942718 lpattack:0.1 lpenv:2 ftype:24db ]", "[ 31/4 → 8/1 | note:F#5 s:sawtooth gain:0.2573601511491127 attack:0.001 decay:0.2 sustain:0 hcutoff:3303.852260680389 cutoff:4000 ]", "[ 31/4 → 8/1 | note:A4 s:sawtooth gain:0.2573601511491127 attack:0.001 decay:0.2 sustain:0 hcutoff:3303.852260680389 cutoff:4000 ]", "[ 31/4 → 8/1 | s:hh3 gain:0.7 ]", @@ -8226,8 +8226,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (31/4 → 8/1) ⇝ 33/4 | note:B3 s:square gain:0.7 attack:0.01 decay:0.1 sustain:0 cutoff:2999.5934052398757 ]", "[ 15/2 ⇜ (47/6 → 63/8) | note:A5 s:sawtooth gain:0.2683616012798825 attack:0.001 decay:0.2 sustain:0 hcutoff:3401.8504606023293 cutoff:4000 ]", "[ 15/2 ⇜ (47/6 → 63/8) | note:C#5 s:sawtooth gain:0.2683616012798825 attack:0.001 decay:0.2 sustain:0 hcutoff:3401.8504606023293 cutoff:4000 ]", - "[ 63/8 → 8/1 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2999.898347482845 ]", - "[ 63/8 → 8/1 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2999.898347482845 ]", + "[ 63/8 → 8/1 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2999.898347482845 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 63/8 → 8/1 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2999.898347482845 lpattack:0.1 lpenv:2 ftype:24db ]", "[ 63/8 → 8/1 | s:bd gain:0.7 ]", "[ (63/8 → 8/1) ⇝ 33/4 | note:A5 s:sawtooth gain:0.2536811842784369 attack:0.001 decay:0.2 sustain:0 hcutoff:3271.2459533414954 cutoff:4000 ]", "[ (63/8 → 8/1) ⇝ 33/4 | note:C#5 s:sawtooth gain:0.2536811842784369 attack:0.001 decay:0.2 sustain:0 hcutoff:3271.2459533414954 cutoff:4000 ]", @@ -8252,8 +8252,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ 63/8 ⇜ (8/1 → 67/8) | note:B3 s:square gain:0.7 attack:0.01 decay:0.1 sustain:0 cutoff:2999.0852191942718 ]", "[ 31/4 ⇜ (97/12 → 65/8) | note:A5 s:sawtooth gain:0.24631881572156322 attack:0.001 decay:0.2 sustain:0 hcutoff:3206.156506355406 cutoff:4000 ]", "[ 31/4 ⇜ (97/12 → 65/8) | note:C#5 s:sawtooth gain:0.24631881572156322 attack:0.001 decay:0.2 sustain:0 hcutoff:3206.156506355406 cutoff:4000 ]", - "[ 65/8 → 33/4 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2999.0852191942718 ]", - "[ 65/8 → 33/4 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2999.0852191942718 ]", + "[ 65/8 → 33/4 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2999.0852191942718 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 65/8 → 33/4 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2999.0852191942718 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (65/8 → 101/12) ⇝ 17/2 | note:A5 s:sawtooth gain:0.2316383987201176 attack:0.001 decay:0.2 sustain:0 hcutoff:3076.6262403774385 cutoff:4000 ]", "[ (65/8 → 101/12) ⇝ 17/2 | note:C#5 s:sawtooth gain:0.2316383987201176 attack:0.001 decay:0.2 sustain:0 hcutoff:3076.6262403774385 cutoff:4000 ]", "[ 63/8 ⇜ (49/6 → 33/4) | note:F#5 s:sawtooth gain:0.24263984885088735 attack:0.001 decay:0.2 sustain:0 hcutoff:3173.6845194498705 cutoff:4000 ]", @@ -8265,14 +8265,14 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (33/4 → 103/12) ⇝ 69/8 | note:E5 s:sawtooth gain:0.2243557166859549 attack:0.001 decay:0.2 sustain:0 hcutoff:3012.274194959679 cutoff:4000 ]", "[ 8/1 ⇜ (25/3 → 67/8) | note:A5 s:sawtooth gain:0.2389653154600499 attack:0.001 decay:0.2 sustain:0 hcutoff:3141.2684450220513 cutoff:4000 ]", "[ 8/1 ⇜ (25/3 → 67/8) | note:C#5 s:sawtooth gain:0.2389653154600499 attack:0.001 decay:0.2 sustain:0 hcutoff:3141.2684450220513 cutoff:4000 ]", - "[ 67/8 → 17/2 | note:D2 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2995.0220264467503 ]", - "[ 67/8 → 17/2 | note:D2 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2995.0220264467503 ]", + "[ 67/8 → 17/2 | note:D2 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2995.0220264467503 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 67/8 → 17/2 | note:D2 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2995.0220264467503 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (67/8 → 26/3) ⇝ 35/4 | note:A5 s:sawtooth gain:0.21713481397646955 attack:0.001 decay:0.2 sustain:0 hcutoff:2948.256412446248 cutoff:4000 ]", "[ (67/8 → 26/3) ⇝ 35/4 | note:C#5 s:sawtooth gain:0.21713481397646955 attack:0.001 decay:0.2 sustain:0 hcutoff:2948.256412446248 cutoff:4000 ]", "[ 65/8 ⇜ (101/12 → 17/2) | note:F#5 s:sawtooth gain:0.2316383987201176 attack:0.001 decay:0.2 sustain:0 hcutoff:3076.6262403774385 cutoff:4000 ]", "[ 65/8 ⇜ (101/12 → 17/2) | note:A4 s:sawtooth gain:0.2316383987201176 attack:0.001 decay:0.2 sustain:0 hcutoff:3076.6262403774385 cutoff:4000 ]", - "[ 17/2 → 69/8 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2991.774409503181 ]", - "[ 17/2 → 69/8 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2991.774409503181 ]", + "[ 17/2 → 69/8 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2991.774409503181 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 17/2 → 69/8 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2991.774409503181 lpattack:0.1 lpenv:2 ftype:24db ]", "[ 17/2 → 35/4 | note:F#5 s:sawtooth gain:0.21355297301451046 attack:0.001 decay:0.2 sustain:0 hcutoff:2916.386590360237 cutoff:4000 ]", "[ 17/2 → 35/4 | note:A4 s:sawtooth gain:0.21355297301451046 attack:0.001 decay:0.2 sustain:0 hcutoff:2916.386590360237 cutoff:4000 ]", "[ 17/2 → 35/4 | s:bd gain:0.7 ]", @@ -8285,8 +8285,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (69/8 → 107/12) ⇝ 9/1 | note:C#5 s:sawtooth gain:0.20294773894016632 attack:0.001 decay:0.2 sustain:0 hcutoff:2821.398875337315 cutoff:4000 ]", "[ 67/8 ⇜ (26/3 → 35/4) | note:F#5 s:sawtooth gain:0.21713481397646955 attack:0.001 decay:0.2 sustain:0 hcutoff:2948.256412446248 cutoff:4000 ]", "[ 67/8 ⇜ (26/3 → 35/4) | note:A4 s:sawtooth gain:0.21713481397646955 attack:0.001 decay:0.2 sustain:0 hcutoff:2948.256412446248 cutoff:4000 ]", - "[ 35/4 → 71/8 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2982.856914513109 ]", - "[ 35/4 → 71/8 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2982.856914513109 ]", + "[ 35/4 → 71/8 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2982.856914513109 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 35/4 → 71/8 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2982.856914513109 lpattack:0.1 lpenv:2 ftype:24db ]", "[ 35/4 → 9/1 | note:F#5 s:sawtooth gain:0.19946652199116702 attack:0.001 decay:0.2 sustain:0 hcutoff:2789.9616382401937 cutoff:4000 ]", "[ 35/4 → 9/1 | note:A4 s:sawtooth gain:0.19946652199116702 attack:0.001 decay:0.2 sustain:0 hcutoff:2789.9616382401937 cutoff:4000 ]", "[ 35/4 → 9/1 | s:hh3 gain:0.7 ]", @@ -8294,8 +8294,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (35/4 → 9/1) ⇝ 73/8 | note:E5 s:sawtooth gain:0.1960157445197518 attack:0.001 decay:0.2 sustain:0 hcutoff:2758.6460625610725 cutoff:4000 ]", "[ 17/2 ⇜ (53/6 → 71/8) | note:A5 s:sawtooth gain:0.2099930863787653 attack:0.001 decay:0.2 sustain:0 hcutoff:2884.6167674275184 cutoff:4000 ]", "[ 17/2 ⇜ (53/6 → 71/8) | note:C#5 s:sawtooth gain:0.2099930863787653 attack:0.001 decay:0.2 sustain:0 hcutoff:2884.6167674275184 cutoff:4000 ]", - "[ 71/8 → 9/1 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2977.1924080321423 ]", - "[ 71/8 → 9/1 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2977.1924080321423 ]", + "[ 71/8 → 9/1 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2977.1924080321423 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 71/8 → 9/1 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2977.1924080321423 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (71/8 → 9/1) ⇝ 37/4 | note:A5 s:sawtooth gain:0.18921380289925155 attack:0.001 decay:0.2 sustain:0 hcutoff:2696.4013367420957 cutoff:4000 ]", "[ (71/8 → 9/1) ⇝ 37/4 | note:C#5 s:sawtooth gain:0.18921380289925155 attack:0.001 decay:0.2 sustain:0 hcutoff:2696.4013367420957 cutoff:4000 ]", "[ 69/8 ⇜ (107/12 → 9/1) | note:F#5 s:sawtooth gain:0.20294773894016632 attack:0.001 decay:0.2 sustain:0 hcutoff:2821.398875337315 cutoff:4000 ]", @@ -8311,8 +8311,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (9/1 → 28/3) ⇝ 75/8 | note:E5 s:sawtooth gain:0.182558300551809 attack:0.001 decay:0.2 sustain:0 hcutoff:2634.707357306267 cutoff:4000 ]", "[ 35/4 ⇜ (109/12 → 73/8) | note:A5 s:sawtooth gain:0.1960157445197518 attack:0.001 decay:0.2 sustain:0 hcutoff:2758.6460625610725 cutoff:4000 ]", "[ 35/4 ⇜ (109/12 → 73/8) | note:C#5 s:sawtooth gain:0.1960157445197518 attack:0.001 decay:0.2 sustain:0 hcutoff:2758.6460625610725 cutoff:4000 ]", - "[ 73/8 → 37/4 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2963.4689354775064 ]", - "[ 73/8 → 37/4 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2963.4689354775064 ]", + "[ 73/8 → 37/4 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2963.4689354775064 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 73/8 → 37/4 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2963.4689354775064 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (73/8 → 113/12) ⇝ 19/2 | note:A5 s:sawtooth gain:0.17606527116553244 attack:0.001 decay:0.2 sustain:0 hcutoff:2573.60640622541 cutoff:4000 ]", "[ (73/8 → 113/12) ⇝ 19/2 | note:C#5 s:sawtooth gain:0.17606527116553244 attack:0.001 decay:0.2 sustain:0 hcutoff:2573.60640622541 cutoff:4000 ]", "[ 71/8 ⇜ (55/6 → 37/4) | note:F#5 s:sawtooth gain:0.18921380289925155 attack:0.001 decay:0.2 sustain:0 hcutoff:2696.4013367420957 cutoff:4000 ]", @@ -8324,14 +8324,14 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (37/4 → 115/12) ⇝ 77/8 | note:E5 s:sawtooth gain:0.16975035701693547 attack:0.001 decay:0.2 sustain:0 hcutoff:2513.140359039332 cutoff:4000 ]", "[ 9/1 ⇜ (28/3 → 75/8) | note:A5 s:sawtooth gain:0.182558300551809 attack:0.001 decay:0.2 sustain:0 hcutoff:2634.707357306267 cutoff:4000 ]", "[ 9/1 ⇜ (28/3 → 75/8) | note:C#5 s:sawtooth gain:0.182558300551809 attack:0.001 decay:0.2 sustain:0 hcutoff:2634.707357306267 cutoff:4000 ]", - "[ 75/8 → 19/2 | note:D2 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2946.5812012110136 ]", - "[ 75/8 → 19/2 | note:D2 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2946.5812012110136 ]", + "[ 75/8 → 19/2 | note:D2 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2946.5812012110136 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 75/8 → 19/2 | note:D2 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2946.5812012110136 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (75/8 → 29/3) ⇝ 39/4 | note:A5 s:sawtooth gain:0.16362877128732323 attack:0.001 decay:0.2 sustain:0 hcutoff:2453.350656156431 cutoff:4000 ]", "[ (75/8 → 29/3) ⇝ 39/4 | note:C#5 s:sawtooth gain:0.16362877128732323 attack:0.001 decay:0.2 sustain:0 hcutoff:2453.350656156431 cutoff:4000 ]", "[ 73/8 ⇜ (113/12 → 19/2) | note:F#5 s:sawtooth gain:0.17606527116553244 attack:0.001 decay:0.2 sustain:0 hcutoff:2573.60640622541 cutoff:4000 ]", "[ 73/8 ⇜ (113/12 → 19/2) | note:A4 s:sawtooth gain:0.17606527116553244 attack:0.001 decay:0.2 sustain:0 hcutoff:2573.60640622541 cutoff:4000 ]", - "[ 19/2 → 77/8 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2936.9631544781614 ]", - "[ 19/2 → 77/8 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2936.9631544781614 ]", + "[ 19/2 → 77/8 | note:D1 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2936.9631544781614 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 19/2 → 77/8 | note:D1 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2936.9631544781614 lpattack:0.1 lpenv:2 ftype:24db ]", "[ 19/2 → 39/4 | note:F#5 s:sawtooth gain:0.16064510432613502 attack:0.001 decay:0.2 sustain:0 hcutoff:2423.7222579792624 cutoff:4000 ]", "[ 19/2 → 39/4 | note:A4 s:sawtooth gain:0.16064510432613502 attack:0.001 decay:0.2 sustain:0 hcutoff:2423.7222579792624 cutoff:4000 ]", "[ 19/2 → 39/4 | s:bd gain:0.7 ]", @@ -8348,8 +8348,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (77/8 → 10/1) ⇝ 81/8 | note:A3 s:square gain:0.7 attack:0.01 decay:0.1 sustain:0 cutoff:2915.4076660819765 ]", "[ 75/8 ⇜ (29/3 → 39/4) | note:F#5 s:sawtooth gain:0.16362877128732323 attack:0.001 decay:0.2 sustain:0 hcutoff:2453.350656156431 cutoff:4000 ]", "[ 75/8 ⇜ (29/3 → 39/4) | note:A4 s:sawtooth gain:0.16362877128732323 attack:0.001 decay:0.2 sustain:0 hcutoff:2453.350656156431 cutoff:4000 ]", - "[ 39/4 → 79/8 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2915.4076660819765 ]", - "[ 39/4 → 79/8 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2915.4076660819765 ]", + "[ 39/4 → 79/8 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2915.4076660819765 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 39/4 → 79/8 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2915.4076660819765 lpattack:0.1 lpenv:2 ftype:24db ]", "[ 39/4 → 10/1 | note:F#5 s:sawtooth gain:0.14926615677294724 attack:0.001 decay:0.2 sustain:0 hcutoff:2307.1030993509794 cutoff:4000 ]", "[ 39/4 → 10/1 | note:A4 s:sawtooth gain:0.14926615677294724 attack:0.001 decay:0.2 sustain:0 hcutoff:2307.1030993509794 cutoff:4000 ]", "[ 39/4 → 10/1 | s:hh3 gain:0.7 ]", @@ -8359,8 +8359,8 @@ exports[`renders tunes > tune: hyperpop 1`] = ` "[ (39/4 → 10/1) ⇝ 41/4 | note:A3 s:square gain:0.7 attack:0.01 decay:0.1 sustain:0 cutoff:2909.5402784268977 ]", "[ 19/2 ⇜ (59/6 → 79/8) | note:A5 s:sawtooth gain:0.157715261412906 attack:0.001 decay:0.2 sustain:0 hcutoff:2394.2782744524975 cutoff:4000 ]", "[ 19/2 ⇜ (59/6 → 79/8) | note:C#5 s:sawtooth gain:0.157715261412906 attack:0.001 decay:0.2 sustain:0 hcutoff:2394.2782744524975 cutoff:4000 ]", - "[ 79/8 → 10/1 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2903.483208638841 ]", - "[ 79/8 → 10/1 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2903.483208638841 ]", + "[ 79/8 → 10/1 | note:D3 s:sawtooth gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2903.483208638841 lpattack:0.1 lpenv:2 ftype:24db ]", + "[ 79/8 → 10/1 | note:D3 s:square gain:0.3 attack:0.01 decay:0.1 sustain:0.5 cutoff:2903.483208638841 lpattack:0.1 lpenv:2 ftype:24db ]", "[ (79/8 → 10/1) ⇝ 41/4 | note:A5 s:sawtooth gain:0.14656891828944 attack:0.001 decay:0.2 sustain:0 hcutoff:2278.446896257612 cutoff:4000 ]", "[ (79/8 → 10/1) ⇝ 41/4 | note:C#5 s:sawtooth gain:0.14656891828944 attack:0.001 decay:0.2 sustain:0 hcutoff:2278.446896257612 cutoff:4000 ]", "[ (79/8 → 10/1) ⇝ 83/8 | note:F#3 s:square gain:0.7 attack:0.01 decay:0.1 sustain:0 cutoff:2903.483208638841 ]", From e3b7d0f84df946d868cf0cfa8694aa2341f50beb Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sat, 16 Sep 2023 02:01:46 +0200 Subject: [PATCH 56/80] drop some acid in there --- website/src/pages/learn/effects.mdx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/website/src/pages/learn/effects.mdx b/website/src/pages/learn/effects.mdx index 4982f4cd..f77ab4c4 100644 --- a/website/src/pages/learn/effects.mdx +++ b/website/src/pages/learn/effects.mdx @@ -86,6 +86,25 @@ Strudel uses ADSR envelopes, which are probably the most common way to describe Each filter can receive an additional filter envelope controlling the cutoff value dynamically. It uses an ADSR envelope similar to the one used for amplitude. There is an additional parameter to control the depth of the filter modulation: `lpenv`|`hpenv`|`bpenv`. This allows you to play subtle or huge filter modulations just the same by only increasing or decreasing the depth. +](3,8,<0 1>)".sub(12)) + .s("/64") + .lpf(sine.range(500,3000).slow(16)) + .lpa(0.005) + .lpd(perlin.range(.02,.2)) + .lps(perlin.range(0,.5).slow(3)) + .lpq(sine.range(2,10).slow(32)) + .release(.5) + .lpenv(perlin.range(1,8).slow(2)) + .ftype('24db') + .room(1) + .juxBy(.5,rev) + .sometimes(add(note(12))) + .stack(s("bd*2").bank('RolandTR909')) + .gain(.5)`} +/> + There is one filter envelope for each filter type and thus one set of envelope filter parameters preceded either by `lp`, `hp` or `bp`: - `lpattack`, `lpdecay`, `lpsustain`, `lprelease`, `lpenv`: filter envelope for the lowpass filter. From 7ec5ab0c20e93d56571e2b38954438d363b6908f Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sat, 16 Sep 2023 02:05:49 +0200 Subject: [PATCH 57/80] fix: tune --- website/src/repl/tunes.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/src/repl/tunes.mjs b/website/src/repl/tunes.mjs index 2ab546b7..e33482cf 100644 --- a/website/src/repl/tunes.mjs +++ b/website/src/repl/tunes.mjs @@ -580,8 +580,8 @@ chord("*2").dict('lefthand').anchor("G4").voicing() .s("gm_epiano1:1") .color('steelblue') .stack( - n("<-7 ~@2 [~@2 -7] -9 ~@2 [~@2 -9] -10!2 ~ [~@2 -10] -5 ~ [-3 -2 -10]@2>*2") - .scale('C3 major') + "<-7 ~@2 [~@2 -7] -9 ~@2 [~@2 -9] -10!2 ~ [~@2 -10] -5 ~ [-3 -2 -10]@2>*2" + .scale('C3 major').note() .s('sawtooth').color('brown') ) .attack(0.05).decay(.1).sustain(.7) From a82eeb44c030097337e0fa85531515593565b7d3 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sat, 16 Sep 2023 02:08:25 +0200 Subject: [PATCH 58/80] update snapshot --- test/__snapshots__/tunes.test.mjs.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/__snapshots__/tunes.test.mjs.snap b/test/__snapshots__/tunes.test.mjs.snap index 484c1380..aca92b55 100644 --- a/test/__snapshots__/tunes.test.mjs.snap +++ b/test/__snapshots__/tunes.test.mjs.snap @@ -8484,7 +8484,7 @@ exports[`renders tunes > tune: orbit 1`] = ` exports[`renders tunes > tune: outroMusic 1`] = ` [ "[ 0/1 → 1/2 | s:hh speed:0.9036881079621337 n:3 ]", - "[ 0/1 → 3/4 | n:-7 note:C2 s:sawtooth attack:0.05 decay:0.1 sustain:0.7 cutoff:864.536878321087 gain:0.3 ]", + "[ 0/1 → 3/4 | note:C2 s:sawtooth attack:0.05 decay:0.1 sustain:0.7 cutoff:864.536878321087 gain:0.3 ]", "[ 0/1 → 3/4 | s:bd speed:0.9107561463868479 n:3 ]", "[ (0/1 → 1/1) ⇝ 3/1 | note:B3 s:gm_epiano1 n:1 attack:0.05 decay:0.1 sustain:0.7 cutoff:1111.7252990603447 gain:0.3 ]", "[ (0/1 → 1/1) ⇝ 3/1 | note:D4 s:gm_epiano1 n:1 attack:0.05 decay:0.1 sustain:0.7 cutoff:1111.7252990603447 gain:0.3 ]", From 4fecad16e4db7d72379ff647d248b5d2b5c529ab Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sat, 16 Sep 2023 02:21:10 +0200 Subject: [PATCH 59/80] superdough 0.9.7 --- packages/superdough/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/superdough/package.json b/packages/superdough/package.json index bab58658..22b58cc5 100644 --- a/packages/superdough/package.json +++ b/packages/superdough/package.json @@ -1,6 +1,6 @@ { "name": "superdough", - "version": "0.9.6", + "version": "0.9.7", "description": "simple web audio synth and sampler intended for live coding. inspired by superdirt and webdirt.", "main": "index.mjs", "type": "module", From 2deafe214a6c060decdeee0e36830b2f3e8972b5 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 17 Sep 2023 07:59:55 +0200 Subject: [PATCH 60/80] update loop examples --- packages/core/controls.mjs | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index b54170c1..0c166e11 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -299,13 +299,14 @@ const generic_params = [ */ ['end'], /** - * Loops the sample (from `begin` to `end`) the specified number of times. + * Loops the sample. * Note that the tempo of the loop is not synced with the cycle tempo. + * To change the loop region, use loopBegin / loopEnd. * * @name loop - * @param {number | Pattern} times How often the sample is looped + * @param {number | Pattern} on If 1, the sample is looped * @example - * s("bd").loop("<1 2 3 4>").osc() + * s("casio").loop(1) * */ ['loop'], @@ -314,13 +315,11 @@ const generic_params = [ * Note that the loop point must be inbetween `begin` and `end`, and before `loopEnd`! * * @name loopBegin - * @param {number | Pattern} amount between 0 and 1, where 1 is the length of the sample + * @param {number | Pattern} time between 0 and 1, where 1 is the length of the sample * @synonyms loopb * @example - * s("numbers") - * .loop(1) - * .begin(0).end(1) - * .loopBegin("<0 .25 .5 .75>") + * s("space").loop(1) + * .loopBegin("<0 .125 .25>").scope() */ ['loopBegin', 'loopb'], /** @@ -329,14 +328,11 @@ const generic_params = [ * Note that the loop point must be inbetween `begin` and `end`, and after `loopBegin`! * * @name loopEnd - * @param {number | Pattern} amount between 0 and 1, where 1 is the length of the sample + * @param {number | Pattern} time between 0 and 1, where 1 is the length of the sample * @synonyms loope * @example - * s("numbers") - * .loop(1) - * .begin(0).end(1) - * .loopBegin("<0 .25 .5 .75>") - * .loopEnd("<0.1 .35 .6 .85>") + * s("space").loop(1) + * .loopEnd("<1 .75 .5 .25>").scope() */ ['loopEnd', 'loope'], /** From b98e24fabf77b8acaa1567485224f53fff6b1c8d Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 17 Sep 2023 08:02:02 +0200 Subject: [PATCH 61/80] docs: fit + splice --- packages/core/pattern.mjs | 19 +++++++++++++------ website/src/pages/learn/samples.mdx | 8 ++++++++ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/packages/core/pattern.mjs b/packages/core/pattern.mjs index 7e694f49..e3efb427 100644 --- a/packages/core/pattern.mjs +++ b/packages/core/pattern.mjs @@ -2273,14 +2273,14 @@ export const slice = register( false, // turns off auto-patternification ); -/* +/** * Works the same as slice, but changes the playback speed of each slice to match the duration of its step. * @name splice - * @memberof Pattern - * @returns Pattern * @example * await samples('github:tidalcycles/Dirt-Samples/master') - * s("breaks165").splice(8, "0 1 [2 3 0]@2 3 0@2 7").hurry(0.65) + * s("breaks165") + * .splice(8, "0 1 [2 3 0]@2 3 0@2 7") + * .hurry(0.65) */ export const splice = register( @@ -2307,9 +2307,16 @@ export const { loopAt, loopat } = register(['loopAt', 'loopat'], function (facto return _loopAt(factor, pat, 1); }); -// this function will be redefined in repl.mjs to use the correct cps value. +// the fit function will be redefined in repl.mjs to use the correct cps value. // It is still here to work in cases where repl.mjs is not used - +/** + * Makes the sample fit its event duration. Good for rhythmical loops like drum breaks. + * Similar to loopAt. + * @name fit + * @example + * samples({ rhodes: 'https://cdn.freesound.org/previews/132/132051_316502-lq.mp3' }) + * s("rhodes/4").fit() + */ export const fit = register('fit', (pat) => pat.withHap((hap) => hap.withValue((v) => ({ diff --git a/website/src/pages/learn/samples.mdx b/website/src/pages/learn/samples.mdx index b1ef1cd3..10d8c730 100644 --- a/website/src/pages/learn/samples.mdx +++ b/website/src/pages/learn/samples.mdx @@ -327,6 +327,10 @@ Sampler effects are functions that can be used to change the behaviour of sample +### fit + + + ### chop @@ -335,6 +339,10 @@ Sampler effects are functions that can be used to change the behaviour of sample +### splice + + + ### speed From 4490681fa375fb692d27043e302560bcfbd985cc Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 17 Sep 2023 08:03:09 +0200 Subject: [PATCH 62/80] add note about wt_ --- packages/core/controls.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index 0c166e11..f988f0a7 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -313,6 +313,7 @@ const generic_params = [ /** * Begin to loop at a specific point in the sample (inbetween `begin` and `end`). * Note that the loop point must be inbetween `begin` and `end`, and before `loopEnd`! + * Note: Samples starting with wt_ will automatically loop! (wt = wavetable) * * @name loopBegin * @param {number | Pattern} time between 0 and 1, where 1 is the length of the sample From 3879b01ddd55f3674d0c068478b9829f8ce918a7 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 17 Sep 2023 08:04:02 +0200 Subject: [PATCH 63/80] snapshots --- test/__snapshots__/examples.test.mjs.snap | 63 ++++++++++++++++++----- 1 file changed, 51 insertions(+), 12 deletions(-) diff --git a/test/__snapshots__/examples.test.mjs.snap b/test/__snapshots__/examples.test.mjs.snap index ad0ce7b9..48835a48 100644 --- a/test/__snapshots__/examples.test.mjs.snap +++ b/test/__snapshots__/examples.test.mjs.snap @@ -1828,6 +1828,15 @@ exports[`runs examples > example "firstOf" example index 0 1`] = ` ] `; +exports[`runs examples > example "fit" example index 0 1`] = ` +[ + "[ (0/1 → 1/1) ⇝ 4/1 | s:rhodes speed:0.25 unit:c ]", + "[ 0/1 ⇜ (1/1 → 2/1) ⇝ 4/1 | s:rhodes speed:0.25 unit:c ]", + "[ 0/1 ⇜ (2/1 → 3/1) ⇝ 4/1 | s:rhodes speed:0.25 unit:c ]", + "[ 0/1 ⇜ (3/1 → 4/1) | s:rhodes speed:0.25 unit:c ]", +] +`; + exports[`runs examples > example "floor" example index 0 1`] = ` [ "[ 0/1 → 1/4 | note:42 ]", @@ -2640,10 +2649,10 @@ exports[`runs examples > example "linger" example index 0 1`] = ` exports[`runs examples > example "loop" example index 0 1`] = ` [ - "[ 0/1 → 1/1 | s:bd loop:1 ]", - "[ 1/1 → 2/1 | s:bd loop:2 ]", - "[ 2/1 → 3/1 | s:bd loop:3 ]", - "[ 3/1 → 4/1 | s:bd loop:4 ]", + "[ 0/1 → 1/1 | s:casio loop:1 ]", + "[ 1/1 → 2/1 | s:casio loop:1 ]", + "[ 2/1 → 3/1 | s:casio loop:1 ]", + "[ 3/1 → 4/1 | s:casio loop:1 ]", ] `; @@ -2667,19 +2676,19 @@ exports[`runs examples > example "loopAtCps" example index 0 1`] = ` exports[`runs examples > example "loopBegin" example index 0 1`] = ` [ - "[ 0/1 → 1/1 | s:numbers loop:1 begin:0 end:1 loopBegin:0 ]", - "[ 1/1 → 2/1 | s:numbers loop:1 begin:0 end:1 loopBegin:0.25 ]", - "[ 2/1 → 3/1 | s:numbers loop:1 begin:0 end:1 loopBegin:0.5 ]", - "[ 3/1 → 4/1 | s:numbers loop:1 begin:0 end:1 loopBegin:0.75 ]", + "[ 0/1 → 1/1 | s:space loop:1 loopBegin:0 analyze:1 ]", + "[ 1/1 → 2/1 | s:space loop:1 loopBegin:0.125 analyze:1 ]", + "[ 2/1 → 3/1 | s:space loop:1 loopBegin:0.25 analyze:1 ]", + "[ 3/1 → 4/1 | s:space loop:1 loopBegin:0 analyze:1 ]", ] `; exports[`runs examples > example "loopEnd" example index 0 1`] = ` [ - "[ 0/1 → 1/1 | s:numbers loop:1 begin:0 end:1 loopBegin:0 loopEnd:0.1 ]", - "[ 1/1 → 2/1 | s:numbers loop:1 begin:0 end:1 loopBegin:0.25 loopEnd:0.35 ]", - "[ 2/1 → 3/1 | s:numbers loop:1 begin:0 end:1 loopBegin:0.5 loopEnd:0.6 ]", - "[ 3/1 → 4/1 | s:numbers loop:1 begin:0 end:1 loopBegin:0.75 loopEnd:0.85 ]", + "[ 0/1 → 1/1 | s:space loop:1 loopEnd:1 analyze:1 ]", + "[ 1/1 → 2/1 | s:space loop:1 loopEnd:0.75 analyze:1 ]", + "[ 2/1 → 3/1 | s:space loop:1 loopEnd:0.5 analyze:1 ]", + "[ 3/1 → 4/1 | s:space loop:1 loopEnd:0.25 analyze:1 ]", ] `; @@ -4341,6 +4350,36 @@ exports[`runs examples > example "speed" example index 1 1`] = ` ] `; +exports[`runs examples > example "splice" example index 0 1`] = ` +[ + "[ 0/1 → 5/26 | speed:0.65 unit:c begin:0 end:0.125 _slices:8 s:breaks165 ]", + "[ 5/26 → 5/13 | speed:0.65 unit:c begin:0.125 end:0.25 _slices:8 s:breaks165 ]", + "[ 5/13 → 20/39 | speed:0.9750000000000001 unit:c begin:0.25 end:0.375 _slices:8 s:breaks165 ]", + "[ 20/39 → 25/39 | speed:0.9750000000000001 unit:c begin:0.375 end:0.5 _slices:8 s:breaks165 ]", + "[ 25/39 → 10/13 | speed:0.9750000000000001 unit:c begin:0 end:0.125 _slices:8 s:breaks165 ]", + "[ 10/13 → 25/26 | speed:0.65 unit:c begin:0.375 end:0.5 _slices:8 s:breaks165 ]", + "[ (25/26 → 1/1) ⇝ 35/26 | speed:0.325 unit:c begin:0 end:0.125 _slices:8 s:breaks165 ]", + "[ 25/26 ⇜ (1/1 → 35/26) | speed:0.325 unit:c begin:0 end:0.125 _slices:8 s:breaks165 ]", + "[ 35/26 → 20/13 | speed:0.65 unit:c begin:0.875 end:1 _slices:8 s:breaks165 ]", + "[ 20/13 → 45/26 | speed:0.65 unit:c begin:0 end:0.125 _slices:8 s:breaks165 ]", + "[ 45/26 → 25/13 | speed:0.65 unit:c begin:0.125 end:0.25 _slices:8 s:breaks165 ]", + "[ (25/13 → 2/1) ⇝ 80/39 | speed:0.9750000000000001 unit:c begin:0.25 end:0.375 _slices:8 s:breaks165 ]", + "[ 25/13 ⇜ (2/1 → 80/39) | speed:0.9750000000000001 unit:c begin:0.25 end:0.375 _slices:8 s:breaks165 ]", + "[ 80/39 → 85/39 | speed:0.9750000000000001 unit:c begin:0.375 end:0.5 _slices:8 s:breaks165 ]", + "[ 85/39 → 30/13 | speed:0.9750000000000001 unit:c begin:0 end:0.125 _slices:8 s:breaks165 ]", + "[ 30/13 → 5/2 | speed:0.65 unit:c begin:0.375 end:0.5 _slices:8 s:breaks165 ]", + "[ 5/2 → 75/26 | speed:0.325 unit:c begin:0 end:0.125 _slices:8 s:breaks165 ]", + "[ (75/26 → 3/1) ⇝ 40/13 | speed:0.65 unit:c begin:0.875 end:1 _slices:8 s:breaks165 ]", + "[ 75/26 ⇜ (3/1 → 40/13) | speed:0.65 unit:c begin:0.875 end:1 _slices:8 s:breaks165 ]", + "[ 40/13 → 85/26 | speed:0.65 unit:c begin:0 end:0.125 _slices:8 s:breaks165 ]", + "[ 85/26 → 45/13 | speed:0.65 unit:c begin:0.125 end:0.25 _slices:8 s:breaks165 ]", + "[ 45/13 → 140/39 | speed:0.9750000000000001 unit:c begin:0.25 end:0.375 _slices:8 s:breaks165 ]", + "[ 140/39 → 145/39 | speed:0.9750000000000001 unit:c begin:0.375 end:0.5 _slices:8 s:breaks165 ]", + "[ 145/39 → 50/13 | speed:0.9750000000000001 unit:c begin:0 end:0.125 _slices:8 s:breaks165 ]", + "[ (50/13 → 4/1) ⇝ 105/26 | speed:0.65 unit:c begin:0.375 end:0.5 _slices:8 s:breaks165 ]", +] +`; + exports[`runs examples > example "square" example index 0 1`] = ` [ "[ 0/1 → 1/2 | note:C3 ]", From 5c5df748600891860811bac1805bb0edbacf22e8 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 17 Sep 2023 10:15:02 +0200 Subject: [PATCH 64/80] fix: control naming --- packages/core/controls.mjs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index 69c43bfa..57ed4b91 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -649,7 +649,7 @@ const generic_params = [ * @example * sound("triangle").freq(300).vib("<1 2 4 8 16>") */ - [['vibrato'], 'vib'], + ['vib', 'vibrato'], /** * Sets the vibrato depth as a multiple of base frequency (not vibrato speed!). * @@ -658,10 +658,8 @@ const generic_params = [ * @example * sound("triangle").freq(300).vib("<8 16>").vibmod("<0.25 0.5 0.75 1 2 4>") */ - [['vibmod'], 'vibmod'], - [['hcutoff', 'hresonance'], 'hpf', 'hp'], - ['vib'], ['vibmod'], + [['hcutoff', 'hresonance'], 'hpf', 'hp'], /** * Controls the **h**igh-**p**ass **q**-value. * @@ -933,8 +931,6 @@ const generic_params = [ ['rate'], // TODO: slide param for certain synths ['slide'], - - ['slidespeed'], // TODO: detune? https://tidalcycles.org/docs/patternlib/tutorials/synthesizers/#supersquare ['semitone'], // TODO: dedup with synth param, see https://tidalcycles.org/docs/reference/synthesizers/#superpiano From c354ee32e3d391f53c4819f8f4373e1b200c8793 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 17 Sep 2023 10:15:33 +0200 Subject: [PATCH 65/80] simplify vibrato logic --- packages/superdough/synth.mjs | 39 ++++++++++++++--------------------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/packages/superdough/synth.mjs b/packages/superdough/synth.mjs index 8a240340..2e2b7cb2 100644 --- a/packages/superdough/synth.mjs +++ b/packages/superdough/synth.mjs @@ -147,12 +147,6 @@ export function waveformN(partials, type) { } export function getOscillator({ s, freq, t, vib, vibmod, partials }) { - // Additional oscillator for vibrato effect - if (vib > 0) { - var vibrato_oscillator = getAudioContext().createOscillator(); - vibrato_oscillator.frequency.value = vib; - } - // Make oscillator with partial count let o; if (!partials || s === 'sine') { @@ -161,28 +155,27 @@ export function getOscillator({ s, freq, t, vib, vibmod, partials }) { } else { o = waveformN(partials, s); } + o.frequency.value = Number(freq); + o.start(t); + // Additional oscillator for vibrato effect + let vibrato_oscillator; if (vib > 0) { - o.frequency.value = Number(freq); - var gain = getAudioContext().createGain(); + vibrato_oscillator = getAudioContext().createOscillator(); + vibrato_oscillator.frequency.value = vib; + const gain = getAudioContext().createGain(); // Vibmod is the amount of vibrato, in semitones - gain.gain.value = vibmod * freq; + gain.gain.value = vibmod * 100; vibrato_oscillator.connect(gain); gain.connect(o.detune); vibrato_oscillator.start(t); - o.start(t); - return { - node: o, - stop: (time) => { - vibrato_oscillator.stop(time); - o.stop(time); - }, - }; - } else { - // Normal operation, without vibrato - o.frequency.value = Number(freq); - o.start(t); - const stop = (time) => o.stop(time); - return { node: o, stop }; } + + return { + node: o, + stop: (time) => { + vibrato_oscillator?.stop(time); + o.stop(time); + }, + }; } From cd6d1fb2d21f05d70605d3af5db1c6bfc8ae67d5 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 17 Sep 2023 10:41:02 +0200 Subject: [PATCH 66/80] fix: headings --- website/src/pages/learn/synths.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/src/pages/learn/synths.mdx b/website/src/pages/learn/synths.mdx index a9cf094c..9f21204f 100644 --- a/website/src/pages/learn/synths.mdx +++ b/website/src/pages/learn/synths.mdx @@ -48,13 +48,13 @@ You can also set `n` directly in mini notation with `sound`: Note for tidal users: `n` in tidal is synonymous to `note` for synths only. In strudel, this is not the case, where `n` will always change timbre, be it though different samples or different waveforms. -### Vibrato +## Vibrato -#### vib +### vib -#### vibmod +### vibmod From c2560e0cf8b521443a12c846e0e39c3d72fb9b5b Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 17 Sep 2023 10:41:13 +0200 Subject: [PATCH 67/80] set vib default to .5 --- packages/superdough/synth.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/superdough/synth.mjs b/packages/superdough/synth.mjs index 2e2b7cb2..5ca62105 100644 --- a/packages/superdough/synth.mjs +++ b/packages/superdough/synth.mjs @@ -41,7 +41,7 @@ export function registerSynthSounds() { fmvelocity: fmVelocity, fmwave: fmWaveform = 'sine', vib = 0, - vibmod = 1, + vibmod = .5, } = value; let { n, note, freq } = value; // with synths, n and note are the same thing From f052adb93a7ded3c3161031b6779842bb5d3988a Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 17 Sep 2023 10:41:22 +0200 Subject: [PATCH 68/80] simplify examples --- packages/core/controls.mjs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index 57ed4b91..072dc83f 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -644,21 +644,24 @@ const generic_params = [ * Applies a vibrato to the frequency of the oscillator. * * @name vib + * @synonyms vibrato, v * @param {number | Pattern} frequency of the vibrato in hertz - * @synonyms vibrato * @example - * sound("triangle").freq(300).vib("<1 2 4 8 16>") + * note("a") + * .vib("<.5 1 2 4 8 16>") */ - ['vib', 'vibrato'], + [['vib', 'vibmod'], 'vibrato', 'v'], /** - * Sets the vibrato depth as a multiple of base frequency (not vibrato speed!). + * Sets the vibrato depth in semitones. * * @name vibmod - * @param {number | Pattern} depth of vibrato (multiple of base frequency) + * @synonyms vmod + * @param {number | Pattern} depth of vibrato (in semitones) * @example - * sound("triangle").freq(300).vib("<8 16>").vibmod("<0.25 0.5 0.75 1 2 4>") + * note("a").vib(4) + * .vibmod("<.25 .5 1 2 12>") */ - ['vibmod'], + [['vibmod', 'vib'], 'vmod'], [['hcutoff', 'hresonance'], 'hpf', 'hp'], /** * Controls the **h**igh-**p**ass **q**-value. From a97384cec1ec3a0a92637a509ea89ac9edf07dfc Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 17 Sep 2023 10:42:21 +0200 Subject: [PATCH 69/80] format --- packages/superdough/synth.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/superdough/synth.mjs b/packages/superdough/synth.mjs index 5ca62105..633d0113 100644 --- a/packages/superdough/synth.mjs +++ b/packages/superdough/synth.mjs @@ -41,7 +41,7 @@ export function registerSynthSounds() { fmvelocity: fmVelocity, fmwave: fmWaveform = 'sine', vib = 0, - vibmod = .5, + vibmod = 0.5, } = value; let { n, note, freq } = value; // with synths, n and note are the same thing From c6a74c040e258db1dd2684e48384422285fefd57 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 17 Sep 2023 10:42:51 +0200 Subject: [PATCH 70/80] snapshot --- test/__snapshots__/examples.test.mjs.snap | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/__snapshots__/examples.test.mjs.snap b/test/__snapshots__/examples.test.mjs.snap index d146a065..858e30e7 100644 --- a/test/__snapshots__/examples.test.mjs.snap +++ b/test/__snapshots__/examples.test.mjs.snap @@ -4760,19 +4760,19 @@ exports[`runs examples > example "velocity" example index 0 1`] = ` exports[`runs examples > example "vib" example index 0 1`] = ` [ - "[ 0/1 → 1/1 | s:triangle freq:300 vib:1 ]", - "[ 1/1 → 2/1 | s:triangle freq:300 vib:2 ]", - "[ 2/1 → 3/1 | s:triangle freq:300 vib:4 ]", - "[ 3/1 → 4/1 | s:triangle freq:300 vib:8 ]", + "[ 0/1 → 1/1 | note:a vib:0.5 ]", + "[ 1/1 → 2/1 | note:a vib:1 ]", + "[ 2/1 → 3/1 | note:a vib:2 ]", + "[ 3/1 → 4/1 | note:a vib:4 ]", ] `; exports[`runs examples > example "vibmod" example index 0 1`] = ` [ - "[ 0/1 → 1/1 | s:triangle freq:300 vib:8 vibmod:0.25 ]", - "[ 1/1 → 2/1 | s:triangle freq:300 vib:16 vibmod:0.5 ]", - "[ 2/1 → 3/1 | s:triangle freq:300 vib:8 vibmod:0.75 ]", - "[ 3/1 → 4/1 | s:triangle freq:300 vib:16 vibmod:1 ]", + "[ 0/1 → 1/1 | note:a vib:4 vibmod:0.25 ]", + "[ 1/1 → 2/1 | note:a vib:4 vibmod:0.5 ]", + "[ 2/1 → 3/1 | note:a vib:4 vibmod:1 ]", + "[ 3/1 → 4/1 | note:a vib:4 vibmod:2 ]", ] `; From 32fee6313b4f1ac41eb4b00c58f3d998e1666eb8 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 17 Sep 2023 10:44:15 +0200 Subject: [PATCH 71/80] move stuff back --- packages/core/controls.mjs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index 072dc83f..edbb77d4 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -1140,13 +1140,10 @@ const generic_params = [ // ZZFX ['zrand'], ['curve'], - ['pitchJump'], - ['pitchJumpTime'], ['slide'], // superdirt duplicate ['deltaSlide'], - /** - * - */ + ['pitchJump'], + ['pitchJumpTime'], ['lfo', 'repeatTime'], ['noise'], ['zmod'], From 0e7c9a4001c3acf50c5f56f0c5555d95668fbbce Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 17 Sep 2023 11:01:12 +0200 Subject: [PATCH 72/80] add vib examples for : notation --- packages/core/controls.mjs | 10 +++++++++- test/__snapshots__/examples.test.mjs.snap | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/packages/core/controls.mjs b/packages/core/controls.mjs index edbb77d4..6cac6e54 100644 --- a/packages/core/controls.mjs +++ b/packages/core/controls.mjs @@ -649,10 +649,14 @@ const generic_params = [ * @example * note("a") * .vib("<.5 1 2 4 8 16>") + * @example + * // change the modulation depth with ":" + * note("a") + * .vib("<.5 1 2 4 8 16>:12") */ [['vib', 'vibmod'], 'vibrato', 'v'], /** - * Sets the vibrato depth in semitones. + * Sets the vibrato depth in semitones. Only has an effect if `vibrato` | `vib` | `v` is is also set * * @name vibmod * @synonyms vmod @@ -660,6 +664,10 @@ const generic_params = [ * @example * note("a").vib(4) * .vibmod("<.25 .5 1 2 12>") + * @example + * // change the vibrato frequency with ":" + * note("a") + * .vibmod("<.25 .5 1 2 12>:8") */ [['vibmod', 'vib'], 'vmod'], [['hcutoff', 'hresonance'], 'hpf', 'hp'], diff --git a/test/__snapshots__/examples.test.mjs.snap b/test/__snapshots__/examples.test.mjs.snap index 858e30e7..e026f9c4 100644 --- a/test/__snapshots__/examples.test.mjs.snap +++ b/test/__snapshots__/examples.test.mjs.snap @@ -4767,6 +4767,15 @@ exports[`runs examples > example "vib" example index 0 1`] = ` ] `; +exports[`runs examples > example "vib" example index 1 1`] = ` +[ + "[ 0/1 → 1/1 | note:a vib:0.5 vibmod:12 ]", + "[ 1/1 → 2/1 | note:a vib:1 vibmod:12 ]", + "[ 2/1 → 3/1 | note:a vib:2 vibmod:12 ]", + "[ 3/1 → 4/1 | note:a vib:4 vibmod:12 ]", +] +`; + exports[`runs examples > example "vibmod" example index 0 1`] = ` [ "[ 0/1 → 1/1 | note:a vib:4 vibmod:0.25 ]", @@ -4776,6 +4785,15 @@ exports[`runs examples > example "vibmod" example index 0 1`] = ` ] `; +exports[`runs examples > example "vibmod" example index 1 1`] = ` +[ + "[ 0/1 → 1/1 | note:a vibmod:0.25 vib:8 ]", + "[ 1/1 → 2/1 | note:a vibmod:0.5 vib:8 ]", + "[ 2/1 → 3/1 | note:a vibmod:1 vib:8 ]", + "[ 3/1 → 4/1 | note:a vibmod:2 vib:8 ]", +] +`; + exports[`runs examples > example "voicing" example index 0 1`] = ` [ "[ 0/1 → 1/1 | note:E4 ]", From 578bede46b4310d5b5e49b7a88b895b38062c102 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 17 Sep 2023 11:17:37 +0200 Subject: [PATCH 73/80] fix: tune n -> note --- website/src/repl/tunes.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/repl/tunes.mjs b/website/src/repl/tunes.mjs index e33482cf..fdfc47d8 100644 --- a/website/src/repl/tunes.mjs +++ b/website/src/repl/tunes.mjs @@ -432,7 +432,7 @@ export const waa2 = `// "Waa2" // @license CC BY-NC-SA 4.0 https://creativecommons.org/licenses/by-nc-sa/4.0/ // @by Felix Roos -n( +note( "a4 [a3 c3] a3 c3" .sub("<7 12 5 12>".slow(2)) .off(1/4,x=>x.add(7)) From 4fb364195cf43021e26810ab6061cdd1b358181b Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 17 Sep 2023 11:18:20 +0200 Subject: [PATCH 74/80] snapshot --- test/__snapshots__/tunes.test.mjs.snap | 32 +++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/test/__snapshots__/tunes.test.mjs.snap b/test/__snapshots__/tunes.test.mjs.snap index aca92b55..4485f4ca 100644 --- a/test/__snapshots__/tunes.test.mjs.snap +++ b/test/__snapshots__/tunes.test.mjs.snap @@ -10180,22 +10180,22 @@ exports[`renders tunes > tune: undergroundPlumber 1`] = ` exports[`renders tunes > tune: waa2 1`] = ` [ - "[ -1/4 ⇜ (0/1 → 1/4) | n:48 clip:1.1738393178344886 s:sawtooth cutoff:3997.892048359052 gain:0.5 room:0.5 ]", - "[ -1/4 ⇜ (0/1 → 1/4) | n:64 clip:1.1738393178344886 s:sawtooth cutoff:3997.892048359052 gain:0.5 room:0.5 ]", - "[ (0/1 → 1/4) ⇝ 1/2 | n:62 clip:1.197659880151613 s:sawtooth cutoff:3991.5732716763446 gain:0.5 room:0.5 ]", - "[ (0/1 → 1/4) ⇝ 1/2 | n:43 clip:1.197659880151613 s:sawtooth cutoff:3991.5732716763446 gain:0.5 room:0.5 ]", - "[ 0/1 ⇜ (1/4 → 1/2) | n:62 clip:1.197659880151613 s:square cutoff:3991.5732716763446 gain:0.5 room:0.5 ]", - "[ 0/1 ⇜ (1/4 → 1/2) | n:43 clip:1.197659880151613 s:square cutoff:3991.5732716763446 gain:0.5 room:0.5 ]", - "[ (1/4 → 1/2) ⇝ 3/4 | n:74 clip:1.2451698046878117 s:square cutoff:3966.3742407056534 gain:0.5 room:0.5 ]", - "[ (1/4 → 1/2) ⇝ 3/4 | n:55 clip:1.2451698046878117 s:square cutoff:3966.3742407056534 gain:0.5 room:0.5 ]", - "[ 1/4 ⇜ (1/2 → 3/4) | n:74 clip:1.2451698046878117 s:sawtooth cutoff:3966.3742407056534 gain:0.5 room:0.5 ]", - "[ 1/4 ⇜ (1/2 → 3/4) | n:55 clip:1.2451698046878117 s:sawtooth cutoff:3966.3742407056534 gain:0.5 room:0.5 ]", - "[ 1/2 → 3/4 | n:50 clip:1.2688217886051745 s:sawtooth cutoff:3947.554693090452 gain:0.5 room:0.5 ]", - "[ (1/2 → 3/4) ⇝ 1/1 | n:69 clip:1.292380289809026 s:sawtooth cutoff:3924.645587531366 gain:0.5 room:0.5 ]", - "[ 1/2 ⇜ (3/4 → 1/1) | n:69 clip:1.292380289809026 s:square cutoff:3924.645587531366 gain:0.5 room:0.5 ]", - "[ 3/4 → 1/1 | n:41 clip:1.315826773713709 s:square cutoff:3897.7021140702864 gain:0.5 room:0.5 ]", - "[ 3/4 → 1/1 | n:62 clip:1.315826773713709 s:square cutoff:3897.7021140702864 gain:0.5 room:0.5 ]", - "[ (3/4 → 1/1) ⇝ 5/4 | n:81 clip:1.315826773713709 s:square cutoff:3897.7021140702864 gain:0.5 room:0.5 ]", + "[ -1/4 ⇜ (0/1 → 1/4) | note:48 clip:1.1738393178344886 s:sawtooth cutoff:3997.892048359052 gain:0.5 room:0.5 ]", + "[ -1/4 ⇜ (0/1 → 1/4) | note:64 clip:1.1738393178344886 s:sawtooth cutoff:3997.892048359052 gain:0.5 room:0.5 ]", + "[ (0/1 → 1/4) ⇝ 1/2 | note:62 clip:1.197659880151613 s:sawtooth cutoff:3991.5732716763446 gain:0.5 room:0.5 ]", + "[ (0/1 → 1/4) ⇝ 1/2 | note:43 clip:1.197659880151613 s:sawtooth cutoff:3991.5732716763446 gain:0.5 room:0.5 ]", + "[ 0/1 ⇜ (1/4 → 1/2) | note:62 clip:1.197659880151613 s:square cutoff:3991.5732716763446 gain:0.5 room:0.5 ]", + "[ 0/1 ⇜ (1/4 → 1/2) | note:43 clip:1.197659880151613 s:square cutoff:3991.5732716763446 gain:0.5 room:0.5 ]", + "[ (1/4 → 1/2) ⇝ 3/4 | note:74 clip:1.2451698046878117 s:square cutoff:3966.3742407056534 gain:0.5 room:0.5 ]", + "[ (1/4 → 1/2) ⇝ 3/4 | note:55 clip:1.2451698046878117 s:square cutoff:3966.3742407056534 gain:0.5 room:0.5 ]", + "[ 1/4 ⇜ (1/2 → 3/4) | note:74 clip:1.2451698046878117 s:sawtooth cutoff:3966.3742407056534 gain:0.5 room:0.5 ]", + "[ 1/4 ⇜ (1/2 → 3/4) | note:55 clip:1.2451698046878117 s:sawtooth cutoff:3966.3742407056534 gain:0.5 room:0.5 ]", + "[ 1/2 → 3/4 | note:50 clip:1.2688217886051745 s:sawtooth cutoff:3947.554693090452 gain:0.5 room:0.5 ]", + "[ (1/2 → 3/4) ⇝ 1/1 | note:69 clip:1.292380289809026 s:sawtooth cutoff:3924.645587531366 gain:0.5 room:0.5 ]", + "[ 1/2 ⇜ (3/4 → 1/1) | note:69 clip:1.292380289809026 s:square cutoff:3924.645587531366 gain:0.5 room:0.5 ]", + "[ 3/4 → 1/1 | note:41 clip:1.315826773713709 s:square cutoff:3897.7021140702864 gain:0.5 room:0.5 ]", + "[ 3/4 → 1/1 | note:62 clip:1.315826773713709 s:square cutoff:3897.7021140702864 gain:0.5 room:0.5 ]", + "[ (3/4 → 1/1) ⇝ 5/4 | note:81 clip:1.315826773713709 s:square cutoff:3897.7021140702864 gain:0.5 room:0.5 ]", ] `; From b7ef2d97e23651a7cc9fd99993fc8db1e0bba05c Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 17 Sep 2023 11:50:18 +0200 Subject: [PATCH 75/80] make desktopbridge private for now --- packages/desktopbridge/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/desktopbridge/package.json b/packages/desktopbridge/package.json index c2acba9e..d750a82b 100644 --- a/packages/desktopbridge/package.json +++ b/packages/desktopbridge/package.json @@ -1,6 +1,7 @@ { "name": "@strudel/desktopbridge", "version": "0.1.0", + "private": true, "description": "tools/shims for communicating between the JS and Tauri (Rust) sides of the Studel desktop app", "main": "index.mjs", "type": "module", From 57265b9e33cd832b39309ec82eddb29dbd866253 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 17 Sep 2023 12:34:01 +0200 Subject: [PATCH 76/80] add filter envelopes here and there + comment out outroMusic (lame) --- website/src/repl/tunes.mjs | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/website/src/repl/tunes.mjs b/website/src/repl/tunes.mjs index fdfc47d8..5f68ee93 100644 --- a/website/src/repl/tunes.mjs +++ b/website/src/repl/tunes.mjs @@ -444,7 +444,7 @@ note( .cutoff(cosine.range(500,4000).slow(16)) .gain(.5) .room(.5) - `; + .lpa(.125).lpenv(-2).v("8:.125").fanchor(.25)`; export const hyperpop = `// "Hyperpop" // @license CC BY-NC-SA 4.0 https://creativecommons.org/licenses/by-nc-sa/4.0/ @@ -541,6 +541,7 @@ stack( .s('sawtooth') // waveform .gain(.4) // turn down .cutoff(sine.slow(7).range(300,5000)) // automate cutoff + .lpa(.1).lpenv(-2) //.hush() ,chord(">") .dict('lefthand').voicing() // chords @@ -563,6 +564,7 @@ stack( ) .slow(3/2)`; +/* export const outroMusic = `// "Outro music" // @license CC BY-NC-SA 4.0 https://creativecommons.org/licenses/by-nc-sa/4.0/ // @by Felix Roos @@ -593,7 +595,8 @@ chord("*2").dict('lefthand').anchor("G4").voicing() .n(3).color('gray') ).slow(3/2) //.pianoroll({autorange:1,vertical:1,fold:0}) - `; + `; +*/ export const bassFuge = `// "Bass fuge" // @license CC BY-NC-SA 4.0 https://creativecommons.org/licenses/by-nc-sa/4.0/ @@ -776,7 +779,8 @@ stack( .gain("0.4,0.4(5,8,-1)"), note("<0 2 5 3>".scale('G1 minor')).struct("x(5,8,-1)") - .s('sawtooth').decay(.1).sustain(0), + .s('sawtooth').decay(.1).sustain(0) + .lpa(.1).lpenv(-4).lpf(800).lpq(8), note(",Bb3,D3").struct("~ x*2").s('square').clip(1) .cutoff(sine.range(500,4000).slow(16)).resonance(10) @@ -807,8 +811,10 @@ stack( sine.add(saw.slow(4)).range(0,7).segment(8) .superimpose(x=>x.add(.1)) .scale('G0 minor').note() - .s("sawtooth").decay(.1).sustain(0).lpa(.1).lpenv(4) - .gain(.4).cutoff(perlin.range(300,3000).slow(8)).resonance(10) + .s("sawtooth") + .gain(.4).decay(.1).sustain(0) + .lpa(.1).lpenv(-4).lpq(10) + .cutoff(perlin.range(300,3000).slow(8)) .degradeBy("0 0.1 .5 .1") .rarely(add(note("12"))) , @@ -831,8 +837,8 @@ note("c3 eb3 g3 bb3").palindrome() .s('sawtooth') .jux(x=>x.rev().color('green').s('sawtooth')) .off(1/4, x=>x.add(note("<7 12>/2")).slow(2).late(.005).s('triangle')) -//.delay(.5) -.fast(1).cutoff(sine.range(200,2000).slow(8)) +.lpf(sine.range(200,2000).slow(8)) +.lpa(.2).lpenv(-2) .decay(.05).sustain(0) .room(.6) .delay(.5).delaytime(.1).delayfeedback(.4) @@ -911,7 +917,13 @@ n("[0,3] 2 [1,3] 2".fast(3).lastOf(4, fast(2))).clip(2) .delay(.2) .room(.5).pan(sine.range(.3,.6)) .s('piano') - .stack("<!2 F2 [F2 E2]>".add.out("0 -5".fast(2)).add("0,.12").note().s('sawtooth').clip(1).cutoff(300)) + .stack( + "<!2 F2 F2>" + .add.out("0 -5".fast(2)) + .add("0,.12").note() + .s('sawtooth').cutoff(180) + .lpa(.1).lpenv(2) + ) .slow(4) .stack(s("bd*4, [~ [hh hh? hh?]]*2,~ [sd ~ [sd:2? bd?]]").bank('RolandTR909').gain(.5).slow(2)) `; From de9a52366f6658a4f241d5fe054a854b159e7642 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 17 Sep 2023 12:35:03 +0200 Subject: [PATCH 77/80] Publish - @strudel/codemirror@0.9.0 - @strudel.cycles/core@0.9.0 - @strudel.cycles/csound@0.9.0 - @strudel.cycles/midi@0.9.0 - @strudel.cycles/mini@0.9.0 - @strudel.cycles/osc@0.9.0 - @strudel.cycles/react@0.9.0 - @strudel.cycles/serial@0.9.0 - @strudel.cycles/soundfonts@0.9.0 - superdough@0.9.8 - @strudel.cycles/tonal@0.9.0 - @strudel.cycles/transpiler@0.9.0 - @strudel/web@0.9.0 - @strudel.cycles/webaudio@0.9.0 - @strudel.cycles/xen@0.9.0 --- packages/codemirror/package.json | 2 +- packages/core/package.json | 2 +- packages/csound/package.json | 2 +- packages/midi/package.json | 2 +- packages/mini/package.json | 2 +- packages/osc/package.json | 2 +- packages/react/package.json | 2 +- packages/serial/package.json | 2 +- packages/soundfonts/package.json | 2 +- packages/superdough/package.json | 2 +- packages/tonal/package.json | 2 +- packages/transpiler/package.json | 2 +- packages/web/package.json | 2 +- packages/webaudio/package.json | 2 +- packages/xen/package.json | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/codemirror/package.json b/packages/codemirror/package.json index 0e32fef6..4e443648 100644 --- a/packages/codemirror/package.json +++ b/packages/codemirror/package.json @@ -1,6 +1,6 @@ { "name": "@strudel/codemirror", - "version": "0.8.4", + "version": "0.9.0", "description": "Codemirror Extensions for Strudel", "main": "index.mjs", "publishConfig": { diff --git a/packages/core/package.json b/packages/core/package.json index 16581904..8fd57242 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@strudel.cycles/core", - "version": "0.8.2", + "version": "0.9.0", "description": "Port of Tidal Cycles to JavaScript", "main": "index.mjs", "type": "module", diff --git a/packages/csound/package.json b/packages/csound/package.json index e15cfeaf..a0d21b9f 100644 --- a/packages/csound/package.json +++ b/packages/csound/package.json @@ -1,6 +1,6 @@ { "name": "@strudel.cycles/csound", - "version": "0.8.0", + "version": "0.9.0", "description": "csound bindings for strudel", "main": "index.mjs", "publishConfig": { diff --git a/packages/midi/package.json b/packages/midi/package.json index 42679804..e13887e2 100644 --- a/packages/midi/package.json +++ b/packages/midi/package.json @@ -1,6 +1,6 @@ { "name": "@strudel.cycles/midi", - "version": "0.8.0", + "version": "0.9.0", "description": "Midi API for strudel", "main": "index.mjs", "publishConfig": { diff --git a/packages/mini/package.json b/packages/mini/package.json index 16bd724c..29ba3e83 100644 --- a/packages/mini/package.json +++ b/packages/mini/package.json @@ -1,6 +1,6 @@ { "name": "@strudel.cycles/mini", - "version": "0.8.2", + "version": "0.9.0", "description": "Mini notation for strudel", "main": "index.mjs", "type": "module", diff --git a/packages/osc/package.json b/packages/osc/package.json index af2c9954..dd61c3a7 100644 --- a/packages/osc/package.json +++ b/packages/osc/package.json @@ -1,6 +1,6 @@ { "name": "@strudel.cycles/osc", - "version": "0.8.0", + "version": "0.9.0", "description": "OSC messaging for strudel", "main": "osc.mjs", "publishConfig": { diff --git a/packages/react/package.json b/packages/react/package.json index 51916049..deef95d8 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@strudel.cycles/react", - "version": "0.8.0", + "version": "0.9.0", "description": "React components for strudel", "main": "src/index.js", "publishConfig": { diff --git a/packages/serial/package.json b/packages/serial/package.json index 09a3267a..c25c806a 100644 --- a/packages/serial/package.json +++ b/packages/serial/package.json @@ -1,6 +1,6 @@ { "name": "@strudel.cycles/serial", - "version": "0.8.0", + "version": "0.9.0", "description": "Webserial API for strudel", "main": "serial.mjs", "publishConfig": { diff --git a/packages/soundfonts/package.json b/packages/soundfonts/package.json index 1f7b70e6..c4bf1032 100644 --- a/packages/soundfonts/package.json +++ b/packages/soundfonts/package.json @@ -1,6 +1,6 @@ { "name": "@strudel.cycles/soundfonts", - "version": "0.8.2", + "version": "0.9.0", "description": "Soundsfont support for strudel", "main": "index.mjs", "publishConfig": { diff --git a/packages/superdough/package.json b/packages/superdough/package.json index 22b58cc5..69ba6f8c 100644 --- a/packages/superdough/package.json +++ b/packages/superdough/package.json @@ -1,6 +1,6 @@ { "name": "superdough", - "version": "0.9.7", + "version": "0.9.8", "description": "simple web audio synth and sampler intended for live coding. inspired by superdirt and webdirt.", "main": "index.mjs", "type": "module", diff --git a/packages/tonal/package.json b/packages/tonal/package.json index d98d565f..bef3c2f0 100644 --- a/packages/tonal/package.json +++ b/packages/tonal/package.json @@ -1,6 +1,6 @@ { "name": "@strudel.cycles/tonal", - "version": "0.8.2", + "version": "0.9.0", "description": "Tonal functions for strudel", "main": "index.mjs", "publishConfig": { diff --git a/packages/transpiler/package.json b/packages/transpiler/package.json index 95fbfee7..b546bce2 100644 --- a/packages/transpiler/package.json +++ b/packages/transpiler/package.json @@ -1,6 +1,6 @@ { "name": "@strudel.cycles/transpiler", - "version": "0.8.2", + "version": "0.9.0", "description": "Transpiler for strudel user code. Converts syntactically correct but semantically meaningless JS into evaluatable strudel code.", "main": "index.mjs", "publishConfig": { diff --git a/packages/web/package.json b/packages/web/package.json index 9e866bf1..7e182f40 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -1,6 +1,6 @@ { "name": "@strudel/web", - "version": "0.8.3", + "version": "0.9.0", "description": "Easy to setup, opiniated bundle of Strudel for the browser.", "main": "web.mjs", "publishConfig": { diff --git a/packages/webaudio/package.json b/packages/webaudio/package.json index edd53cbd..cebb30f3 100644 --- a/packages/webaudio/package.json +++ b/packages/webaudio/package.json @@ -1,6 +1,6 @@ { "name": "@strudel.cycles/webaudio", - "version": "0.8.2", + "version": "0.9.0", "description": "Web Audio helpers for Strudel", "main": "index.mjs", "type": "module", diff --git a/packages/xen/package.json b/packages/xen/package.json index 42ce4805..ef2e04d2 100644 --- a/packages/xen/package.json +++ b/packages/xen/package.json @@ -1,6 +1,6 @@ { "name": "@strudel.cycles/xen", - "version": "0.8.0", + "version": "0.9.0", "description": "Xenharmonic API for strudel", "main": "index.mjs", "publishConfig": { From 9c73ef770fd1395a306b35d14dc8c0be81d30dc4 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 17 Sep 2023 13:37:16 +0200 Subject: [PATCH 78/80] snapshot --- test/__snapshots__/tunes.test.mjs.snap | 109 +++++++++++-------------- 1 file changed, 47 insertions(+), 62 deletions(-) diff --git a/test/__snapshots__/tunes.test.mjs.snap b/test/__snapshots__/tunes.test.mjs.snap index 4485f4ca..cd89ee3f 100644 --- a/test/__snapshots__/tunes.test.mjs.snap +++ b/test/__snapshots__/tunes.test.mjs.snap @@ -3,23 +3,23 @@ exports[`renders tunes > tune: amensister 1`] = ` [ "[ 0/1 → 1/16 | s:breath room:1 shape:0.6 begin:0.9375 end:1 ]", - "[ 0/1 → 1/8 | note:Eb1 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:4 gain:0.4 cutoff:300.0066107586751 resonance:10 ]", - "[ 0/1 → 1/8 | note:F1 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:4 gain:0.4 cutoff:300.0066107586751 resonance:10 ]", + "[ 0/1 → 1/8 | note:Eb1 s:sawtooth gain:0.4 decay:0.1 sustain:0 lpattack:0.1 lpenv:-4 resonance:10 cutoff:300.0066107586751 ]", + "[ 0/1 → 1/8 | note:F1 s:sawtooth gain:0.4 decay:0.1 sustain:0 lpattack:0.1 lpenv:-4 resonance:10 cutoff:300.0066107586751 ]", "[ 0/1 → 1/4 | n:0 s:amencutup room:0.5 ]", "[ 1/16 → 1/8 | s:breath room:1 shape:0.6 begin:0.875 end:0.9375 ]", "[ 1/8 → 3/16 | s:breath room:1 shape:0.6 begin:0.8125 end:0.875 ]", - "[ 1/8 → 1/4 | note:45 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:4 gain:0.4 cutoff:300.174310575404 resonance:10 ]", - "[ 1/8 → 1/4 | note:45 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:4 gain:0.4 cutoff:300.174310575404 resonance:10 ]", + "[ 1/8 → 1/4 | note:45 s:sawtooth gain:0.4 decay:0.1 sustain:0 lpattack:0.1 lpenv:-4 resonance:10 cutoff:300.174310575404 ]", + "[ 1/8 → 1/4 | note:45 s:sawtooth gain:0.4 decay:0.1 sustain:0 lpattack:0.1 lpenv:-4 resonance:10 cutoff:300.174310575404 ]", "[ 3/16 → 1/4 | s:breath room:1 shape:0.6 begin:0.75 end:0.8125 ]", "[ 1/4 → 5/16 | s:breath room:1 shape:0.6 begin:0.6875 end:0.75 ]", "[ 1/4 → 3/8 | n:1 speed:2 delay:0.5 s:amencutup room:0.5 ]", - "[ 1/4 → 3/8 | note:A1 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:4 gain:0.4 cutoff:300.7878869297153 resonance:10 ]", - "[ 1/4 → 3/8 | note:A1 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:4 gain:0.4 cutoff:300.7878869297153 resonance:10 ]", + "[ 1/4 → 3/8 | note:A1 s:sawtooth gain:0.4 decay:0.1 sustain:0 lpattack:0.1 lpenv:-4 resonance:10 cutoff:300.7878869297153 ]", + "[ 1/4 → 3/8 | note:A1 s:sawtooth gain:0.4 decay:0.1 sustain:0 lpattack:0.1 lpenv:-4 resonance:10 cutoff:300.7878869297153 ]", "[ 5/16 → 3/8 | s:breath room:1 shape:0.6 begin:0.625 end:0.6875 ]", "[ 3/8 → 7/16 | s:breath room:1 shape:0.6 begin:0.5625 end:0.625 ]", "[ 3/8 → 1/2 | n:1 s:amencutup room:0.5 ]", - "[ 3/8 → 1/2 | note:F1 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:4 gain:0.4 cutoff:302.11020572391345 resonance:10 ]", - "[ 3/8 → 1/2 | note:F1 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:4 gain:0.4 cutoff:302.11020572391345 resonance:10 ]", + "[ 3/8 → 1/2 | note:F1 s:sawtooth gain:0.4 decay:0.1 sustain:0 lpattack:0.1 lpenv:-4 resonance:10 cutoff:302.11020572391345 ]", + "[ 3/8 → 1/2 | note:F1 s:sawtooth gain:0.4 decay:0.1 sustain:0 lpattack:0.1 lpenv:-4 resonance:10 cutoff:302.11020572391345 ]", "[ 7/16 → 1/2 | s:breath room:1 shape:0.6 begin:0.5 end:0.5625 ]", "[ 1/2 → 9/16 | s:breath room:1 shape:0.6 begin:0.4375 end:0.5 ]", "[ 1/2 → 3/4 | n:2 s:amencutup room:0.5 ]", @@ -28,13 +28,13 @@ exports[`renders tunes > tune: amensister 1`] = ` "[ 11/16 → 3/4 | s:breath room:1 shape:0.6 begin:0.25 end:0.3125 ]", "[ 3/4 → 13/16 | s:breath room:1 shape:0.6 begin:0.1875 end:0.25 ]", "[ 3/4 → 7/8 | n:3 s:amencutup room:0.5 ]", - "[ 3/4 → 7/8 | note:Bb0 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:4 gain:0.4 cutoff:312.54769231985796 resonance:10 ]", - "[ 3/4 → 7/8 | note:Bb0 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:4 gain:0.4 cutoff:312.54769231985796 resonance:10 ]", + "[ 3/4 → 7/8 | note:Bb0 s:sawtooth gain:0.4 decay:0.1 sustain:0 lpattack:0.1 lpenv:-4 resonance:10 cutoff:312.54769231985796 ]", + "[ 3/4 → 7/8 | note:Bb0 s:sawtooth gain:0.4 decay:0.1 sustain:0 lpattack:0.1 lpenv:-4 resonance:10 cutoff:312.54769231985796 ]", "[ 13/16 → 7/8 | s:breath room:1 shape:0.6 begin:0.125 end:0.1875 ]", "[ 7/8 → 15/16 | s:breath room:1 shape:0.6 begin:0.0625 end:0.125 ]", "[ 7/8 → 1/1 | n:3 s:amencutup room:0.5 ]", - "[ 7/8 → 1/1 | note:D1 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:4 gain:0.4 cutoff:318.7927796831686 resonance:10 ]", - "[ 7/8 → 1/1 | note:D1 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:4 gain:0.4 cutoff:318.7927796831686 resonance:10 ]", + "[ 7/8 → 1/1 | note:D1 s:sawtooth gain:0.4 decay:0.1 sustain:0 lpattack:0.1 lpenv:-4 resonance:10 cutoff:318.7927796831686 ]", + "[ 7/8 → 1/1 | note:D1 s:sawtooth gain:0.4 decay:0.1 sustain:0 lpattack:0.1 lpenv:-4 resonance:10 cutoff:318.7927796831686 ]", "[ 15/16 → 1/1 | s:breath room:1 shape:0.6 begin:0 end:0.0625 ]", ] `; @@ -44,8 +44,8 @@ exports[`renders tunes > tune: arpoon 1`] = ` "[ (0/1 → 1/4) ⇝ 1/3 | note:55.000070545713186 clip:2 cutoff:501.2345499807435 resonance:12 gain:0.5 decay:0.16 sustain:0.5 delay:0.2 room:0.5 pan:0.48882285676537807 s:piano ]", "[ (0/1 → 1/4) ⇝ 1/3 | note:64.00007054571319 clip:2 cutoff:501.2345499807435 resonance:12 gain:0.5 decay:0.16 sustain:0.5 delay:0.2 room:0.5 pan:0.48882285676537807 s:piano ]", "[ 0/1 → 1/2 | s:bd bank:RolandTR909 gain:0.5 ]", - "[ 0/1 → 1/1 | note:33 s:sawtooth clip:1 cutoff:300 ]", - "[ 0/1 → 1/1 | note:33.12 s:sawtooth clip:1 cutoff:300 ]", + "[ 0/1 → 1/1 | note:33 s:sawtooth cutoff:180 lpattack:0.1 lpenv:2 ]", + "[ 0/1 → 1/1 | note:33.12 s:sawtooth cutoff:180 lpattack:0.1 lpenv:2 ]", "[ 0/1 ⇜ (1/4 → 1/3) | note:55.000070545713186 clip:2 cutoff:501.2345499807435 resonance:12 gain:0.8 decay:0.16 sustain:0.5 delay:0.2 room:0.5 pan:0.48882285676537807 s:piano ]", "[ 0/1 ⇜ (1/4 → 1/3) | note:64.00007054571319 clip:2 cutoff:501.2345499807435 resonance:12 gain:0.8 decay:0.16 sustain:0.5 delay:0.2 room:0.5 pan:0.48882285676537807 s:piano ]", "[ (1/3 → 1/2) ⇝ 2/3 | note:60.00166796373806 clip:2 cutoff:529.1893654159594 resonance:12 gain:0.8 decay:0.16 sustain:0.5 delay:0.2 room:0.5 pan:0.5560660171779821 s:piano ]", @@ -7315,20 +7315,20 @@ exports[`renders tunes > tune: flatrave 1`] = ` "[ 0/1 ⇜ (1/8 → 1/4) | s:hh n:1 end:0.02000058072071123 bank:RolandTR909 room:0.5 gain:0.4 ]", "[ 1/8 → 1/4 | s:hh n:1 speed:0.5 delay:0.5 end:0.020001936784171157 bank:RolandTR909 room:0.5 gain:0.4 ]", "[ 1/8 → 1/4 | s:hh n:1 speed:0.5 delay:0.5 end:0.020001936784171157 bank:RolandTR909 room:0.5 gain:0.4 ]", - "[ 1/8 → 1/4 | note:G1 s:sawtooth decay:0.1 sustain:0 ]", + "[ 1/8 → 1/4 | note:G1 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:-4 cutoff:800 resonance:8 ]", "[ 1/4 → 3/8 | s:hh n:1 end:0.02000875429921906 bank:RolandTR909 room:0.5 gain:0.4 ]", "[ 1/4 → 3/8 | s:hh n:1 end:0.02000875429921906 bank:RolandTR909 room:0.5 gain:0.4 ]", - "[ 1/4 → 3/8 | note:G1 s:sawtooth decay:0.1 sustain:0 ]", + "[ 1/4 → 3/8 | note:G1 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:-4 cutoff:800 resonance:8 ]", "[ 3/8 → 1/2 | s:hh n:1 end:0.020023446730265706 bank:RolandTR909 room:0.5 gain:0.4 ]", - "[ 1/2 → 5/8 | note:G1 s:sawtooth decay:0.1 sustain:0 ]", + "[ 1/2 → 5/8 | note:G1 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:-4 cutoff:800 resonance:8 ]", "[ 1/2 → 1/1 | s:bd bank:RolandTR909 ]", "[ 1/2 → 1/1 | s:cp bank:RolandTR909 ]", "[ 1/2 → 1/1 | s:sd bank:RolandTR909 ]", "[ 5/8 → 3/4 | s:hh n:1 end:0.020086608138500644 bank:RolandTR909 room:0.5 gain:0.4 ]", "[ 5/8 → 3/4 | s:hh n:1 end:0.020086608138500644 bank:RolandTR909 room:0.5 gain:0.4 ]", - "[ 5/8 → 3/4 | note:G1 s:sawtooth decay:0.1 sustain:0 ]", + "[ 5/8 → 3/4 | note:G1 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:-4 cutoff:800 resonance:8 ]", "[ 3/4 → 7/8 | s:hh n:1 end:0.02013941880355398 bank:RolandTR909 room:0.5 gain:0.4 ]", - "[ 7/8 → 1/1 | note:G1 s:sawtooth decay:0.1 sustain:0 ]", + "[ 7/8 → 1/1 | note:G1 s:sawtooth decay:0.1 sustain:0 lpattack:0.1 lpenv:-4 cutoff:800 resonance:8 ]", ] `; @@ -8372,16 +8372,16 @@ exports[`renders tunes > tune: hyperpop 1`] = ` exports[`renders tunes > tune: juxUndTollerei 1`] = ` [ - "[ 0/1 → 1/4 | note:bb3 s:sawtooth pan:0 cutoff:1188.2154262966046 decay:0.05 sustain:0 room:0.6 delay:0.5 delaytime:0.1 delayfeedback:0.4 ]", - "[ 0/1 → 1/4 | note:c3 s:sawtooth pan:1 cutoff:1188.2154262966046 decay:0.05 sustain:0 room:0.6 delay:0.5 delaytime:0.1 delayfeedback:0.4 ]", - "[ 1/4 → 1/2 | note:g3 s:sawtooth pan:0 cutoff:1361.2562095290161 decay:0.05 sustain:0 room:0.6 delay:0.5 delaytime:0.1 delayfeedback:0.4 ]", - "[ 1/4 → 1/2 | note:eb3 s:sawtooth pan:1 cutoff:1361.2562095290161 decay:0.05 sustain:0 room:0.6 delay:0.5 delaytime:0.1 delayfeedback:0.4 ]", - "[ 1/2 → 3/4 | note:eb3 s:sawtooth pan:0 cutoff:1524.257063143398 decay:0.05 sustain:0 room:0.6 delay:0.5 delaytime:0.1 delayfeedback:0.4 ]", - "[ 1/2 → 3/4 | note:g3 s:sawtooth pan:1 cutoff:1524.257063143398 decay:0.05 sustain:0 room:0.6 delay:0.5 delaytime:0.1 delayfeedback:0.4 ]", - "[ (101/200 → 1/1) ⇝ 201/200 | note:65 s:triangle pan:0 cutoff:1601.4815730092653 decay:0.05 sustain:0 room:0.6 delay:0.5 delaytime:0.1 delayfeedback:0.4 ]", - "[ (101/200 → 1/1) ⇝ 201/200 | note:55 s:triangle pan:1 cutoff:1601.4815730092653 decay:0.05 sustain:0 room:0.6 delay:0.5 delaytime:0.1 delayfeedback:0.4 ]", - "[ 3/4 → 1/1 | note:c3 s:sawtooth pan:0 cutoff:1670.953955747281 decay:0.05 sustain:0 room:0.6 delay:0.5 delaytime:0.1 delayfeedback:0.4 ]", - "[ 3/4 → 1/1 | note:bb3 s:sawtooth pan:1 cutoff:1670.953955747281 decay:0.05 sustain:0 room:0.6 delay:0.5 delaytime:0.1 delayfeedback:0.4 ]", + "[ 0/1 → 1/4 | note:bb3 s:sawtooth pan:0 cutoff:1188.2154262966046 lpattack:0.2 lpenv:-2 decay:0.05 sustain:0 room:0.6 delay:0.5 delaytime:0.1 delayfeedback:0.4 ]", + "[ 0/1 → 1/4 | note:c3 s:sawtooth pan:1 cutoff:1188.2154262966046 lpattack:0.2 lpenv:-2 decay:0.05 sustain:0 room:0.6 delay:0.5 delaytime:0.1 delayfeedback:0.4 ]", + "[ 1/4 → 1/2 | note:g3 s:sawtooth pan:0 cutoff:1361.2562095290161 lpattack:0.2 lpenv:-2 decay:0.05 sustain:0 room:0.6 delay:0.5 delaytime:0.1 delayfeedback:0.4 ]", + "[ 1/4 → 1/2 | note:eb3 s:sawtooth pan:1 cutoff:1361.2562095290161 lpattack:0.2 lpenv:-2 decay:0.05 sustain:0 room:0.6 delay:0.5 delaytime:0.1 delayfeedback:0.4 ]", + "[ 1/2 → 3/4 | note:eb3 s:sawtooth pan:0 cutoff:1524.257063143398 lpattack:0.2 lpenv:-2 decay:0.05 sustain:0 room:0.6 delay:0.5 delaytime:0.1 delayfeedback:0.4 ]", + "[ 1/2 → 3/4 | note:g3 s:sawtooth pan:1 cutoff:1524.257063143398 lpattack:0.2 lpenv:-2 decay:0.05 sustain:0 room:0.6 delay:0.5 delaytime:0.1 delayfeedback:0.4 ]", + "[ (101/200 → 1/1) ⇝ 201/200 | note:65 s:triangle pan:0 cutoff:1601.4815730092653 lpattack:0.2 lpenv:-2 decay:0.05 sustain:0 room:0.6 delay:0.5 delaytime:0.1 delayfeedback:0.4 ]", + "[ (101/200 → 1/1) ⇝ 201/200 | note:55 s:triangle pan:1 cutoff:1601.4815730092653 lpattack:0.2 lpenv:-2 decay:0.05 sustain:0 room:0.6 delay:0.5 delaytime:0.1 delayfeedback:0.4 ]", + "[ 3/4 → 1/1 | note:c3 s:sawtooth pan:0 cutoff:1670.953955747281 lpattack:0.2 lpenv:-2 decay:0.05 sustain:0 room:0.6 delay:0.5 delaytime:0.1 delayfeedback:0.4 ]", + "[ 3/4 → 1/1 | note:bb3 s:sawtooth pan:1 cutoff:1670.953955747281 lpattack:0.2 lpenv:-2 decay:0.05 sustain:0 room:0.6 delay:0.5 delaytime:0.1 delayfeedback:0.4 ]", ] `; @@ -8422,8 +8422,8 @@ exports[`renders tunes > tune: meltingsubmarine 1`] = ` "[ 0/1 → 3/16 | note:93.00057728554401 decay:0.1 sustain:0 s:triangle gain:0.075 ]", "[ 0/1 → 3/16 | note:93.04057728554402 decay:0.1 sustain:0 s:triangle gain:0.075 ]", "[ (0/1 → 1/1) ⇝ 3/2 | s:bd n:5 speed:0.7519542165100574 ]", - "[ (0/1 → 1/1) ⇝ 3/2 | note:33.129885541275144 decay:0.15 sustain:0 s:sawtooth gain:0.4 cutoff:3669.6267869262615 ]", - "[ (0/1 → 1/1) ⇝ 3/2 | note:33.17988554127514 decay:0.15 sustain:0 s:sawtooth gain:0.4 cutoff:3669.6267869262615 ]", + "[ (0/1 → 1/1) ⇝ 3/2 | note:33.129885541275144 decay:0.15 sustain:0 s:sawtooth gain:0.4 cutoff:3669.6267869262615 lpattack:0.1 lpenv:-2 ]", + "[ (0/1 → 1/1) ⇝ 3/2 | note:33.17988554127514 decay:0.15 sustain:0 s:sawtooth gain:0.4 cutoff:3669.6267869262615 lpattack:0.1 lpenv:-2 ]", "[ (0/1 → 1/1) ⇝ 3/2 | note:60.129885541275144 s:sawtooth gain:0.16 cutoff:500 attack:1 ]", "[ (0/1 → 1/1) ⇝ 3/2 | note:60.16988554127514 s:sawtooth gain:0.16 cutoff:500 attack:1 ]", "[ (0/1 → 1/1) ⇝ 3/2 | note:64.12988554127514 s:sawtooth gain:0.16 cutoff:500 attack:1 ]", @@ -8481,21 +8481,6 @@ exports[`renders tunes > tune: orbit 1`] = ` ] `; -exports[`renders tunes > tune: outroMusic 1`] = ` -[ - "[ 0/1 → 1/2 | s:hh speed:0.9036881079621337 n:3 ]", - "[ 0/1 → 3/4 | note:C2 s:sawtooth attack:0.05 decay:0.1 sustain:0.7 cutoff:864.536878321087 gain:0.3 ]", - "[ 0/1 → 3/4 | s:bd speed:0.9107561463868479 n:3 ]", - "[ (0/1 → 1/1) ⇝ 3/1 | note:B3 s:gm_epiano1 n:1 attack:0.05 decay:0.1 sustain:0.7 cutoff:1111.7252990603447 gain:0.3 ]", - "[ (0/1 → 1/1) ⇝ 3/1 | note:D4 s:gm_epiano1 n:1 attack:0.05 decay:0.1 sustain:0.7 cutoff:1111.7252990603447 gain:0.3 ]", - "[ (0/1 → 1/1) ⇝ 3/1 | note:E4 s:gm_epiano1 n:1 attack:0.05 decay:0.1 sustain:0.7 cutoff:1111.7252990603447 gain:0.3 ]", - "[ (0/1 → 1/1) ⇝ 3/1 | note:G4 s:gm_epiano1 n:1 attack:0.05 decay:0.1 sustain:0.7 cutoff:1111.7252990603447 gain:0.3 ]", - "[ (0/1 → 1/1) ⇝ 9/2 | n:1 note:C5 s:gm_epiano1 attack:0.05 decay:0.1 sustain:0.7 cutoff:1111.7252990603447 gain:0.3 ]", - "[ 1/2 → 1/1 | s:hh speed:0.9519542165100575 n:3 ]", - "[ (3/4 → 1/1) ⇝ 3/2 | s:sd speed:0.9931522866332672 n:3 ]", -] -`; - exports[`renders tunes > tune: randomBells 1`] = ` [ "[ -9/8 ⇜ (0/1 → 3/8) | note:G4 s:bell gain:0.6 delay:0.2 delaytime:0.3333333333333333 delayfeedback:0.8 ]", @@ -10180,22 +10165,22 @@ exports[`renders tunes > tune: undergroundPlumber 1`] = ` exports[`renders tunes > tune: waa2 1`] = ` [ - "[ -1/4 ⇜ (0/1 → 1/4) | note:48 clip:1.1738393178344886 s:sawtooth cutoff:3997.892048359052 gain:0.5 room:0.5 ]", - "[ -1/4 ⇜ (0/1 → 1/4) | note:64 clip:1.1738393178344886 s:sawtooth cutoff:3997.892048359052 gain:0.5 room:0.5 ]", - "[ (0/1 → 1/4) ⇝ 1/2 | note:62 clip:1.197659880151613 s:sawtooth cutoff:3991.5732716763446 gain:0.5 room:0.5 ]", - "[ (0/1 → 1/4) ⇝ 1/2 | note:43 clip:1.197659880151613 s:sawtooth cutoff:3991.5732716763446 gain:0.5 room:0.5 ]", - "[ 0/1 ⇜ (1/4 → 1/2) | note:62 clip:1.197659880151613 s:square cutoff:3991.5732716763446 gain:0.5 room:0.5 ]", - "[ 0/1 ⇜ (1/4 → 1/2) | note:43 clip:1.197659880151613 s:square cutoff:3991.5732716763446 gain:0.5 room:0.5 ]", - "[ (1/4 → 1/2) ⇝ 3/4 | note:74 clip:1.2451698046878117 s:square cutoff:3966.3742407056534 gain:0.5 room:0.5 ]", - "[ (1/4 → 1/2) ⇝ 3/4 | note:55 clip:1.2451698046878117 s:square cutoff:3966.3742407056534 gain:0.5 room:0.5 ]", - "[ 1/4 ⇜ (1/2 → 3/4) | note:74 clip:1.2451698046878117 s:sawtooth cutoff:3966.3742407056534 gain:0.5 room:0.5 ]", - "[ 1/4 ⇜ (1/2 → 3/4) | note:55 clip:1.2451698046878117 s:sawtooth cutoff:3966.3742407056534 gain:0.5 room:0.5 ]", - "[ 1/2 → 3/4 | note:50 clip:1.2688217886051745 s:sawtooth cutoff:3947.554693090452 gain:0.5 room:0.5 ]", - "[ (1/2 → 3/4) ⇝ 1/1 | note:69 clip:1.292380289809026 s:sawtooth cutoff:3924.645587531366 gain:0.5 room:0.5 ]", - "[ 1/2 ⇜ (3/4 → 1/1) | note:69 clip:1.292380289809026 s:square cutoff:3924.645587531366 gain:0.5 room:0.5 ]", - "[ 3/4 → 1/1 | note:41 clip:1.315826773713709 s:square cutoff:3897.7021140702864 gain:0.5 room:0.5 ]", - "[ 3/4 → 1/1 | note:62 clip:1.315826773713709 s:square cutoff:3897.7021140702864 gain:0.5 room:0.5 ]", - "[ (3/4 → 1/1) ⇝ 5/4 | note:81 clip:1.315826773713709 s:square cutoff:3897.7021140702864 gain:0.5 room:0.5 ]", + "[ -1/4 ⇜ (0/1 → 1/4) | note:48 clip:1.1738393178344886 s:sawtooth cutoff:3997.892048359052 gain:0.5 room:0.5 lpattack:0.125 lpenv:-2 vib:8 vibmod:0.125 fanchor:0.25 ]", + "[ -1/4 ⇜ (0/1 → 1/4) | note:64 clip:1.1738393178344886 s:sawtooth cutoff:3997.892048359052 gain:0.5 room:0.5 lpattack:0.125 lpenv:-2 vib:8 vibmod:0.125 fanchor:0.25 ]", + "[ (0/1 → 1/4) ⇝ 1/2 | note:62 clip:1.197659880151613 s:sawtooth cutoff:3991.5732716763446 gain:0.5 room:0.5 lpattack:0.125 lpenv:-2 vib:8 vibmod:0.125 fanchor:0.25 ]", + "[ (0/1 → 1/4) ⇝ 1/2 | note:43 clip:1.197659880151613 s:sawtooth cutoff:3991.5732716763446 gain:0.5 room:0.5 lpattack:0.125 lpenv:-2 vib:8 vibmod:0.125 fanchor:0.25 ]", + "[ 0/1 ⇜ (1/4 → 1/2) | note:62 clip:1.197659880151613 s:square cutoff:3991.5732716763446 gain:0.5 room:0.5 lpattack:0.125 lpenv:-2 vib:8 vibmod:0.125 fanchor:0.25 ]", + "[ 0/1 ⇜ (1/4 → 1/2) | note:43 clip:1.197659880151613 s:square cutoff:3991.5732716763446 gain:0.5 room:0.5 lpattack:0.125 lpenv:-2 vib:8 vibmod:0.125 fanchor:0.25 ]", + "[ (1/4 → 1/2) ⇝ 3/4 | note:74 clip:1.2451698046878117 s:square cutoff:3966.3742407056534 gain:0.5 room:0.5 lpattack:0.125 lpenv:-2 vib:8 vibmod:0.125 fanchor:0.25 ]", + "[ (1/4 → 1/2) ⇝ 3/4 | note:55 clip:1.2451698046878117 s:square cutoff:3966.3742407056534 gain:0.5 room:0.5 lpattack:0.125 lpenv:-2 vib:8 vibmod:0.125 fanchor:0.25 ]", + "[ 1/4 ⇜ (1/2 → 3/4) | note:74 clip:1.2451698046878117 s:sawtooth cutoff:3966.3742407056534 gain:0.5 room:0.5 lpattack:0.125 lpenv:-2 vib:8 vibmod:0.125 fanchor:0.25 ]", + "[ 1/4 ⇜ (1/2 → 3/4) | note:55 clip:1.2451698046878117 s:sawtooth cutoff:3966.3742407056534 gain:0.5 room:0.5 lpattack:0.125 lpenv:-2 vib:8 vibmod:0.125 fanchor:0.25 ]", + "[ 1/2 → 3/4 | note:50 clip:1.2688217886051745 s:sawtooth cutoff:3947.554693090452 gain:0.5 room:0.5 lpattack:0.125 lpenv:-2 vib:8 vibmod:0.125 fanchor:0.25 ]", + "[ (1/2 → 3/4) ⇝ 1/1 | note:69 clip:1.292380289809026 s:sawtooth cutoff:3924.645587531366 gain:0.5 room:0.5 lpattack:0.125 lpenv:-2 vib:8 vibmod:0.125 fanchor:0.25 ]", + "[ 1/2 ⇜ (3/4 → 1/1) | note:69 clip:1.292380289809026 s:square cutoff:3924.645587531366 gain:0.5 room:0.5 lpattack:0.125 lpenv:-2 vib:8 vibmod:0.125 fanchor:0.25 ]", + "[ 3/4 → 1/1 | note:41 clip:1.315826773713709 s:square cutoff:3897.7021140702864 gain:0.5 room:0.5 lpattack:0.125 lpenv:-2 vib:8 vibmod:0.125 fanchor:0.25 ]", + "[ 3/4 → 1/1 | note:62 clip:1.315826773713709 s:square cutoff:3897.7021140702864 gain:0.5 room:0.5 lpattack:0.125 lpenv:-2 vib:8 vibmod:0.125 fanchor:0.25 ]", + "[ (3/4 → 1/1) ⇝ 5/4 | note:81 clip:1.315826773713709 s:square cutoff:3897.7021140702864 gain:0.5 room:0.5 lpattack:0.125 lpenv:-2 vib:8 vibmod:0.125 fanchor:0.25 ]", ] `; From 258eb88684a136b26190616d8b7cdc8c6e7572a8 Mon Sep 17 00:00:00 2001 From: vmilovidov Date: Sun, 17 Sep 2023 13:14:13 +0000 Subject: [PATCH 79/80] Update tauri.yml workflow --- .github/workflows/tauri.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tauri.yml b/.github/workflows/tauri.yml index 39ec34ca..dde52a25 100644 --- a/.github/workflows/tauri.yml +++ b/.github/workflows/tauri.yml @@ -42,7 +42,7 @@ jobs: if: matrix.platform == 'ubuntu-latest' run: | sudo apt-get update - sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf + sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf pkg-config alsa-tools libasound2-dev - name: Install app dependencies from lockfile and build web run: pnpm install From 05c09eff192ea66f0c64dac87693c6553907752b Mon Sep 17 00:00:00 2001 From: vmilovidov Date: Sun, 17 Sep 2023 13:26:58 +0000 Subject: [PATCH 80/80] Update tauri.yml workflow file --- .github/workflows/tauri.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tauri.yml b/.github/workflows/tauri.yml index dde52a25..07fd91be 100644 --- a/.github/workflows/tauri.yml +++ b/.github/workflows/tauri.yml @@ -42,7 +42,7 @@ jobs: if: matrix.platform == 'ubuntu-latest' run: | sudo apt-get update - sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf pkg-config alsa-tools libasound2-dev + sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf libasound2-dev - name: Install app dependencies from lockfile and build web run: pnpm install