strudel/packages/tonal
2023-01-28 23:06:59 +01:00
..
test add scale test 2022-12-15 20:35:10 +01:00
index.mjs refactor tonal functions to 'register' 2022-12-10 21:34:38 +01:00
package-lock.json Publish 2022-12-13 22:38:08 +01:00
package.json tonal build 2023-01-28 23:06:59 +01:00
README.md add tutorial redirect 2022-12-22 23:47:11 +01:00
tonal.mjs scale now supports running on object values with n 2022-12-11 22:45:36 +01:00
vite.config.js tonal build 2023-01-28 23:06:59 +01:00
voicings.mjs "fix" voice leading 2022-12-11 13:28:24 +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