Closed amitgur closed 10 years ago
teoria is capable of this. Normally when we talk about interval inversion, we don't talk about inverting the interval direction, but inverting the absolute interval. Such that P4 -> P5, m3 -> M6, d5 -> A4, etc.
If you want to invert the direction as well, you just do that in another step. Directions are a bit awkward in teoria, since they're strings at the moment, but I've been thinking about making them booleans for easier toggling.
So inverting an interval is TeoriaInterval#invert()
and changing an interval's direction is TeoriaInterval#direction()
var interval = teoria.interval('P4'); // or whatever other interval
var reverseInversion = interval.invert().direction(inveral.direction() == 'up' ? 'down' : 'up');
I hope this answered your question - do you have a better/simpler alternative to this method?
Closing this as fixed - Please reopen if you feel this haven't been resolved properly.
Thank you @saebekassebil this is very helpfull
I need to implement an inverse interval
P4 -> P-5 m3 -> M-6
Any idea how to do it with the current implemented method, or some new method need to be written ?