strudel/packages/core
Switch Angel AKA Jade Rose f4cf77f5c6 Merge branch 'main' into solo
2025-09-30 08:09:37 +02:00
..
bench fix benchmarks 2025-08-23 17:29:15 +01:00
test Final docstring cleanup & adding hap tag to logValues for consistency 2025-08-05 22:40:11 -05: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 rename controls 2025-09-28 09:19:39 -04:00
cyclist.mjs working 2025-07-21 01:11:04 -04:00
drawLine.mjs github > strudel 2025-06-12 14:36:45 +01:00
euclid.mjs optimise euclidish, creating new morph function in the process 2025-08-17 22:13:26 +01: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 default cycle 2025-07-08 21:24:27 -04:00
package.json Publish 2025-09-10 23:08:16 +02:00
pattern.mjs format 2025-09-16 11:53:19 -04: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 Merge branch 'main' into solo 2025-09-30 08:09:37 +02:00
signal.mjs Working 2025-09-16 11:36:21 -04:00
speak.mjs refactor: remove first param of all onTrigger calls 2025-06-30 10:18:54 +02:00
state.mjs github > strudel 2025-06-12 14:36:45 +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 Allow negatives and multi-accidentals 2025-08-22 13:17:13 -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