| 93 | } |
| 94 | |
| 95 | std::vector<int> NoteOptions::_createKeyVector(RootNote inRootNote, ScaleType inScaleType) |
| 96 | { |
| 97 | auto root_note_idx = _rootNoteToNoteIdx(inRootNote); |
| 98 | |
| 99 | switch (inScaleType) { |
| 100 | case Major: |
| 101 | return _createKeyVectorForScale(root_note_idx, MAJOR_SCALE_INTERVALS); |
| 102 | case Minor: |
| 103 | return _createKeyVectorForScale(root_note_idx, MINOR_SCALE_INTERVALS); |
| 104 | case Dorian: |
| 105 | return _createKeyVectorForScale(root_note_idx, DORIAN_SCALE_INTERVALS); |
| 106 | case Mixolydian: |
| 107 | return _createKeyVectorForScale(root_note_idx, MIXOLYDIAN_SCALE_INTERVALS); |
| 108 | case Lydian: |
| 109 | return _createKeyVectorForScale(root_note_idx, LYDIAN_SCALE_INTERVALS); |
| 110 | case Phrygian: |
| 111 | return _createKeyVectorForScale(root_note_idx, PHRYGIAN_SCALE_INTERVALS); |
| 112 | case Locrian: |
| 113 | return _createKeyVectorForScale(root_note_idx, LOCRIAN_SCALE_INTERVALS); |
| 114 | case MinorBlues: |
| 115 | return _createKeyVectorForScale(root_note_idx, MINOR_BLUES_SCALE_INTERVALS); |
| 116 | case MinorPentatonic: |
| 117 | return _createKeyVectorForScale(root_note_idx, MINOR_PENTATONIC_SCALE_INTERVALS); |
| 118 | case MajorPentatonic: |
| 119 | return _createKeyVectorForScale(root_note_idx, MAJOR_PENTATONIC_SCALE_INTERVALS); |
| 120 | case MelodicMinor: |
| 121 | return _createKeyVectorForScale(root_note_idx, MELODIC_MINOR_SCALE_INTERVALS); |
| 122 | case HarmonicMinor: |
| 123 | return _createKeyVectorForScale(root_note_idx, HARMONIC_MINOR_SCALE_INTERVALS); |
| 124 | case HarmonicMajor: |
| 125 | return _createKeyVectorForScale(root_note_idx, HARMONIC_MAJOR_SCALE_INTERVALS); |
| 126 | default: |
| 127 | // If chromatic, vector should not be used. |
| 128 | return {}; |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | int NoteOptions::_rootNoteToNoteIdx(RootNote inRootNote) |
| 133 | { |
nothing calls this directly
no outgoing calls
no test coverage detected