Repository navigation
Releases
Releases · danielgamage/pitch-utils
v0.5.0
NEW
(new Pitch()).clone()returns a copy for preserving previous value and returning a new Pitch instance(new Pitch()).detuning(cents)(new Pitch()).isSharp(boolean)(new Pitch()).isFlat(boolean)(new Pitch()).addHz()(new Pitch()).multiply()
IMPROVEMENTS
enharmonicChromaticScalenow includes double-sharps/double-flats- allowed
getRoundingFunctionto receiveundefined
BREAKING
Pitchconstructor now accepts an argument of either:and still defaults to{ hz: Hz } | { namedNote: NoteName } | { midi: MIDINoteNumber }
{hz: 440}- removed
fromNamedNoteandfromMidiin favor of the above construction. modifications can still be chained after that- const pitch = Pitch.fromNamedNote("A3") + const pitch = new Pitch({namedNote: "A3"})
- const pitch = Pitch.fromMidi(69) + const pitch = new Pitch({midi: 69})
Full Changelog: v0.4.0...v0.5.0
v0.4.0
- Hz-related inputs now validate the argument before calculating
getRoundingFunctionnow returns Math.round if some broken argument is passed inPitchclass additions:- instantiation via
Pitch.fromMidi()(likefromNamedNote) octavenoteName- removed the following A4-relative getters:
.semitones.cents.ratio
- added the following methods to be relative to another
Pitchinstance or Hz:.semitonesFrom.semitonesTo.centsFrom.centsTo.ratioFrom.ratioTo
- instantiation via
- New conversions
semitonesToNoteNamesemitonesToNoteObjectcentsToNoteNamecentsToNoteObjectnamedNoteToNoteObjectratioToNoteNameratioToNoteObject
- adding
roundingMethodargument to MIDI-related functions
v0.3.1
v0.3.0
v0.2.0
v0.1.3
v0.1.1
v0.1.0
Initial release