strudel/packages/core
hacklab 7b9f1155b4 Mejoras hacklab: i18n, pestaña Projects, transporte con seek, guía y temas
- i18n ligero de la interfaz del REPL (castellano, inglés, francés, alemán,
  italiano, portugués...) con selector en el header
- Pestaña Projects: gestor local de proyectos con carpetas, buscador y
  librería de tracks de fábrica (bases techno/acid originales)
- Barra de transporte bajo el editor: play/pausa/anterior/siguiente, tiempo
  y barra de progreso arrastrable; seek real vía Cyclist.setCycle()
- Pestaña Guía: chuleta de síntesis y sonidos para el directo
- Packs de temas del editor: neon-madrid + hacklab-pack (5 neón + 5 estándar)
- pnpm-workspace: allowBuilds para instalación limpia en Linux
2026-07-17 01:47:12 +02:00
..
bench Make legacy the default 2025-12-13 17:28:42 -06:00
test add test 2026-02-08 12:45:47 -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 Merge branch 'main' of ssh://codeberg.org/vvolhejn/strudel into vv/fix-stretch-docs 2026-03-01 11:15:28 +01:00
cyclist.mjs Mejoras hacklab: i18n, pestaña Projects, transporte con seek, guía y temas 2026-07-17 01:47:12 +02: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 block based eval 2025-12-23 01:47:06 -08: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 Pretty code now 2026-06-21 13:49:11 +01:00
pick.mjs Fix pickF / pickmodF with object lookup 2026-01-27 23:16:29 +01:00
README.md the big rename: @strudel.cycles/* -> @strudel/* 2024-01-18 09:54:37 +01:00
repl.mjs docs: note that all/each require labeled patterns 2026-03-09 11:15:14 +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 Merge pull request 'fix: shuffle(1) returns source pattern' (#1968) from tyow/localstrudel:shuffleFix into main 2026-02-15 00:24:30 +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 fix 'Maximum call stack size exceeded' 2026-01-28 17:06:16 -08: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