This commit is contained in:
Felix Roos 2024-05-23 19:43:34 +02:00
commit 8710cd446b
7 changed files with 292 additions and 7121 deletions

View File

@ -430,6 +430,17 @@ export const { crush } = registerControl('crush');
*/
export const { coarse } = registerControl('coarse');
/**
* filter overdrive for supported filter types
*
* @name drive
* @param {number | Pattern} amount
* @example
* note("{f g g c d a a#}%16".sub(17)).s("supersaw").lpenv(8).lpf(150).lpq(.8).ftype('ladder').drive("<.5 4>")
*
*/
export const { drive } = registerControl('drive');
/**
* Allows you to set the output channels on the interface
*
@ -742,15 +753,17 @@ export const { hprelease, hpr } = registerControl('hprelease', 'hpr');
*/
export const { bprelease, bpr } = registerControl('bprelease', 'bpr');
/**
* Sets the filter type. The 24db filter is more aggressive. More types might be added in the future.
* Sets the filter type. The ladder filter is more aggressive. More types might be added in the future.
* @name ftype
* @param {number | Pattern} type 12db (default) or 24db
* @param {number | Pattern} type 12db (0), ladder (1), or 24db (2)
* @example
* note("c2 e2 f2 g2")
* note("{f g g c d a a#}%8").s("sawtooth").lpenv(4).lpf(500).ftype("<0 1 2>").lpq(1)
* @example
* note("c f g g a c d4").fast(2)
* .sound('sawtooth')
* .lpf(500)
* .bpenv(4)
* .ftype("12db 24db")
* .lpf(200).fanchor(0)
* .lpenv(3).lpq(1)
* .ftype("<ladder 12db 24db>")
*/
export const { ftype } = registerControl('ftype');
export const { fanchor } = registerControl('fanchor');

View File

