Skip to content

Instantly share code, notes, and snippets.

@diversen

diversen/Tonal test

Created Sep 10, 2018
Embed
What would you like to do?
const Tonal = require("tonal");
const Scale = Tonal.Scale
const Note = Tonal.Note
const scales = Scale.names()
console.log(scales)
const testScale = 'C major'
const major = Scale.notes(testScale)
const intervals = Scale.intervals(testScale)
console.log(Note.chroma("c"))
console.log(Note.chroma("d"))
console.log(Note.chroma("e"))
console.log(intervals)
console.log(Note.midi("C#3"))
console.log(Note.midi("Db3"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment