addon/mixins/musical-identity.js:17
MusicalIdentity
This mixin allows an object to have an awareness of it's "musical identity" or "note value" based on western musical standards (a standard piano). If any of the following are provided, all of the remaining properties will be calculated:
- frequency
- identifier (i.e. "Ab1")
- letter, octave, and (optionally) accidental
This mixin only makes sense when the consuming object is part of a collection, as the only functionality it provides serves to facilitate identification.
Property Summary
Public Properties | |
---|---|
public |
For note |
public |
For note |
public |
Computed property. Value is |
public |
For note |
public |
: Number
Computed property. The frequency of the note in hertz. Calculated by comparing western musical standards (a standard piano) and the note identifier (i.e. |
public |
Computed property. Value is |
Public Properties
addon/mixins/musical-identity.js:44
public accidental: String
For note Ab5
, this would be b
.
addon/mixins/musical-identity.js:35
public letter: String
For note Ab5
, this would be A
.
addon/mixins/musical-identity.js:62
public name: String
Computed property. Value is ${letter}
or ${letter}${accidental}
if
accidental exists.
addon/mixins/musical-identity.js:53
public octave: String
For note Ab5
, this would be 5
.
Computed property. The frequency of the note in hertz. Calculated by
comparing western musical standards (a standard piano) and the note
identifier (i.e. Ab1
). If this property is set directly, all other
properties are updated to reflect the provided frequency.
addon/mixins/musical-identity.js:110
public identifier: String
Computed property. Value is ${letter}${octave}
or
${letter}${accidental}${octave}
if accidental exists. If this property
is set directly, all other properties are updated to reflect the provided
identifier.