File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -704,13 +704,13 @@ void Note::LayoutSelector() {
704704 pioTextDisplay.SetEnableFunc ([&]() -> bool { return notePadConfigs[activeConfig].mode == PIANO_LAYOUT; });
705705 layoutSelector.AddUIComponent (pioTextDisplay, Point (0 , 2 ));
706706
707- // Show Off Scale Notes Toggle (only for Octave and Offset modes)
708- UIButton inKeyNoteOnlyToggle ;
709- inKeyNoteOnlyToggle .SetName (" In Key Notes Only " );
710- inKeyNoteOnlyToggle .SetColorFunc ([&]() -> Color { return Color (0xFFFFFF ).DimIfNot (notePadConfigs[activeConfig].inKeyNoteOnly ); });
711- inKeyNoteOnlyToggle .OnPress ([&]() -> void { notePadConfigs[activeConfig].inKeyNoteOnly = !notePadConfigs[activeConfig].inKeyNoteOnly ; });
712- inKeyNoteOnlyToggle .SetEnableFunc ([&]() -> bool { return notePadConfigs[activeConfig].mode == OCTAVE_LAYOUT || notePadConfigs[activeConfig].mode == OFFSET_LAYOUT || notePadConfigs[activeConfig].mode == CHROMATIC_LAYOUT;; });
713- layoutSelector.AddUIComponent (inKeyNoteOnlyToggle , Point (0 , 7 ));
707+ // Show Enforce Scale Toggle (only for Octave, Offset, and Chromatic modes)
708+ UIButton enforceScaleToggle ;
709+ enforceScaleToggle .SetName (" Enforce Scale " );
710+ enforceScaleToggle .SetColorFunc ([&]() -> Color { return Color (0xFFFFFF ).DimIfNot (notePadConfigs[activeConfig].enforceScale ); });
711+ enforceScaleToggle .OnPress ([&]() -> void { notePadConfigs[activeConfig].enforceScale = !notePadConfigs[activeConfig].enforceScale ; });
712+ enforceScaleToggle .SetEnableFunc ([&]() -> bool { return notePadConfigs[activeConfig].mode == OCTAVE_LAYOUT || notePadConfigs[activeConfig].mode == OFFSET_LAYOUT || notePadConfigs[activeConfig].mode == CHROMATIC_LAYOUT;; });
713+ layoutSelector.AddUIComponent (enforceScaleToggle , Point (0 , 7 ));
714714
715715 layoutSelector.Start ();
716716}
Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ void NotePad::GenerateOctaveKeymap() {
176176 if (nextNote > 127 ) { // If next note is out of range, fill with 255
177177 noteMap[id] = 255 ;
178178 }
179- else if (!rt->config ->inKeyNoteOnly ) { // If enforce scale is false, just add the next note
179+ else if (!rt->config ->enforceScale ) { // If enforce scale is false, just add the next note
180180 noteMap[id] = nextNote; // Add to map
181181 nextNote++;
182182 }
@@ -202,7 +202,7 @@ void NotePad::GenerateOctaveKeymap() {
202202void NotePad::GenerateOffsetKeymap () {
203203 noteMap.reserve (dimension.Area ());
204204 int16_t root = 12 * rt->config ->octave + rt->config ->rootKey ;
205- if (!rt->config ->inKeyNoteOnly ) {
205+ if (!rt->config ->enforceScale ) {
206206 for (int8_t y = 0 ; y < dimension.y ; y++) {
207207 int8_t ui_y = dimension.y - y - 1 ;
208208 for (int8_t x = 0 ; x < dimension.x ; x++) {
@@ -260,7 +260,7 @@ void NotePad::GenerateChromaticKeymap() {
260260 } else {
261261 noteMap[ui_y * dimension.x + x] = note;
262262 }
263- if (!rt->config ->inKeyNoteOnly ) {
263+ if (!rt->config ->enforceScale ) {
264264 note++;
265265 }
266266 else {
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ struct NotePadConfig {
4343 int8_t octave = 4 ;
4444 uint8_t channel = 0 ;
4545 NoteLayoutMode mode = OCTAVE_LAYOUT;
46- bool inKeyNoteOnly = true ;
46+ bool enforceScale = true ;
4747 union {
4848 struct // Octave Mode
4949 {
You can’t perform that action at this time.
0 commit comments