strudel/packages/core
2025-08-26 12:06:10 -05:00
..
bench Polish, rename, and document stepwise functions (#1262) 2025-02-02 20:26:44 +00: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 params, more examples 2025-08-26 12:06:10 -05: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 github > strudel 2025-06-12 14:36:45 +01: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 test 2025-07-23 18:34:34 -04:00
neocyclist.mjs default cycle 2025-07-08 21:24:27 -04:00
package.json Publish 2025-08-18 11:46:29 -04:00
pattern.mjs Merge branch 'main' into euclidish 2025-08-17 22:16:58 +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 working 2025-07-21 01:11:04 -04:00
signal.mjs Fix randrun and deps including shuffle. Fixes #1441 2025-07-05 09:01:48 +01: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 Add doscstrings and move stringifyValues into its own function for reuse 2025-08-05 22:29:59 -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