![]() |
Deluge Firmware 1.3.0
Build date: 2026.07.29
|

Public Member Functions | |
| bool | computeChangeFrom (NoteSet notes, NoteSet sourceScale, NoteSet targetScale, ScaleChange &changes) |
Private Member Functions | |
| NoteSet | initialTransitionScale (NoteSet sourceScale) |
| void | computeInitialChanges (NoteSet sourceScale, NoteSet initialScale, ScaleChange &changes) |
| void | flushTransitionScaleStore (NoteSet initialScale) |
| void | computeFinalChanges (NoteSet initialScale, NoteSet transitionScale, NoteSet targetScale, ScaleChange &changes) |
| NoteSet | nextTransitionScale (NoteSet notes, NoteSet transitionScale, NoteSet targetScale) |
Private Attributes | |
| NoteSet | lastTransitionNotes |
| NoteSet | transitionScaleStore [kMaxScaleSize] |
| bool ScaleMapper::computeChangeFrom | ( | NoteSet | notes, |
| NoteSet | sourceScale, | ||
| NoteSet | targetScale, | ||
| ScaleChange & | changes ) |
With notes being currently in use, compute ScaleChange to go from sourceScale to targetScale.
In production code freezes with error if the scale change cannot be computed, for testing purposes returns false.
The computed ScaleChanges are such that as long as no new notes are added, all transitions are reversible.
|
private |
Stores the transition notes from the last computed scale change.
|
private |
Indexes 0-11 store the transition scales for the corresponding scale size - 1.
Note: we include 12 tone scales both for simplicity, and in order to support 12-tone scales with bent notes.