strudel/packages/core
2025-12-03 11:12:30 -06:00
..
bench fix benchmarks 2025-08-23 17:29:15 +01:00
test add revv() for reversing whole patterns 2025-11-27 15:34:18 +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 Switch back to explicit exports and use new release mechanism 2025-12-03 11:12:30 -06:00
cyclist.mjs add cyclist version to the query metadata 2025-10-08 15:34:51 +01:00
drawLine.mjs github > strudel 2025-06-12 14:36:45 +01:00
euclid.mjs - refactor bjork -> bjorklund 2025-10-07 22:35:29 +02: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
index.mjs github > strudel 2025-06-12 14:36:45 +01: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 for node 24 support #1718 2025-11-04 20:54:21 -06:00
pattern.mjs Merge branch 'main' into revv 2025-11-28 22:37:03 +01:00
pick.mjs github > strudel 2025-06-12 14:36:45 +01:00
README.md the big rename: @strudel.cycles/* -> @strudel/* 2024-01-18 09:54:37 +01:00
repl.mjs fix: return silence when no pattern is returned 2025-11-27 22:53:38 +01:00
signal.mjs wchooseCycles has now notes in an example 2025-11-17 20:04:40 +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
time.mjs Revert "refactor: remove old draw logic" 2023-05-10 11:44:55 +02: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