@ -14,6 +14,15 @@ const getSlope = (y1, y2, x1, x2) => {
}
return (y2 - y1) / (x2 - x1);
};
export function getWorklet(ac, processor, params, config) {
const node = new AudioWorkletNode(ac, processor, config);
Object.entries(params).forEach(([key, value]) => {
node.parameters.get(key).value = value;
});
return node;
}
export const getParamADSR = (
param,
attack,
@ -103,14 +112,22 @@ export const getADSRValues = (params, curve = 'linear', defaultValues) => {
return [Math.max(a ?? 0, envmin), Math.max(d ?? 0, envmin), Math.min(sustain, envmax), Math.max(r ?? 0, releaseMin)];
};
export function createFilter(context, type, frequency, Q, att, dec, sus, rel, fenv, start, end, fanchor) {
export function createFilter(context, type, frequency, Q, att, dec, sus, rel, fenv, start, end, fanchor, model, drive) {
const curve = 'exponential';
const [attack, decay, sustain, release] = getADSRValues([att, dec, sus, rel], curve, [0.005, 0.14, 0, 0.1]);
const filter = context.createBiquadFilter();
let filter;
let frequencyParam;
if (model === 'ladder') {
filter = getWorklet(context, 'ladder-processor', { frequency, q: Q, drive });
frequencyParam = filter.parameters.get('frequency');
} else {
filter = context.createBiquadFilter();
filter.type = type;
filter.Q.value = Q;
filter.frequency.value = frequency;
frequencyParam = filter.frequency;
}
filter.type = type;
filter.Q.value = Q;
filter.frequency.value = frequency;
// envelope is active when any of these values is set
const hasEnvelope = att ?? dec ?? sus ?? rel ?? fenv;
// Apply ADSR to filter frequency
@ -122,7 +139,7 @@ export function createFilter(context, type, frequency, Q, att, dec, sus, rel, fe
let min = clamp(2 ** -offset * frequency, 0, 20000);
let max = clamp(2 ** (fenvAbs - offset) * frequency, 0, 20000);
if (fenv < 0) [min, max] = [max, min];
getParamADSR(filter.frequency, attack, decay, sustain, release, min, max, start, end, curve);
getParamADSR(frequencyParam, attack, decay, sustain, release, min, max, start, end, curve);
return filter;
}
return filter;

View File

@ -7,9 +7,9 @@ This program is free software: you can redistribute it and/or modify it under th
import './feedbackdelay.mjs';
import './reverb.mjs';
import './vowel.mjs';
import { clamp, nanFallback } from './util.mjs';
import { clamp, nanFallback, _mod } from './util.mjs';
import workletsUrl from './worklets.mjs?url';
import { createFilter, gainNode, getCompressor } from './helpers.mjs';
import { createFilter, gainNode, getCompressor, getWorklet } from './helpers.mjs';
import { map } from 'nanostores';
import { logger } from './logger.mjs';
import { loadBuffer } from './sampler.mjs';
@ -50,14 +50,6 @@ function loadWorklets() {
return workletsLoading;
}
export function getWorklet(ac, processor, params, config) {
const node = new AudioWorkletNode(ac, processor, config);
Object.entries(params).forEach(([key, value]) => {
node.parameters.get(key).value = value;
});
return node;
}
// this function should be called on first user interaction (to avoid console warning)
export async function initAudio(options = {}) {
const { disableWorklets = false } = options;
@ -186,10 +178,14 @@ function getPhaser(orbit, t, speed = 1, depth = 0.5, centerFrequency = 1000, swe
return filterChain[filterChain.length - 1];
}
function getFilterType(ftype) {
ftype = ftype ?? 0;
const filterTypes = ['12db', 'ladder', '24db'];
return typeof ftype === 'number' ? filterTypes[Math.floor(_mod(ftype, filterTypes.length))] : ftype;
}
let reverbs = {};
let hasChanged = (now, before) => now !== undefined && now !== before;
function getReverb(orbit, duration, fade, lp, dim, ir) {
// If no reverb has been created for a given orbit, create one
if (!reverbs[orbit]) {
@ -288,8 +284,9 @@ export const superdough = async (value, t, hapDuration) => {
postgain = 1,
density = 0.03,
// filters
ftype = '12db',
fanchor = 0.5,
drive = 0.69,
// low pass
cutoff,
lpenv,
@ -394,6 +391,8 @@ export const superdough = async (value, t, hapDuration) => {
// gain stage
chain.push(gainNode(gain));
//filter
const ftype = getFilterType(value.ftype);
if (cutoff !== undefined) {
let lp = () =>
createFilter(
@ -409,6 +408,8 @@ export const superdough = async (value, t, hapDuration) => {
t,
t + hapDuration,
fanchor,
ftype,
drive,
);
chain.push(lp());
if (ftype === '24db') {

View File

@ -1,5 +1,5 @@
import { clamp, midiToFreq, noteToMidi } from './util.mjs';
import { registerSound, getAudioContext, getWorklet } from './superdough.mjs';
import { registerSound, getAudioContext } from './superdough.mjs';
import {
applyFM,
gainNode,
@ -8,6 +8,7 @@ import {
getPitchEnvelope,
getVibratoOscillator,
webAudioTimeout,
getWorklet,
} from './helpers.mjs';
import { getNoiseMix, getNoiseOscillator } from './noise.mjs';

View File

@ -1,6 +1,6 @@
// coarse, crush, and shape processors adapted from dktr0's webdirt: https://github.com/dktr0/WebDirt/blob/5ce3d698362c54d6e1b68acc47eb2955ac62c793/dist/AudioWorklets.js
// LICENSE GNU General Public License v3.0 see https://github.com/dktr0/WebDirt/blob/main/LICENSE
import { clamp } from './util.mjs';
const blockSize = 128;
class CoarseProcessor extends AudioWorkletProcessor {
static get parameterDescriptors() {
@ -106,6 +106,77 @@ class ShapeProcessor extends AudioWorkletProcessor {
}
registerProcessor('shape-processor', ShapeProcessor);
function fast_tanh(x) {
const x2 = x * x;
return (x * (27.0 + x2)) / (27.0 + 9.0 * x2);
}
const _PI = 3.14159265359;
//adapted from https://github.com/TheBouteillacBear/webaudioworklet-wasm?tab=MIT-1-ov-file
class LadderProcessor extends AudioWorkletProcessor {
static get parameterDescriptors() {
return [
{ name: 'frequency', defaultValue: 500 },
{ name: 'q', defaultValue: 1 },
{ name: 'drive', defaultValue: 0.69 },
];
}
constructor() {
super();
this.started = false;
this.p0 = [0, 0];
this.p1 = [0, 0];
this.p2 = [0, 0];
this.p3 = [0, 0];
this.p32 = [0, 0];
this.p33 = [0, 0];
this.p34 = [0, 0];
}
process(inputs, outputs, parameters) {
const input = inputs[0];
const output = outputs[0];
const hasInput = !(input[0] === undefined);
if (this.started && !hasInput) {
return false;
}
this.started = hasInput;
const resonance = parameters.q[0];
const drive = clamp(Math.exp(parameters.drive[0]), 0.1, 2000);
let cutoff = parameters.frequency[0];
// eslint-disable-next-line no-undef
cutoff = (cutoff * 2 * _PI) / sampleRate;
cutoff = cutoff > 1 ? 1 : cutoff;
const k = Math.min(8, resonance * 0.4);
// drive makeup * resonance volume loss makeup
let makeupgain = (1 / drive) * Math.min(1.75, 1 + k);
for (let n = 0; n < blockSize; n++) {
for (let i = 0; i < input.length; i++) {
const out = this.p3[i] * 0.360891 + this.p32[i] * 0.41729 + this.p33[i] * 0.177896 + this.p34[i] * 0.0439725;
this.p34[i] = this.p33[i];
this.p33[i] = this.p32[i];
this.p32[i] = this.p3[i];
this.p0[i] += (fast_tanh(input[i][n] * drive - k * out) - fast_tanh(this.p0[i])) * cutoff;
this.p1[i] += (fast_tanh(this.p0[i]) - fast_tanh(this.p1[i])) * cutoff;
this.p2[i] += (fast_tanh(this.p1[i]) - fast_tanh(this.p2[i])) * cutoff;
this.p3[i] += (fast_tanh(this.p2[i]) - fast_tanh(this.p3[i])) * cutoff;
output[i][n] = out * makeupgain;
}
}
return true;
}
}
registerProcessor('ladder-processor', LadderProcessor);
class DistortProcessor extends AudioWorkletProcessor {
static get parameterDescriptors() {
return [

View File

@ -2197,6 +2197,75 @@ exports[`runs examples > example "djf" example index 0 1`] = `
exports[`runs examples > example "drawLine" example index 0 1`] = `[]`;
exports[`runs examples > example "drive" example index 0 1`] = `
[
"[ 0/1 → 1/16 | note:36 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 1/16 → 1/8 | note:38 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 1/8 → 3/16 | note:38 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 3/16 → 1/4 | note:31 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 1/4 → 5/16 | note:33 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 5/16 → 3/8 | note:40 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 3/8 → 7/16 | note:41 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 7/16 → 1/2 | note:36 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 1/2 → 9/16 | note:38 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 9/16 → 5/8 | note:38 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 5/8 → 11/16 | note:31 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 11/16 → 3/4 | note:33 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 3/4 → 13/16 | note:40 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 13/16 → 7/8 | note:41 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 7/8 → 15/16 | note:36 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 15/16 → 1/1 | note:38 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 1/1 → 17/16 | note:38 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 17/16 → 9/8 | note:31 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 9/8 → 19/16 | note:33 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 19/16 → 5/4 | note:40 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 5/4 → 21/16 | note:41 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 21/16 → 11/8 | note:36 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 11/8 → 23/16 | note:38 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 23/16 → 3/2 | note:38 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 3/2 → 25/16 | note:31 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 25/16 → 13/8 | note:33 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 13/8 → 27/16 | note:40 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 27/16 → 7/4 | note:41 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 7/4 → 29/16 | note:36 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 29/16 → 15/8 | note:38 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 15/8 → 31/16 | note:38 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 31/16 → 2/1 | note:31 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 2/1 → 33/16 | note:33 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 33/16 → 17/8 | note:40 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 17/8 → 35/16 | note:41 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 35/16 → 9/4 | note:36 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 9/4 → 37/16 | note:38 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 37/16 → 19/8 | note:38 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 19/8 → 39/16 | note:31 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 39/16 → 5/2 | note:33 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 5/2 → 41/16 | note:40 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 41/16 → 21/8 | note:41 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 21/8 → 43/16 | note:36 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 43/16 → 11/4 | note:38 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 11/4 → 45/16 | note:38 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 45/16 → 23/8 | note:31 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 23/8 → 47/16 | note:33 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 47/16 → 3/1 | note:40 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:0.5 ]",
"[ 3/1 → 49/16 | note:41 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 49/16 → 25/8 | note:36 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 25/8 → 51/16 | note:38 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 51/16 → 13/4 | note:38 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 13/4 → 53/16 | note:31 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 53/16 → 27/8 | note:33 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 27/8 → 55/16 | note:40 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 55/16 → 7/2 | note:41 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 7/2 → 57/16 | note:36 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 57/16 → 29/8 | note:38 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 29/8 → 59/16 | note:38 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 59/16 → 15/4 | note:31 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 15/4 → 61/16 | note:33 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 61/16 → 31/8 | note:40 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 31/8 → 63/16 | note:41 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
"[ 63/16 → 4/1 | note:36 s:supersaw lpenv:8 cutoff:150 resonance:0.8 ftype:ladder drive:4 ]",
]
`;
exports[`runs examples > example "dry" example index 0 1`] = `
[
"[ 0/1 → 1/8 | n:0 s:superpiano room:0.7 dry:0 ]",
@ -2877,22 +2946,99 @@ exports[`runs examples > example "fscope" example index 0 1`] = `
exports[`runs examples > example "ftype" example index 0 1`] = `
[
"[ 0/1 → 1/4 | note:c2 s:sawtooth cutoff:500 bpenv:4 ftype:12db ]",
"[ 1/4 → 1/2 | note:e2 s:sawtooth cutoff:500 bpenv:4 ftype:12db ]",
"[ 1/2 → 3/4 | note:f2 s:sawtooth cutoff:500 bpenv:4 ftype:24db ]",
"[ 3/4 → 1/1 | note:g2 s:sawtooth cutoff:500 bpenv:4 ftype:24db ]",
"[ 1/1 → 5/4 | note:c2 s:sawtooth cutoff:500 bpenv:4 ftype:12db ]",
"[ 5/4 → 3/2 | note:e2 s:sawtooth cutoff:500 bpenv:4 ftype:12db ]",
"[ 3/2 → 7/4 | note:f2 s:sawtooth cutoff:500 bpenv:4 ftype:24db ]",
"[ 7/4 → 2/1 | note:g2 s:sawtooth cutoff:500 bpenv:4 ftype:24db ]",
"[ 2/1 → 9/4 | note:c2 s:sawtooth cutoff:500 bpenv:4 ftype:12db ]",
"[ 9/4 → 5/2 | note:e2 s:sawtooth cutoff:500 bpenv:4 ftype:12db ]",
"[ 5/2 → 11/4 | note:f2 s:sawtooth cutoff:500 bpenv:4 ftype:24db ]",
"[ 11/4 → 3/1 | note:g2 s:sawtooth cutoff:500 bpenv:4 ftype:24db ]",
"[ 3/1 → 13/4 | note:c2 s:sawtooth cutoff:500 bpenv:4 ftype:12db ]",
"[ 13/4 → 7/2 | note:e2 s:sawtooth cutoff:500 bpenv:4 ftype:12db ]",
"[ 7/2 → 15/4 | note:f2 s:sawtooth cutoff:500 bpenv:4 ftype:24db ]",
"[ 15/4 → 4/1 | note:g2 s:sawtooth cutoff:500 bpenv:4 ftype:24db ]",
"[ 0/1 → 1/8 | note:f s:sawtooth lpenv:4 cutoff:500 ftype:0 resonance:1 ]",
"[ 1/8 → 1/4 | note:g s:sawtooth lpenv:4 cutoff:500 ftype:0 resonance:1 ]",
"[ 1/4 → 3/8 | note:g s:sawtooth lpenv:4 cutoff:500 ftype:0 resonance:1 ]",
"[ 3/8 → 1/2 | note:c s:sawtooth lpenv:4 cutoff:500 ftype:0 resonance:1 ]",
"[ 1/2 → 5/8 | note:d s:sawtooth lpenv:4 cutoff:500 ftype:0 resonance:1 ]",
"[ 5/8 → 3/4 | note:a s:sawtooth lpenv:4 cutoff:500 ftype:0 resonance:1 ]",
"[ 3/4 → 7/8 | note:a# s:sawtooth lpenv:4 cutoff:500 ftype:0 resonance:1 ]",
"[ 7/8 → 1/1 | note:f s:sawtooth lpenv:4 cutoff:500 ftype:0 resonance:1 ]",
"[ 1/1 → 9/8 | note:g s:sawtooth lpenv:4 cutoff:500 ftype:1 resonance:1 ]",
"[ 9/8 → 5/4 | note:g s:sawtooth lpenv:4 cutoff:500 ftype:1 resonance:1 ]",
"[ 5/4 → 11/8 | note:c s:sawtooth lpenv:4 cutoff:500 ftype:1 resonance:1 ]",
"[ 11/8 → 3/2 | note:d s:sawtooth lpenv:4 cutoff:500 ftype:1 resonance:1 ]",
"[ 3/2 → 13/8 | note:a s:sawtooth lpenv:4 cutoff:500 ftype:1 resonance:1 ]",
"[ 13/8 → 7/4 | note:a# s:sawtooth lpenv:4 cutoff:500 ftype:1 resonance:1 ]",
"[ 7/4 → 15/8 | note:f s:sawtooth lpenv:4 cutoff:500 ftype:1 resonance:1 ]",
"[ 15/8 → 2/1 | note:g s:sawtooth lpenv:4 cutoff:500 ftype:1 resonance:1 ]",
"[ 2/1 → 17/8 | note:g s:sawtooth lpenv:4 cutoff:500 ftype:2 resonance:1 ]",
"[ 17/8 → 9/4 | note:c s:sawtooth lpenv:4 cutoff:500 ftype:2 resonance:1 ]",
"[ 9/4 → 19/8 | note:d s:sawtooth lpenv:4 cutoff:500 ftype:2 resonance:1 ]",
"[ 19/8 → 5/2 | note:a s:sawtooth lpenv:4 cutoff:500 ftype:2 resonance:1 ]",
"[ 5/2 → 21/8 | note:a# s:sawtooth lpenv:4 cutoff:500 ftype:2 resonance:1 ]",
"[ 21/8 → 11/4 | note:f s:sawtooth lpenv:4 cutoff:500 ftype:2 resonance:1 ]",
"[ 11/4 → 23/8 | note:g s:sawtooth lpenv:4 cutoff:500 ftype:2 resonance:1 ]",
"[ 23/8 → 3/1 | note:g s:sawtooth lpenv:4 cutoff:500 ftype:2 resonance:1 ]",
"[ 3/1 → 25/8 | note:c s:sawtooth lpenv:4 cutoff:500 ftype:0 resonance:1 ]",
"[ 25/8 → 13/4 | note:d s:sawtooth lpenv:4 cutoff:500 ftype:0 resonance:1 ]",
"[ 13/4 → 27/8 | note:a s:sawtooth lpenv:4 cutoff:500 ftype:0 resonance:1 ]",
"[ 27/8 → 7/2 | note:a# s:sawtooth lpenv:4 cutoff:500 ftype:0 resonance:1 ]",
"[ 7/2 → 29/8 | note:f s:sawtooth lpenv:4 cutoff:500 ftype:0 resonance:1 ]",
"[ 29/8 → 15/4 | note:g s:sawtooth lpenv:4 cutoff:500 ftype:0 resonance:1 ]",
"[ 15/4 → 31/8 | note:g s:sawtooth lpenv:4 cutoff:500 ftype:0 resonance:1 ]",
"[ 31/8 → 4/1 | note:c s:sawtooth lpenv:4 cutoff:500 ftype:0 resonance:1 ]",
]
`;
exports[`runs examples > example "ftype" example index 1 1`] = `
[
"[ 0/1 → 1/14 | note:c s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 1/14 → 1/7 | note:f s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 1/7 → 3/14 | note:g s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 3/14 → 2/7 | note:g s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 2/7 → 5/14 | note:a s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 5/14 → 3/7 | note:c s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 3/7 → 1/2 | note:d4 s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 1/2 → 4/7 | note:c s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 4/7 → 9/14 | note:f s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 9/14 → 5/7 | note:g s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 5/7 → 11/14 | note:g s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 11/14 → 6/7 | note:a s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 6/7 → 13/14 | note:c s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 13/14 → 1/1 | note:d4 s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 1/1 → 15/14 | note:c s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:12db ]",
"[ 15/14 → 8/7 | note:f s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:12db ]",
"[ 8/7 → 17/14 | note:g s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:12db ]",
"[ 17/14 → 9/7 | note:g s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:12db ]",
"[ 9/7 → 19/14 | note:a s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:12db ]",
"[ 19/14 → 10/7 | note:c s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:12db ]",
"[ 10/7 → 3/2 | note:d4 s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:12db ]",
"[ 3/2 → 11/7 | note:c s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:12db ]",
"[ 11/7 → 23/14 | note:f s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:12db ]",
"[ 23/14 → 12/7 | note:g s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:12db ]",
"[ 12/7 → 25/14 | note:g s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:12db ]",
"[ 25/14 → 13/7 | note:a s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:12db ]",
"[ 13/7 → 27/14 | note:c s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:12db ]",
"[ 27/14 → 2/1 | note:d4 s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:12db ]",
"[ 2/1 → 29/14 | note:c s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:24db ]",
"[ 29/14 → 15/7 | note:f s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:24db ]",
"[ 15/7 → 31/14 | note:g s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:24db ]",
"[ 31/14 → 16/7 | note:g s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:24db ]",
"[ 16/7 → 33/14 | note:a s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:24db ]",
"[ 33/14 → 17/7 | note:c s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:24db ]",
"[ 17/7 → 5/2 | note:d4 s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:24db ]",
"[ 5/2 → 18/7 | note:c s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:24db ]",
"[ 18/7 → 37/14 | note:f s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:24db ]",
"[ 37/14 → 19/7 | note:g s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:24db ]",
"[ 19/7 → 39/14 | note:g s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:24db ]",
"[ 39/14 → 20/7 | note:a s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:24db ]",
"[ 20/7 → 41/14 | note:c s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:24db ]",
"[ 41/14 → 3/1 | note:d4 s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:24db ]",
"[ 3/1 → 43/14 | note:c s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 43/14 → 22/7 | note:f s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 22/7 → 45/14 | note:g s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 45/14 → 23/7 | note:g s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 23/7 → 47/14 | note:a s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 47/14 → 24/7 | note:c s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 24/7 → 7/2 | note:d4 s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 7/2 → 25/7 | note:c s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 25/7 → 51/14 | note:f s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 51/14 → 26/7 | note:g s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 26/7 → 53/14 | note:g s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 53/14 → 27/7 | note:a s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 27/7 → 55/14 | note:c s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
"[ 55/14 → 4/1 | note:d4 s:sawtooth cutoff:200 fanchor:0 lpenv:3 resonance:1 ftype:ladder ]",
]
`;
@ -5035,72 +5181,6 @@ exports[`runs examples > example "ply" example index 0 1`] = `
]
`;
exports[`runs examples > example "polymeter" example index 0 1`] = `
[
"[ 0/1 → 1/3 | c ]",
"[ 0/1 → 1/3 | c2 ]",
"[ 1/3 → 2/3 | eb ]",
"[ 1/3 → 2/3 | g2 ]",
"[ 2/3 → 1/1 | g ]",
"[ 2/3 → 1/1 | c2 ]",
"[ 1/1 → 4/3 | c ]",
"[ 1/1 → 4/3 | g2 ]",
"[ 4/3 → 5/3 | eb ]",
"[ 4/3 → 5/3 | c2 ]",
"[ 5/3 → 2/1 | g ]",
"[ 5/3 → 2/1 | g2 ]",
"[ 2/1 → 7/3 | c ]",
"[ 2/1 → 7/3 | c2 ]",
"[ 7/3 → 8/3 | eb ]",
"[ 7/3 → 8/3 | g2 ]",
"[ 8/3 → 3/1 | g ]",
"[ 8/3 → 3/1 | c2 ]",
"[ 3/1 → 10/3 | c ]",
"[ 3/1 → 10/3 | g2 ]",
"[ 10/3 → 11/3 | eb ]",
"[ 10/3 → 11/3 | c2 ]",
"[ 11/3 → 4/1 | g ]",
"[ 11/3 → 4/1 | g2 ]",
]
`;
exports[`runs examples > example "polymeterSteps" example index 0 1`] = `
[
"[ 0/1 → 1/4 | c ]",
"[ 0/1 → 1/4 | e ]",
"[ 1/4 → 1/2 | d ]",
"[ 1/4 → 1/2 | f ]",
"[ 1/2 → 3/4 | c ]",
"[ 1/2 → 3/4 | g ]",
"[ 3/4 → 1/1 | d ]",
"[ 3/4 → 1/1 | e ]",
"[ 1/1 → 5/4 | c ]",
"[ 1/1 → 5/4 | f ]",
"[ 5/4 → 3/2 | d ]",
"[ 5/4 → 3/2 | g ]",
"[ 3/2 → 7/4 | c ]",
"[ 3/2 → 7/4 | e ]",
"[ 7/4 → 2/1 | d ]",
"[ 7/4 → 2/1 | f ]",
"[ 2/1 → 9/4 | c ]",
"[ 2/1 → 9/4 | g ]",
"[ 9/4 → 5/2 | d ]",
"[ 9/4 → 5/2 | e ]",
"[ 5/2 → 11/4 | c ]",
"[ 5/2 → 11/4 | f ]",
"[ 11/4 → 3/1 | d ]",
"[ 11/4 → 3/1 | g ]",
"[ 3/1 → 13/4 | c ]",
"[ 3/1 → 13/4 | e ]",
"[ 13/4 → 7/2 | d ]",
"[ 13/4 → 7/2 | f ]",
"[ 7/2 → 15/4 | c ]",
"[ 7/2 → 15/4 | g ]",
"[ 15/4 → 4/1 | d ]",
"[ 15/4 → 4/1 | e ]",
]
`;
exports[`runs examples > example "postgain" example index 0 1`] = `
[
"[ 0/1 → 1/8 | s:hh compressor:-20 compressorRatio:20 compressorKnee:10 compressorAttack:0.002 compressorRelease:0.02 postgain:1.5 ]",
@ -7216,31 +7296,6 @@ exports[`runs examples > example "stack" example index 0 2`] = `
]
`;
exports[`runs examples > example "stepcat" example index 0 1`] = `
[
"[ 0/1 → 1/5 | s:bd ]",
"[ 1/5 → 2/5 | s:cp ]",
"[ 2/5 → 3/5 | s:bd ]",
"[ 3/5 → 4/5 | s:mt ]",
"[ 4/5 → 1/1 | s:bd ]",
"[ 1/1 → 6/5 | s:bd ]",
"[ 6/5 → 7/5 | s:cp ]",
"[ 7/5 → 8/5 | s:bd ]",
"[ 8/5 → 9/5 | s:mt ]",
"[ 9/5 → 2/1 | s:bd ]",
"[ 2/1 → 11/5 | s:bd ]",
"[ 11/5 → 12/5 | s:cp ]",
"[ 12/5 → 13/5 | s:bd ]",
"[ 13/5 → 14/5 | s:mt ]",
"[ 14/5 → 3/1 | s:bd ]",
"[ 3/1 → 16/5 | s:bd ]",
"[ 16/5 → 17/5 | s:cp ]",
"[ 17/5 → 18/5 | s:bd ]",
"[ 18/5 → 19/5 | s:mt ]",
"[ 19/5 → 4/1 | s:bd ]",
]
`;
exports[`runs examples > example "steps" example index 0 1`] = `
[
"[ 0/1 → 1/4 | s:bd ]",
@ -7554,65 +7609,6 @@ exports[`runs examples > example "swingBy" example index 0 1`] = `
]
`;
exports[`runs examples > example "timecat" example index 0 1`] = `
[
"[ 0/1 → 3/4 | note:e3 ]",
"[ 3/4 → 1/1 | note:g3 ]",
"[ 1/1 → 7/4 | note:e3 ]",
"[ 7/4 → 2/1 | note:g3 ]",
"[ 2/1 → 11/4 | note:e3 ]",
"[ 11/4 → 3/1 | note:g3 ]",
"[ 3/1 → 15/4 | note:e3 ]",
"[ 15/4 → 4/1 | note:g3 ]",
]
`;
exports[`runs examples > example "timecat" example index 1 1`] = `
[
"[ 0/1 → 1/5 | s:bd ]",
"[ 1/5 → 2/5 | s:sd ]",
"[ 2/5 → 3/5 | s:cp ]",
"[ 3/5 → 4/5 | s:hh ]",
"[ 4/5 → 1/1 | s:hh ]",
"[ 1/1 → 6/5 | s:bd ]",
"[ 6/5 → 7/5 | s:sd ]",
"[ 7/5 → 8/5 | s:cp ]",
"[ 8/5 → 9/5 | s:hh ]",
"[ 9/5 → 2/1 | s:hh ]",
"[ 2/1 → 11/5 | s:bd ]",
"[ 11/5 → 12/5 | s:sd ]",
"[ 12/5 → 13/5 | s:cp ]",
"[ 13/5 → 14/5 | s:hh ]",
"[ 14/5 → 3/1 | s:hh ]",
"[ 3/1 → 16/5 | s:bd ]",
"[ 16/5 → 17/5 | s:sd ]",
"[ 17/5 → 18/5 | s:cp ]",
"[ 18/5 → 19/5 | s:hh ]",
"[ 19/5 → 4/1 | s:hh ]",
]
`;
exports[`runs examples > example "toTactus" example index 0 1`] = `
[
"[ 0/1 → 1/4 | s:bd ]",
"[ 1/4 → 1/2 | s:sd ]",
"[ 1/2 → 3/4 | s:cp ]",
"[ 3/4 → 1/1 | s:bd ]",
"[ 1/1 → 5/4 | s:sd ]",
"[ 5/4 → 3/2 | s:cp ]",
"[ 3/2 → 7/4 | s:bd ]",
"[ 7/4 → 2/1 | s:sd ]",
"[ 2/1 → 9/4 | s:cp ]",
"[ 9/4 → 5/2 | s:bd ]",
"[ 5/2 → 11/4 | s:sd ]",
"[ 11/4 → 3/1 | s:cp ]",
"[ 3/1 → 13/4 | s:bd ]",
"[ 13/4 → 7/2 | s:sd ]",
"[ 7/2 → 15/4 | s:cp ]",
"[ 15/4 → 4/1 | s:bd ]",
]
`;
exports[`runs examples > example "transpose" example index 0 1`] = `
[
"[ 0/1 → 1/4 | note:C2 ]",

File diff suppressed because it is too large Load Diff