Skip to content

Instantly share code, notes, and snippets.

@diversen
Created September 10, 2018 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diversen/ea447885efc0e87e2e9fd100351d8ee7 to your computer and use it in GitHub Desktop.
Save diversen/ea447885efc0e87e2e9fd100351d8ee7 to your computer and use it in GitHub Desktop.
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