# @strudel/tonal

> Tonal functions for strudel

Latest version **1.2.6** (published 2026-01-18) · AGPL-3.0-or-later license · 0 weekly downloads

## Install

```sh
npm install @strudel/tonal
pnpm add @strudel/tonal
yarn add @strudel/tonal
bun add @strudel/tonal
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 1.2.6 |
| Published | 2026-01-18 |
| First published | 2024-01-18 |
| Weekly downloads | 0 |
| License | AGPL-3.0-or-later |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=18.0.0 |
| Dependencies | 4 |
| Unpacked size | 118.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Felix Roos |
| Maintainers | daslyfe, yaxupaxo, felixroos |
| Keywords | tidalcycles, strudel, pattern, livecoding, algorave |

## Links

- npm: https://www.npmjs.com/package/@strudel/tonal
- Repository: https://codeberg.org/uzu/strudel
- Homepage: https://codeberg.org/uzu/strudel#readme
- Issues: https://codeberg.org/uzu/strudel/issues
- npm.io page: https://npm.io/package/@strudel/tonal

## Dependencies (4)

- [webmidi](https://npm.io/package/webmidi.md) ^3.1.12
- [@strudel/core](https://npm.io/package/@strudel/core.md) 1.2.6
- [@tonaljs/tonal](https://npm.io/package/@tonaljs/tonal.md) ^4.10.0
- [chord-voicings](https://npm.io/package/chord-voicings.md) ^0.0.1

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.2.6 (latest) — 2026-01-18
- 1.2.5 — 2025-10-27
- 1.2.4 — 2025-09-10
- 1.2.3 — 2025-08-18
- 1.2.2 — 2025-05-29
- 1.2.1 — 2025-05-24
- 1.2.0 — 2025-05-01
- 1.1.0 — 2024-05-31
- 1.0.1 — 2024-02-08
- 1.0.0 — 2024-01-22
- 0.11.0 — 2024-01-18

## README

# @strudel/tonal

This package adds tonal / harmonic functions to strudel Patterns.

## Install

```sh
npm i @strudel/tonal --save
```

## Example

```js
import { sequence } from '@strudel/core';
import '@strudel/tonal';

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

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

yields:

```js
(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/tonal codesandbox](https://codesandbox.io/s/strudel-tonal-example-rgc5if?file=/src/index.js)

## Tonal API

See "Tonal API" in the [Strudel Tutorial](https://strudel.cc/learn/tonal)

---
_Source: https://npm.io/package/@strudel/tonal · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
