strudel/packages/core
2026-01-18 22:04:49 +01:00
..
bench Make legacy the default 2025-12-13 17:28:42 -06:00
test try renaming to per / perx / cyclesPer 2025-12-13 16:30:51 +00:00
.npmignore hotfix: npm ignore examples folder 2022-11-06 19:36:01 +01:00
clockworker.js github > strudel 2025-06-12 14:36:45 +01:00
controls.mjs Add tags for some of the new functions 2026-01-18 12:08:12 +01:00
cyclist.mjs add cyclist version to the query metadata 2025-10-08 15:34:51 +01:00
drawLine.mjs Document remaining functions 2025-10-12 16:07:11 +02:00
euclid.mjs Merge branch 'main' of ssh://codeberg.org/vvolhejn/strudel into radical-new-docs 2026-01-10 06:58:39 -08:00
evaluate.mjs Merge branch 'main' into uzu 2025-06-18 21:26:51 +02:00
fraction.mjs fix test 2025-09-16 11:52:36 -04:00
hap.mjs Add doscstrings and move stringifyValues into its own function for reuse 2025-08-05 22:29:59 -05:00
impure.mjs bugfix and tweak doc 2025-12-11 16:51:25 +00:00
index.mjs Add immediate triggering; move time to schedulerState 2026-01-11 14:51:47 -06:00
logger.mjs working in dev 2025-09-16 01:44:01 -04:00
neocyclist.mjs add cyclist version to the query metadata 2025-10-08 15:34:51 +01:00
package.json fix: move kabelsalat web to superdough 2026-01-18 22:04:49 +01:00
pattern.mjs Tag the remaining functions 2026-01-18 12:16:50 +01:00
pick.mjs Document remaining functions 2025-10-12 16:07:11 +02:00
README.md the big rename: @strudel.cycles/* -> @strudel/* 2024-01-18 09:54:37 +01:00
repl.mjs fix: move kabelsalat web to superdough 2026-01-18 22:04:49 +01:00
schedulerState.mjs Expose scheduler state and don't enqueue/trigger midi keys when repl stopped 2026-01-14 11:44:48 -06:00
signal.mjs Tag the remaining functions 2026-01-18 12:16:50 +01:00
speak.mjs refactor: remove first param of all onTrigger calls 2025-06-30 10:18:54 +02:00
state.mjs placate format gods 2025-10-08 15:35:34 +01:00
timespan.mjs optimise euclidish, creating new morph function in the process 2025-08-17 22:13:26 +01:00
ui.mjs github > strudel 2025-06-12 14:36:45 +01:00
util.mjs Don't tag when scale fails, allow mixed sharps and flats, simplify scale function 2025-10-16 16:26:33 -05:00
value.mjs github > strudel 2025-06-12 14:36:45 +01:00
vite.config.js Update base path build setting for core and repl packages 2024-06-11 10:02:57 -04:00
zyklus.mjs fix: cyclist desync 2024-04-05 12:23:04 +02:00

@strudel/core

This package contains the bare essence of strudel.

Install

npm i @strudel/core --save

Example

import { sequence } from '@strudel/core';

const pattern = sequence('a', ['b', 'c']);

const events = pattern.queryArc(0, 1);

const spans = events.map(
  (event) => `${event.value}: ${event.whole.begin.toFraction()} - ${event.whole.end.toFraction()} `,
);

yields:

a: 0 - 1/2
b: 1/2 - 3/4
c: 3/4 - 1
a: 1 - 3/2
b: 3/2 - 7/4
c: 7/4 - 2