Closed amitgur closed 10 years ago
At the moment I'm doing it this way
var newInterval = teoria.note("c4").interval(interval1).interval(interval2).interval(teoria.note('c4'));
Well my implimentation is not working for all cases ..
This one is doing the job:
newNote = teoria.note("c4").interval(interval1).interval(interval2);
newInterval = teoria.note("c4").interval(newNote);
I think it should be possible to just add the interval coords together:
teoria.TeoriaInterval.prototype.add = function(interval) {
return new teoria.TeoriaInterval([this.coord[0] + interval.coord[0], this.coord[1] + interval.coord[1]]);
}
teoria.interval('m3').add(teoria.interval('M2')).toString(); // -> P4
I'll test this out and implement it if it works out.
Fixed in b4d7ae552d499d82d52ad70287e23e9716f48505
Example:
teoria.interval('P5').add(teoria.interval('m-6')).toString(); // -> 'm-2'
Thanks
I'm looking for the best way to add two intervals.
m3 + M2 = P4 P5 + m-6 = M-2
Any ideas for the right way to do it ?