tonal

WebJar for tonal

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

tonal
Последняя версия

Последняя версия

2.1.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

tonal
WebJar for tonal
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/danigb/tonal

Скачать tonal

Имя Файла Размер
tonal-2.1.2.pom
tonal-2.1.2.jar 38 KB
tonal-2.1.2-sources.jar 22 bytes
tonal-2.1.2-javadoc.jar 22 bytes
Обзор

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/tonal/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>tonal</artifactId>
    <version>2.1.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/tonal/
implementation 'org.webjars.npm:tonal:2.1.2'
// https://jarcasting.com/artifacts/org.webjars.npm/tonal/
implementation ("org.webjars.npm:tonal:2.1.2")
'org.webjars.npm:tonal:jar:2.1.2'
<dependency org="org.webjars.npm" name="tonal" rev="2.1.2">
  <artifact name="tonal" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='tonal', version='2.1.2')
)
libraryDependencies += "org.webjars.npm" % "tonal" % "2.1.2"
[org.webjars.npm/tonal "2.1.2"]

Зависимости

compile (9)

Идентификатор библиотеки Тип Версия
org.webjars.npm » tonal-pcset jar [2.1.2,3)
org.webjars.npm » tonal-scale jar [2.1.2,3)
org.webjars.npm » tonal-distance jar [2.1.2,3)
org.webjars.npm » tonal-note jar [2.1.2,3)
org.webjars.npm » tonal-key jar [2.1.2,3)
org.webjars.npm » tonal-interval jar [2.1.2,3)
org.webjars.npm » tonal-dictionary jar [2.1.2,3)
org.webjars.npm » tonal-chord jar [2.1.2,3)
org.webjars.npm » tonal-array jar [2.1.2,3)

Модули Проекта

Данный проект не имеет модулей.

tonal

npm version build status minified size gzipped size

tonal is a music theory library. Contains functions to manipulate tonal elements of music (note, intervals, chords, scales, modes, keys). It deals with abstractions (not actual music or sound).

tonal is implemented in Typescript and published as a collection of Javascript npm packages.

It uses a functional programing style: all functions are pure, there is no data mutation, and entities are represented by data structures instead of objects.

Example

import { Note, Interval, Scale } from "@tonaljs/tonal";

Note.midi("A4"); // => 60
Note.freq("a4").freq; // => 440
Note.accidentals("c#2"); // => '#'
Note.transpose("C4", "5P"); // => "G4"
Interval.semitones("5P"); // => 7
Interval.distance("C4", "G4"); // => "5P"
Scale.get("C major").notes; // =>["C", "D", "E", "F", "G", "A", "B"];

Install

Install all packages at once:

npm install --save @tonaljs/tonal

Usage

Tonal is compatible with both ES5 and ES6 modules, and browser.

ES6 import:

import { Note, Scale } from "@tonaljs/tonal";

ES5 require:

const { Note, Scale } = require("@tonaljs/tonal");

Browser

You can use the browser version from jsdelivr CDN directly in your html:

<script src="https://cdn.jsdelivr.net/npm/@tonaljs/tonal/browser/tonal.min.js"></script>
<script>
  console.log(Tonal.Key.minorKey("Ab"));
</script>

Or if you prefer, grab the minified browser ready version from the repository.

Bundle size

@tonaljs/tonal includes all published modules.

Although the final bundle it is small (~10kb minified and gzipped), you can reduce bundle sizes even more by installing the modules individually, and importing only the functions you need:

npm i @tonaljs/note
import { transpose } from "@tonaljs/note";
transpose("A4", "P5");

Documentation

Generally, you just need to install:

The API documentation lives inside README.md file of each module

Notes and intervals

Scales and chords

Keys, chord progressions

Time, rhythm

Utilities

Contributing

Read contributing document for instructions

Inspiration

This library takes inspiration from other music theory libraries:

Projects using tonal

Showcase of projects that are using Tonal:

Thank you all!

Add your project here by editing this file

License

MIT License

Версии библиотеки

Версия
2.1.2