toOctave(targetOctave: number, pitch: number): number
This function is provided as an extension of the number prototype, so that once you've got a pitch, you can easily translate it over to a particular octave.
Returns
Parameters
targetOctave: number
The target octave which the new pitch should be within.
pitch: number
The pitch which we want to move into the target octave
This function is provided as an extension of the number prototype, so that once you've got a pitch, you can easily translate it over to a particular octave.
Returns