Music theory components
- Note: A model of a musical note like (A4 440.00 Hz)
- Scale: A model of musical scale like (C Major scale C, D, E, F, G, A, B)
namereturns the note namefrequencyreturns the frequency of the notesciNamereturns note name and the octaveoctavereturns the number of the octaveisSameOctavereturns true if two notes are in the same octave
const aSharp = new Note('A#4')
aSharp.frequency() // -> '466.16'
aSharp.name() // -> 'A#'
aSharp.sciName() // -> 'A#4'
aSharp.octave() // -> 4
const d4 = new Note('D4')
const d3 = new Note('D3')
aSharp.isSameOctave(d4) // -> true
aSharp.isSameOctave(d3) // -> falsedegreecan provide notes on the scale by its corresponding degreemodegives you an array with all the notes in that mode
const cMayorScale = new Scale('C', Scales.mayor);
cMayorScale.degree(5); // -> 'G'
cMayorScale.mode(2); // -> [ 'D', 'E', 'F', 'G', 'A', 'B', 'C' ]