You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I propose adding a constructor to Interval that just takes an integer number of semitones representing the distance.
Use cases
The Size is, after all, just a human label, from the point of view of physical information there isn't much difference between a "fourth" and an "augmented third", similar to how there is no physical difference between an E# and an F, they are just human labels that allow us to work more easily with these things.
So I can imagine a simple program that just takes some MIDI input and transposes it by a variable number of semitones, and it doesn't really care about the denomination of the new notes.
In such use cases it would be useful to have a "machine friendly" Interval constructor that just takes an integer distance in semitones.
I propose adding a constructor to
Interval
that just takes an integer number of semitones representing the distance.Use cases
The
Size
is, after all, just a human label, from the point of view of physical information there isn't much difference between a "fourth" and an "augmented third", similar to how there is no physical difference between an E# and an F, they are just human labels that allow us to work more easily with these things.So I can imagine a simple program that just takes some MIDI input and transposes it by a variable number of semitones, and it doesn't really care about the denomination of the new notes.
In such use cases it would be useful to have a "machine friendly" Interval constructor that just takes an integer distance in semitones.
Proposed implementation
Rename:
fromQualitySemitones
->fromSizeAndQualitySemitones
fromSemitones
->fromSizeAndSemitones
Add:
fromSemitones(int)
The size is inferred as the nearest to the given distance.
See the attached draft PR for details.
The text was updated successfully, but these errors were encountered: