https://github.com/wavejumper/tonal-clj
Clojure (JVM) bindings into tonaljs
https://github.com/wavejumper/tonal-clj
chords clojure music-theory scale tonal tonaljs
Last synced: about 1 year ago
JSON representation
Clojure (JVM) bindings into tonaljs
- Host: GitHub
- URL: https://github.com/wavejumper/tonal-clj
- Owner: wavejumper
- Created: 2020-05-23T06:32:37.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-24T08:00:31.000Z (about 6 years ago)
- Last Synced: 2025-02-07T14:46:41.759Z (over 1 year ago)
- Topics: chords, clojure, music-theory, scale, tonal, tonaljs
- Language: Clojure
- Homepage:
- Size: 35.2 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://clojars.org/wavejumper/tonal)
[](https://circleci.com/gh/wavejumper/tonal-clj)
# tonal-clj
Clojure (JVM) bindings into the excellent [tonal](https://github.com/tonaljs/tonal) library.
> 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).
This is possible via [GraalVM's JavaScript engine](https://github.com/wavejumper/clj-polyglot)
# Usage
Requires JDK11+ or a graalvm runtime
```clojure
["-XX:+UnlockExperimentalVMOptions" "-XX:+EnableJVMCI"]
```
```clojure
(require '[tonal.midi :as midi])
(time (midi/midi-to-freq 60))
;; "Elapsed time: 0.573886 msecs"
;; => 261.6255653005986
```
Refer to the [tonal documentation](https://github.com/tonaljs/tonal#documentation) for more information.