saebekassebil / teoria

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

Create Intervals #47

Closed amitgur closed 10 years ago

amitgur commented 10 years ago

Hello

I'm looking for a way to create an interval from text, for example

interval = teoria.interval("A3","G4");

right now I'm using only teoria notes to create intervals.

Thanks

saebekassebil commented 10 years ago

Assuming you're talking of the note A3 and not the augmented third, the "teoria-idiomatic" way of doing it would be:

var interval = teoria.note('a3').interval(teoria.note('g4'));

So yea, using teoria notes - is there any particular reason you'd like to do it the other way? Cheers Amit

amitgur commented 10 years ago

I guess your way of doing it is clear enough specialy because of the difference between note('a3') and interval('a3'). Thanks

saebekassebil commented 10 years ago

Glad to help - feel free to come with other suggestions or any other thoughts!