strudel/packages/tonal
2022-12-10 21:34:38 +01:00
..
test Tidying up core (#256) 2022-11-22 08:51:25 +00:00
index.mjs refactor tonal functions to 'register' 2022-12-10 21:34:38 +01:00
package-lock.json Publish 2022-11-17 11:09:54 +01:00
package.json Merge branch 'main' into fix-tutorial-bugs 2022-11-29 23:37:35 +01:00
README.md add tonal example 2022-03-27 22:49:06 +02:00
tonal.mjs refactor tonal functions to 'register' 2022-12-10 21:34:38 +01:00
voicings.mjs refactor tonal functions to 'register' 2022-12-10 21:34:38 +01:00

@strudel.cycles/tonal

This package adds tonal / harmonic functions to strudel Patterns.

Install

npm i @strudel.cycles/tonal --save

Example

import { sequence } from '@strudel.cycles/core';
import '@strudel.cycles/tonal';

const pattern = sequence(0, [1, 2]).scale('C major');

const events = pattern.firstCycle().map((e) => e.show());

yields:

(0/1 -> 1/2, 0/1 -> 1/2, C3)
(1/2 -> 3/4, 1/2 -> 3/4, D3)
(3/4 -> 1/1, 3/4 -> 1/1, E3)

play with @strudel.cycles/tonal codesandbox

Tonal API

See "Tonal API" in the Strudel Tutorial