saebekassebil / teoria

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

Equal Notes #67

Closed amitgur closed 9 years ago

amitgur commented 9 years ago

I need to examine if two notes are the same pitch, Gb = F# etc. I wrote this simple fonction. It there another way to do that ?

teoria.checkEqualNotes = function(a,b){

var interval = teoria.interval(teoria.note(a),teoria.note(b)).toString();

if (interval ==='P1' || interval === 'd-2' || interval === 'd2'){
    return true;
} else {
    return false;
}

}

saebekassebil commented 9 years ago

TeoriaNote#chroma() :)