saebekassebil / teoria

Javascript taught Music Theory
http://saebekassebil.github.io/teoria
MIT License
1.31k stars 114 forks source link

Scientific or frequency number output from scale #116

Closed tatecarson closed 7 years ago

tatecarson commented 7 years ago

Hi, I'm trying to use teoria to generate scales and chords for Tonejs, which takes either frequency numbers or scientific notation.

 var a4 = teoria.note('A4');
 var scale = a4.scale('mixolydian').simple()

This outputs an array of note names, but is there any way to either convert them to the scientific notation or frequency numbers?

saebekassebil commented 7 years ago

You could use the array methods (like map) to iterate over the notes, which you can get with the #notes() method on a scale and chord

/j

Den 6. jul. 2017 kl. 22.35 skrev tatecarson notifications@github.com:

Hi, I'm trying to use teoria to generate scales and chords for Tonejs, which takes either frequency numbers or scientific notation.

var a4 = teoria.note('A4'); var scale = a4.scale('mixolydian').simple() This outputs an array of note names, but is there any way to either convert them to the scientific notation or frequency numbers?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

tatecarson commented 7 years ago

Thank you, very helpful.