mirror of
https://codeberg.org/uzu/strudel
synced 2026-10-09 10:02:17 -04:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 57c3c21334 | |||
| 957427fd33 | |||
| 4cc453c640 | |||
| 74e27ca94f | |||
| 7dfd7dbcdc | |||
| 2cba1dcb31 |
@@ -413,6 +413,32 @@ export const { begin } = registerControl('begin');
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export const { end } = registerControl('end');
|
export const { end } = registerControl('end');
|
||||||
|
/**
|
||||||
|
* the offset of the sample buffer in seconds
|
||||||
|
*
|
||||||
|
* @memberof Pattern
|
||||||
|
* @name beginSeconds
|
||||||
|
* @param {number | Pattern} seconds
|
||||||
|
* @example
|
||||||
|
* samples('github:switchangel/pad')
|
||||||
|
* s("swpad!4").clip(1).beginSeconds("2 5 .2 3").fast(2)
|
||||||
|
* @example
|
||||||
|
* samples('github:switchangel/pad')
|
||||||
|
* $: s("swpad!16").beginseconds(time).dec(.1)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export const { beginSeconds, beginseconds } = registerControl('beginSeconds', 'beginseconds');
|
||||||
|
/**
|
||||||
|
* The end of the sample buffer in seconds
|
||||||
|
*
|
||||||
|
* @memberof Pattern
|
||||||
|
* @name endSeconds
|
||||||
|
* @param {number | Pattern} seconds
|
||||||
|
* @example
|
||||||
|
* s("bd*2,oh*4").endSeconds("<.1 .05 .2 1>").fast(2)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export const { endSeconds, endseconds } = registerControl('endSeconds', 'endseconds');
|
||||||
/**
|
/**
|
||||||
* Loops the sample.
|
* Loops the sample.
|
||||||
* Note that the tempo of the loop is not synced with the cycle tempo.
|
* Note that the tempo of the loop is not synced with the cycle tempo.
|
||||||
|
|||||||
@@ -5,9 +5,8 @@ let debounce = 1000,
|
|||||||
lastTime;
|
lastTime;
|
||||||
|
|
||||||
export function errorLogger(e, origin = 'cyclist') {
|
export function errorLogger(e, origin = 'cyclist') {
|
||||||
if (process.env.NODE_ENV === 'development') {
|
//TODO: add some kind of debug flag that enables this while in dev mode
|
||||||
console.error(e);
|
// console.error(e);
|
||||||
}
|
|
||||||
logger(`[${origin}] error: ${e.message}`);
|
logger(`[${origin}] error: ${e.message}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-16
@@ -74,14 +74,6 @@ export function repl({
|
|||||||
return silence;
|
return silence;
|
||||||
};
|
};
|
||||||
|
|
||||||
// helper to get a patternified pure value out
|
|
||||||
function unpure(pat) {
|
|
||||||
if (pat._Pattern) {
|
|
||||||
return pat.__pure;
|
|
||||||
}
|
|
||||||
return pat;
|
|
||||||
}
|
|
||||||
|
|
||||||
const setPattern = async (pattern, autostart = true) => {
|
const setPattern = async (pattern, autostart = true) => {
|
||||||
pattern = editPattern?.(pattern) || pattern;
|
pattern = editPattern?.(pattern) || pattern;
|
||||||
await scheduler.setPattern(pattern, autostart);
|
await scheduler.setPattern(pattern, autostart);
|
||||||
@@ -93,10 +85,7 @@ export function repl({
|
|||||||
const start = () => scheduler.start();
|
const start = () => scheduler.start();
|
||||||
const pause = () => scheduler.pause();
|
const pause = () => scheduler.pause();
|
||||||
const toggle = () => scheduler.toggle();
|
const toggle = () => scheduler.toggle();
|
||||||
const setCps = (cps) => {
|
const setCps = (cps) => scheduler.setCps(cps);
|
||||||
scheduler.setCps(unpure(cps));
|
|
||||||
return silence;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Changes the global tempo to the given cycles per minute
|
* Changes the global tempo to the given cycles per minute
|
||||||
@@ -108,10 +97,7 @@ export function repl({
|
|||||||
* setcpm(140/4) // =140 bpm in 4/4
|
* setcpm(140/4) // =140 bpm in 4/4
|
||||||
* $: s("bd*4,[- sd]*2").bank('tr707')
|
* $: s("bd*4,[- sd]*2").bank('tr707')
|
||||||
*/
|
*/
|
||||||
const setCpm = (cpm) => {
|
const setCpm = (cpm) => scheduler.setCps(cpm / 60);
|
||||||
scheduler.setCps(unpure(cpm) / 60);
|
|
||||||
return silence;
|
|
||||||
};
|
|
||||||
|
|
||||||
// TODO - not documented as jsdoc examples as the test framework doesn't simulate enough context for `each` and `all`..
|
// TODO - not documented as jsdoc examples as the test framework doesn't simulate enough context for `each` and `all`..
|
||||||
|
|
||||||
|
|||||||
@@ -152,7 +152,9 @@ export const itri2 = fastcat(isaw2, saw2);
|
|||||||
*
|
*
|
||||||
* @return {Pattern}
|
* @return {Pattern}
|
||||||
*/
|
*/
|
||||||
export const time = signal(id);
|
export const time = signal((x) => {
|
||||||
|
return x.valueOf();
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The mouse's x position value ranges from 0 to 1.
|
* The mouse's x position value ranges from 0 to 1.
|
||||||
|
|||||||
@@ -877,7 +877,7 @@ describe('Pattern', () => {
|
|||||||
.squeezeJoin()
|
.squeezeJoin()
|
||||||
.queryArc(3, 4)
|
.queryArc(3, 4)
|
||||||
.map((x) => x.value),
|
.map((x) => x.value),
|
||||||
).toStrictEqual([Fraction(3)]);
|
).toStrictEqual([3]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
describe('ply', () => {
|
describe('ply', () => {
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ function evaluator(node, scope) {
|
|||||||
let pat;
|
let pat;
|
||||||
if (type === 'plain' && typeof variable !== 'undefined') {
|
if (type === 'plain' && typeof variable !== 'undefined') {
|
||||||
// some function names are not patternable, so we skip reification here
|
// some function names are not patternable, so we skip reification here
|
||||||
if (['!', 'extend', '@', 'expand', 'square', 'angle', 'all', 'setcpm', 'setcps'].includes(value)) {
|
if (['!', 'extend', '@', 'expand', 'square', 'angle'].includes(value)) {
|
||||||
return variable;
|
return variable;
|
||||||
}
|
}
|
||||||
pat = reify(variable);
|
pat = reify(variable);
|
||||||
|
|||||||
+16
-26
@@ -4,13 +4,21 @@ OSC output for strudel patterns! Currently only tested with super collider / sup
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Assuming you have [node.js](https://nodejs.org/) installed, you can run the osc bridge server via:
|
OSC will only work if you run the REPL locally + the OSC server besides it:
|
||||||
|
|
||||||
```sh
|
From the project root:
|
||||||
npx @strudel/osc
|
|
||||||
|
```js
|
||||||
|
npm run repl
|
||||||
```
|
```
|
||||||
|
|
||||||
You should see something like:
|
and in a seperate shell:
|
||||||
|
|
||||||
|
```js
|
||||||
|
npm run osc
|
||||||
|
```
|
||||||
|
|
||||||
|
This should give you
|
||||||
|
|
||||||
```log
|
```log
|
||||||
osc client running on port 57120
|
osc client running on port 57120
|
||||||
@@ -18,32 +26,14 @@ osc server running on port 57121
|
|||||||
websocket server running on port 8080
|
websocket server running on port 8080
|
||||||
```
|
```
|
||||||
|
|
||||||
### --port
|
Now open Supercollider (with the super dirt startup file)
|
||||||
|
|
||||||
By default it will use port 57120 for the osc client, which is what [superdirt](https://github.com/musikinformatik/SuperDirt) uses. You can change it via the `--port` option:
|
Now open the REPL and type:
|
||||||
|
|
||||||
```sh
|
|
||||||
npx @strudel/osc --port 7771 # classic dirt
|
|
||||||
```
|
|
||||||
|
|
||||||
### --debug
|
|
||||||
|
|
||||||
To log all incoming osc messages, add the `--debug` flag:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npx @strudel/osc --debug
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage in Strudel
|
|
||||||
|
|
||||||
To test it in strudel, you have can use `all(osc)` to send all events through osc:
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
$: s("bd*4")
|
s("<bd sd> hh").osc()
|
||||||
|
|
||||||
all(osc)
|
|
||||||
```
|
```
|
||||||
|
|
||||||
[open in repl](https://strudel.cc/#JDogcygiYmQqNCIpCgphbGwob3NjKQ%3D%3D)
|
or just [click here](https://strudel.cc/#cygiPGJkIHNkPiBoaCIpLm9zYygp)...
|
||||||
|
|
||||||
You can read more about [how to use Superdirt with Strudel the Tutorial](https://strudel.cc/learn/input-output/#superdirt-api)
|
You can read more about [how to use Superdirt with Strudel the Tutorial](https://strudel.cc/learn/input-output/#superdirt-api)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ This program is free software: you can redistribute it and/or modify it under th
|
|||||||
|
|
||||||
import OSC from 'osc-js';
|
import OSC from 'osc-js';
|
||||||
|
|
||||||
import { logger, parseNumeral, register, isNote, noteToMidi, ClockCollator } from '@strudel/core';
|
import { logger, parseNumeral, Pattern, isNote, noteToMidi, ClockCollator } from '@strudel/core';
|
||||||
|
|
||||||
let connection; // Promise<OSC>
|
let connection; // Promise<OSC>
|
||||||
function connect() {
|
function connect() {
|
||||||
@@ -81,4 +81,6 @@ export async function oscTrigger(hap, currentTime, cps = 1, targetTime) {
|
|||||||
* @memberof Pattern
|
* @memberof Pattern
|
||||||
* @returns Pattern
|
* @returns Pattern
|
||||||
*/
|
*/
|
||||||
export const osc = register('osc', (pat) => pat.onTrigger(oscTrigger));
|
Pattern.prototype.osc = function () {
|
||||||
|
return this.onTrigger(oscTrigger);
|
||||||
|
};
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "@strudel/osc",
|
"name": "@strudel/osc",
|
||||||
"version": "1.2.10",
|
"version": "1.2.4",
|
||||||
"description": "OSC messaging for strudel",
|
"description": "OSC messaging for strudel",
|
||||||
"main": "osc.mjs",
|
"main": "osc.mjs",
|
||||||
"bin": "./server.js",
|
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"main": "dist/index.mjs"
|
"main": "dist/index.mjs"
|
||||||
|
|||||||
+2
-43
@@ -1,5 +1,3 @@
|
|||||||
#!/usr/bin/env node
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
server.js - <short description TODO>
|
server.js - <short description TODO>
|
||||||
Copyright (C) 2022 Strudel contributors - see <https://codeberg.org/uzu/strudel/src/branch/main/packages/osc/server.js>
|
Copyright (C) 2022 Strudel contributors - see <https://codeberg.org/uzu/strudel/src/branch/main/packages/osc/server.js>
|
||||||
@@ -8,19 +6,6 @@ This program is free software: you can redistribute it and/or modify it under th
|
|||||||
|
|
||||||
import OSC from 'osc-js';
|
import OSC from 'osc-js';
|
||||||
|
|
||||||
const args = process.argv.slice(2);
|
|
||||||
function getArgValue(flag) {
|
|
||||||
const i = args.indexOf(flag);
|
|
||||||
if (i !== -1) {
|
|
||||||
const nextIsFlag = args[i + 1]?.startsWith('--') ?? true;
|
|
||||||
if (nextIsFlag) return true;
|
|
||||||
return args[i + 1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let udpClientPort = Number(getArgValue('--port')) || 57120;
|
|
||||||
let debug = Number(getArgValue('--debug')) || 0;
|
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
receiver: 'ws', // @param {string} Where messages sent via 'send' method will be delivered to, 'ws' for Websocket clients, 'udp' for udp client
|
receiver: 'ws', // @param {string} Where messages sent via 'send' method will be delivered to, 'ws' for Websocket clients, 'udp' for udp client
|
||||||
udpServer: {
|
udpServer: {
|
||||||
@@ -32,7 +17,7 @@ const config = {
|
|||||||
},
|
},
|
||||||
udpClient: {
|
udpClient: {
|
||||||
host: 'localhost', // @param {string} Hostname of udp client for messaging
|
host: 'localhost', // @param {string} Hostname of udp client for messaging
|
||||||
port: udpClientPort, // @param {number} Port of udp client for messaging
|
port: 57120, // @param {number} Port of udp client for messaging
|
||||||
},
|
},
|
||||||
wsServer: {
|
wsServer: {
|
||||||
host: 'localhost', // @param {string} Hostname of WebSocket server
|
host: 'localhost', // @param {string} Hostname of WebSocket server
|
||||||
@@ -42,34 +27,8 @@ const config = {
|
|||||||
|
|
||||||
const osc = new OSC({ plugin: new OSC.BridgePlugin(config) });
|
const osc = new OSC({ plugin: new OSC.BridgePlugin(config) });
|
||||||
|
|
||||||
if (debug) {
|
osc.open(); // start a WebSocket server on port 8080
|
||||||
osc.on('*', (message) => {
|
|
||||||
const { address, args } = message;
|
|
||||||
let str = '';
|
|
||||||
for (let i = 0; i < args.length; i += 2) {
|
|
||||||
str += `${args[i]}: ${args[i + 1]} `;
|
|
||||||
}
|
|
||||||
console.log(`${address} ${str}`);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
osc.on('error', (message) => {
|
|
||||||
if (message.toString().includes('EADDRINUSE')) {
|
|
||||||
console.log(`------ ERROR -------
|
|
||||||
a server is already running on port 57121! to stop it:
|
|
||||||
1. run "lsof -ti :57121 | xargs kill -9" (macos / linux)
|
|
||||||
2. re-run the osc server
|
|
||||||
`);
|
|
||||||
} else {
|
|
||||||
console.log(message);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
osc.open();
|
|
||||||
|
|
||||||
console.log('osc client running on port', config.udpClient.port);
|
console.log('osc client running on port', config.udpClient.port);
|
||||||
console.log('osc server running on port', config.udpServer.port);
|
console.log('osc server running on port', config.udpServer.port);
|
||||||
console.log('websocket server running on port', config.wsServer.port);
|
console.log('websocket server running on port', config.wsServer.port);
|
||||||
if (debug) {
|
|
||||||
console.log('debug logs enabled. incoming messages will appear below');
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
let log = (msg) => console.log(msg);
|
let log = (msg) => console.log(msg);
|
||||||
|
|
||||||
export function errorLogger(e, origin = 'superdough') {
|
export function errorLogger(e, origin = 'cyclist') {
|
||||||
if (process.env.NODE_ENV === 'development') {
|
//TODO: add some kind of debug flag that enables this while in dev mode
|
||||||
console.error(e);
|
// console.error(e);
|
||||||
}
|
|
||||||
logger(`[${origin}] error: ${e.message}`);
|
logger(`[${origin}] error: ${e.message}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -78,13 +78,23 @@ export const getSampleBufferSource = async (hapValue, bank, resolveUrl) => {
|
|||||||
const bufferSource = ac.createBufferSource();
|
const bufferSource = ac.createBufferSource();
|
||||||
bufferSource.buffer = buffer;
|
bufferSource.buffer = buffer;
|
||||||
bufferSource.playbackRate.value = playbackRate;
|
bufferSource.playbackRate.value = playbackRate;
|
||||||
|
const { s, loopBegin = 0, loopEnd = 1, begin, end, beginSeconds, endSeconds } = hapValue;
|
||||||
const { s, loopBegin = 0, loopEnd = 1, begin = 0, end = 1 } = hapValue;
|
let offset = 0;
|
||||||
|
let endTime = bufferSource.buffer.duration;
|
||||||
// "The computation of the offset into the sound is performed using the sound buffer's natural sample rate,
|
// "The computation of the offset into the sound is performed using the sound buffer's natural sample rate,
|
||||||
// rather than the current playback rate, so even if the sound is playing at twice its normal speed,
|
// 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."
|
// the midway point through a 10-second audio buffer is still 5."
|
||||||
const offset = begin * bufferSource.buffer.duration;
|
if (begin != null) {
|
||||||
|
offset = begin * bufferSource.buffer.duration;
|
||||||
|
} else if (beginSeconds != null) {
|
||||||
|
offset = beginSeconds;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (end != null) {
|
||||||
|
endTime = end * bufferSource.buffer.duration;
|
||||||
|
} else if (endSeconds != null) {
|
||||||
|
endTime = endSeconds;
|
||||||
|
}
|
||||||
|
|
||||||
const loop = s.startsWith('wt_') ? 1 : hapValue.loop;
|
const loop = s.startsWith('wt_') ? 1 : hapValue.loop;
|
||||||
if (loop) {
|
if (loop) {
|
||||||
@@ -93,7 +103,7 @@ export const getSampleBufferSource = async (hapValue, bank, resolveUrl) => {
|
|||||||
bufferSource.loopEnd = loopEnd * bufferSource.buffer.duration - offset;
|
bufferSource.loopEnd = loopEnd * bufferSource.buffer.duration - offset;
|
||||||
}
|
}
|
||||||
const bufferDuration = bufferSource.buffer.duration / bufferSource.playbackRate.value;
|
const bufferDuration = bufferSource.buffer.duration / bufferSource.playbackRate.value;
|
||||||
const sliceDuration = (end - begin) * bufferDuration;
|
const sliceDuration = (endTime - offset) / bufferSource.playbackRate.value;
|
||||||
return { bufferSource, offset, bufferDuration, sliceDuration };
|
return { bufferSource, offset, bufferDuration, sliceDuration };
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -347,6 +357,7 @@ export async function onTriggerSample(t, value, onended, bank, resolveUrl) {
|
|||||||
out.disconnect();
|
out.disconnect();
|
||||||
onended();
|
onended();
|
||||||
};
|
};
|
||||||
|
|
||||||
let envEnd = holdEnd + release + 0.01;
|
let envEnd = holdEnd + release + 0.01;
|
||||||
bufferSource.stop(envEnd);
|
bufferSource.stop(envEnd);
|
||||||
const stop = (endTime) => {
|
const stop = (endTime) => {
|
||||||
|
|||||||
@@ -1051,6 +1051,112 @@ exports[`runs examples > example "begin" example index 0 1`] = `
|
|||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
exports[`runs examples > example "beginSeconds" example index 0 1`] = `
|
||||||
|
[
|
||||||
|
"[ 0/1 → 1/8 | s:swpad clip:1 beginSeconds:2 ]",
|
||||||
|
"[ 1/8 → 1/4 | s:swpad clip:1 beginSeconds:5 ]",
|
||||||
|
"[ 1/4 → 3/8 | s:swpad clip:1 beginSeconds:0.2 ]",
|
||||||
|
"[ 3/8 → 1/2 | s:swpad clip:1 beginSeconds:3 ]",
|
||||||
|
"[ 1/2 → 5/8 | s:swpad clip:1 beginSeconds:2 ]",
|
||||||
|
"[ 5/8 → 3/4 | s:swpad clip:1 beginSeconds:5 ]",
|
||||||
|
"[ 3/4 → 7/8 | s:swpad clip:1 beginSeconds:0.2 ]",
|
||||||
|
"[ 7/8 → 1/1 | s:swpad clip:1 beginSeconds:3 ]",
|
||||||
|
"[ 1/1 → 9/8 | s:swpad clip:1 beginSeconds:2 ]",
|
||||||
|
"[ 9/8 → 5/4 | s:swpad clip:1 beginSeconds:5 ]",
|
||||||
|
"[ 5/4 → 11/8 | s:swpad clip:1 beginSeconds:0.2 ]",
|
||||||
|
"[ 11/8 → 3/2 | s:swpad clip:1 beginSeconds:3 ]",
|
||||||
|
"[ 3/2 → 13/8 | s:swpad clip:1 beginSeconds:2 ]",
|
||||||
|
"[ 13/8 → 7/4 | s:swpad clip:1 beginSeconds:5 ]",
|
||||||
|
"[ 7/4 → 15/8 | s:swpad clip:1 beginSeconds:0.2 ]",
|
||||||
|
"[ 15/8 → 2/1 | s:swpad clip:1 beginSeconds:3 ]",
|
||||||
|
"[ 2/1 → 17/8 | s:swpad clip:1 beginSeconds:2 ]",
|
||||||
|
"[ 17/8 → 9/4 | s:swpad clip:1 beginSeconds:5 ]",
|
||||||
|
"[ 9/4 → 19/8 | s:swpad clip:1 beginSeconds:0.2 ]",
|
||||||
|
"[ 19/8 → 5/2 | s:swpad clip:1 beginSeconds:3 ]",
|
||||||
|
"[ 5/2 → 21/8 | s:swpad clip:1 beginSeconds:2 ]",
|
||||||
|
"[ 21/8 → 11/4 | s:swpad clip:1 beginSeconds:5 ]",
|
||||||
|
"[ 11/4 → 23/8 | s:swpad clip:1 beginSeconds:0.2 ]",
|
||||||
|
"[ 23/8 → 3/1 | s:swpad clip:1 beginSeconds:3 ]",
|
||||||
|
"[ 3/1 → 25/8 | s:swpad clip:1 beginSeconds:2 ]",
|
||||||
|
"[ 25/8 → 13/4 | s:swpad clip:1 beginSeconds:5 ]",
|
||||||
|
"[ 13/4 → 27/8 | s:swpad clip:1 beginSeconds:0.2 ]",
|
||||||
|
"[ 27/8 → 7/2 | s:swpad clip:1 beginSeconds:3 ]",
|
||||||
|
"[ 7/2 → 29/8 | s:swpad clip:1 beginSeconds:2 ]",
|
||||||
|
"[ 29/8 → 15/4 | s:swpad clip:1 beginSeconds:5 ]",
|
||||||
|
"[ 15/4 → 31/8 | s:swpad clip:1 beginSeconds:0.2 ]",
|
||||||
|
"[ 31/8 → 4/1 | s:swpad clip:1 beginSeconds:3 ]",
|
||||||
|
]
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`runs examples > example "beginSeconds" example index 1 1`] = `
|
||||||
|
[
|
||||||
|
"[ 0/1 → 1/16 | s:swpad beginSeconds:0 decay:0.1 ]",
|
||||||
|
"[ 1/16 → 1/8 | s:swpad beginSeconds:0.0625 decay:0.1 ]",
|
||||||
|
"[ 1/8 → 3/16 | s:swpad beginSeconds:0.125 decay:0.1 ]",
|
||||||
|
"[ 3/16 → 1/4 | s:swpad beginSeconds:0.1875 decay:0.1 ]",
|
||||||
|
"[ 1/4 → 5/16 | s:swpad beginSeconds:0.25 decay:0.1 ]",
|
||||||
|
"[ 5/16 → 3/8 | s:swpad beginSeconds:0.3125 decay:0.1 ]",
|
||||||
|
"[ 3/8 → 7/16 | s:swpad beginSeconds:0.375 decay:0.1 ]",
|
||||||
|
"[ 7/16 → 1/2 | s:swpad beginSeconds:0.4375 decay:0.1 ]",
|
||||||
|
"[ 1/2 → 9/16 | s:swpad beginSeconds:0.5 decay:0.1 ]",
|
||||||
|
"[ 9/16 → 5/8 | s:swpad beginSeconds:0.5625 decay:0.1 ]",
|
||||||
|
"[ 5/8 → 11/16 | s:swpad beginSeconds:0.625 decay:0.1 ]",
|
||||||
|
"[ 11/16 → 3/4 | s:swpad beginSeconds:0.6875 decay:0.1 ]",
|
||||||
|
"[ 3/4 → 13/16 | s:swpad beginSeconds:0.75 decay:0.1 ]",
|
||||||
|
"[ 13/16 → 7/8 | s:swpad beginSeconds:0.8125 decay:0.1 ]",
|
||||||
|
"[ 7/8 → 15/16 | s:swpad beginSeconds:0.875 decay:0.1 ]",
|
||||||
|
"[ 15/16 → 1/1 | s:swpad beginSeconds:0.9375 decay:0.1 ]",
|
||||||
|
"[ 1/1 → 17/16 | s:swpad beginSeconds:1 decay:0.1 ]",
|
||||||
|
"[ 17/16 → 9/8 | s:swpad beginSeconds:1.0625 decay:0.1 ]",
|
||||||
|
"[ 9/8 → 19/16 | s:swpad beginSeconds:1.125 decay:0.1 ]",
|
||||||
|
"[ 19/16 → 5/4 | s:swpad beginSeconds:1.1875 decay:0.1 ]",
|
||||||
|
"[ 5/4 → 21/16 | s:swpad beginSeconds:1.25 decay:0.1 ]",
|
||||||
|
"[ 21/16 → 11/8 | s:swpad beginSeconds:1.3125 decay:0.1 ]",
|
||||||
|
"[ 11/8 → 23/16 | s:swpad beginSeconds:1.375 decay:0.1 ]",
|
||||||
|
"[ 23/16 → 3/2 | s:swpad beginSeconds:1.4375 decay:0.1 ]",
|
||||||
|
"[ 3/2 → 25/16 | s:swpad beginSeconds:1.5 decay:0.1 ]",
|
||||||
|
"[ 25/16 → 13/8 | s:swpad beginSeconds:1.5625 decay:0.1 ]",
|
||||||
|
"[ 13/8 → 27/16 | s:swpad beginSeconds:1.625 decay:0.1 ]",
|
||||||
|
"[ 27/16 → 7/4 | s:swpad beginSeconds:1.6875 decay:0.1 ]",
|
||||||
|
"[ 7/4 → 29/16 | s:swpad beginSeconds:1.75 decay:0.1 ]",
|
||||||
|
"[ 29/16 → 15/8 | s:swpad beginSeconds:1.8125 decay:0.1 ]",
|
||||||
|
"[ 15/8 → 31/16 | s:swpad beginSeconds:1.875 decay:0.1 ]",
|
||||||
|
"[ 31/16 → 2/1 | s:swpad beginSeconds:1.9375 decay:0.1 ]",
|
||||||
|
"[ 2/1 → 33/16 | s:swpad beginSeconds:2 decay:0.1 ]",
|
||||||
|
"[ 33/16 → 17/8 | s:swpad beginSeconds:2.0625 decay:0.1 ]",
|
||||||
|
"[ 17/8 → 35/16 | s:swpad beginSeconds:2.125 decay:0.1 ]",
|
||||||
|
"[ 35/16 → 9/4 | s:swpad beginSeconds:2.1875 decay:0.1 ]",
|
||||||
|
"[ 9/4 → 37/16 | s:swpad beginSeconds:2.25 decay:0.1 ]",
|
||||||
|
"[ 37/16 → 19/8 | s:swpad beginSeconds:2.3125 decay:0.1 ]",
|
||||||
|
"[ 19/8 → 39/16 | s:swpad beginSeconds:2.375 decay:0.1 ]",
|
||||||
|
"[ 39/16 → 5/2 | s:swpad beginSeconds:2.4375 decay:0.1 ]",
|
||||||
|
"[ 5/2 → 41/16 | s:swpad beginSeconds:2.5 decay:0.1 ]",
|
||||||
|
"[ 41/16 → 21/8 | s:swpad beginSeconds:2.5625 decay:0.1 ]",
|
||||||
|
"[ 21/8 → 43/16 | s:swpad beginSeconds:2.625 decay:0.1 ]",
|
||||||
|
"[ 43/16 → 11/4 | s:swpad beginSeconds:2.6875 decay:0.1 ]",
|
||||||
|
"[ 11/4 → 45/16 | s:swpad beginSeconds:2.75 decay:0.1 ]",
|
||||||
|
"[ 45/16 → 23/8 | s:swpad beginSeconds:2.8125 decay:0.1 ]",
|
||||||
|
"[ 23/8 → 47/16 | s:swpad beginSeconds:2.875 decay:0.1 ]",
|
||||||
|
"[ 47/16 → 3/1 | s:swpad beginSeconds:2.9375 decay:0.1 ]",
|
||||||
|
"[ 3/1 → 49/16 | s:swpad beginSeconds:3 decay:0.1 ]",
|
||||||
|
"[ 49/16 → 25/8 | s:swpad beginSeconds:3.0625 decay:0.1 ]",
|
||||||
|
"[ 25/8 → 51/16 | s:swpad beginSeconds:3.125 decay:0.1 ]",
|
||||||
|
"[ 51/16 → 13/4 | s:swpad beginSeconds:3.1875 decay:0.1 ]",
|
||||||
|
"[ 13/4 → 53/16 | s:swpad beginSeconds:3.25 decay:0.1 ]",
|
||||||
|
"[ 53/16 → 27/8 | s:swpad beginSeconds:3.3125 decay:0.1 ]",
|
||||||
|
"[ 27/8 → 55/16 | s:swpad beginSeconds:3.375 decay:0.1 ]",
|
||||||
|
"[ 55/16 → 7/2 | s:swpad beginSeconds:3.4375 decay:0.1 ]",
|
||||||
|
"[ 7/2 → 57/16 | s:swpad beginSeconds:3.5 decay:0.1 ]",
|
||||||
|
"[ 57/16 → 29/8 | s:swpad beginSeconds:3.5625 decay:0.1 ]",
|
||||||
|
"[ 29/8 → 59/16 | s:swpad beginSeconds:3.625 decay:0.1 ]",
|
||||||
|
"[ 59/16 → 15/4 | s:swpad beginSeconds:3.6875 decay:0.1 ]",
|
||||||
|
"[ 15/4 → 61/16 | s:swpad beginSeconds:3.75 decay:0.1 ]",
|
||||||
|
"[ 61/16 → 31/8 | s:swpad beginSeconds:3.8125 decay:0.1 ]",
|
||||||
|
"[ 31/8 → 63/16 | s:swpad beginSeconds:3.875 decay:0.1 ]",
|
||||||
|
"[ 63/16 → 4/1 | s:swpad beginSeconds:3.9375 decay:0.1 ]",
|
||||||
|
]
|
||||||
|
`;
|
||||||
|
|
||||||
exports[`runs examples > example "berlin" example index 0 1`] = `
|
exports[`runs examples > example "berlin" example index 0 1`] = `
|
||||||
[
|
[
|
||||||
"[ 0/1 → 1/16 | note:D3 ]",
|
"[ 0/1 → 1/16 | note:D3 ]",
|
||||||
@@ -3501,6 +3607,59 @@ exports[`runs examples > example "end" example index 0 1`] = `
|
|||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
exports[`runs examples > example "endSeconds" example index 0 1`] = `
|
||||||
|
[
|
||||||
|
"[ 0/1 → 1/8 | s:oh endSeconds:0.1 ]",
|
||||||
|
"[ 0/1 → 1/4 | s:bd endSeconds:0.1 ]",
|
||||||
|
"[ 1/8 → 1/4 | s:oh endSeconds:0.1 ]",
|
||||||
|
"[ 1/4 → 3/8 | s:oh endSeconds:0.1 ]",
|
||||||
|
"[ 1/4 → 1/2 | s:bd endSeconds:0.1 ]",
|
||||||
|
"[ 3/8 → 1/2 | s:oh endSeconds:0.1 ]",
|
||||||
|
"[ 1/2 → 5/8 | s:oh endSeconds:0.05 ]",
|
||||||
|
"[ 1/2 → 3/4 | s:bd endSeconds:0.05 ]",
|
||||||
|
"[ 5/8 → 3/4 | s:oh endSeconds:0.05 ]",
|
||||||
|
"[ 3/4 → 7/8 | s:oh endSeconds:0.05 ]",
|
||||||
|
"[ 3/4 → 1/1 | s:bd endSeconds:0.05 ]",
|
||||||
|
"[ 7/8 → 1/1 | s:oh endSeconds:0.05 ]",
|
||||||
|
"[ 1/1 → 9/8 | s:oh endSeconds:0.2 ]",
|
||||||
|
"[ 1/1 → 5/4 | s:bd endSeconds:0.2 ]",
|
||||||
|
"[ 9/8 → 5/4 | s:oh endSeconds:0.2 ]",
|
||||||
|
"[ 5/4 → 11/8 | s:oh endSeconds:0.2 ]",
|
||||||
|
"[ 5/4 → 3/2 | s:bd endSeconds:0.2 ]",
|
||||||
|
"[ 11/8 → 3/2 | s:oh endSeconds:0.2 ]",
|
||||||
|
"[ 3/2 → 13/8 | s:oh endSeconds:1 ]",
|
||||||
|
"[ 3/2 → 7/4 | s:bd endSeconds:1 ]",
|
||||||
|
"[ 13/8 → 7/4 | s:oh endSeconds:1 ]",
|
||||||
|
"[ 7/4 → 15/8 | s:oh endSeconds:1 ]",
|
||||||
|
"[ 7/4 → 2/1 | s:bd endSeconds:1 ]",
|
||||||
|
"[ 15/8 → 2/1 | s:oh endSeconds:1 ]",
|
||||||
|
"[ 2/1 → 17/8 | s:oh endSeconds:0.1 ]",
|
||||||
|
"[ 2/1 → 9/4 | s:bd endSeconds:0.1 ]",
|
||||||
|
"[ 17/8 → 9/4 | s:oh endSeconds:0.1 ]",
|
||||||
|
"[ 9/4 → 19/8 | s:oh endSeconds:0.1 ]",
|
||||||
|
"[ 9/4 → 5/2 | s:bd endSeconds:0.1 ]",
|
||||||
|
"[ 19/8 → 5/2 | s:oh endSeconds:0.1 ]",
|
||||||
|
"[ 5/2 → 21/8 | s:oh endSeconds:0.05 ]",
|
||||||
|
"[ 5/2 → 11/4 | s:bd endSeconds:0.05 ]",
|
||||||
|
"[ 21/8 → 11/4 | s:oh endSeconds:0.05 ]",
|
||||||
|
"[ 11/4 → 23/8 | s:oh endSeconds:0.05 ]",
|
||||||
|
"[ 11/4 → 3/1 | s:bd endSeconds:0.05 ]",
|
||||||
|
"[ 23/8 → 3/1 | s:oh endSeconds:0.05 ]",
|
||||||
|
"[ 3/1 → 25/8 | s:oh endSeconds:0.2 ]",
|
||||||
|
"[ 3/1 → 13/4 | s:bd endSeconds:0.2 ]",
|
||||||
|
"[ 25/8 → 13/4 | s:oh endSeconds:0.2 ]",
|
||||||
|
"[ 13/4 → 27/8 | s:oh endSeconds:0.2 ]",
|
||||||
|
"[ 13/4 → 7/2 | s:bd endSeconds:0.2 ]",
|
||||||
|
"[ 27/8 → 7/2 | s:oh endSeconds:0.2 ]",
|
||||||
|
"[ 7/2 → 29/8 | s:oh endSeconds:1 ]",
|
||||||
|
"[ 7/2 → 15/4 | s:bd endSeconds:1 ]",
|
||||||
|
"[ 29/8 → 15/4 | s:oh endSeconds:1 ]",
|
||||||
|
"[ 15/4 → 31/8 | s:oh endSeconds:1 ]",
|
||||||
|
"[ 15/4 → 4/1 | s:bd endSeconds:1 ]",
|
||||||
|
"[ 31/8 → 4/1 | s:oh endSeconds:1 ]",
|
||||||
|
]
|
||||||
|
`;
|
||||||
|
|
||||||
exports[`runs examples > example "euclid" example index 0 1`] = `
|
exports[`runs examples > example "euclid" example index 0 1`] = `
|
||||||
[
|
[
|
||||||
"[ 0/1 → 1/8 | note:c3 ]",
|
"[ 0/1 → 1/8 | note:c3 ]",
|
||||||
|
|||||||
Reference in New Issue
Block a user