![]() |
Deluge Firmware 1.3.0
Build date: 2026.11.28
|
#include <accidental_rows.h>
Classes | |
| class | Layout |
Public Member Functions | |
| int32_t | auditionYNote (bool on, uint8_t yDisplay, int32_t yNoteOfRow, std::span< const EditPadPress > presses) |
Static Public Member Functions | |
| static NoteRow * | noteRowForPress (const EditPadPress &press, int32_t *getIndex=nullptr) |
| static ModelStackWithNoteRow * | noteRowForPress (const EditPadPress &press, ModelStackWithTimelineCounter *modelStack) |
| static void | render (YNoteRange hidden, RGB rowColour, bool allowNoteTails, TimelineView *view, RGB *image, uint8_t *occupancyMask, int32_t renderWidth, int32_t xScroll, uint32_t xZoom) |
Private Attributes | |
| std::array< std::optional< int16_t >, kDisplayHeight > | auditionedHiddenYNote_ {} |
| Per pad row, the hidden pitch being auditioned on it, if any. | |
How the instrument clip view shows accidentals. In a scale mode clip, the pads only have rows for the notes of the scale, so a NoteRow whose pitch is outside it (an accidental) has no row of its own: it is "hidden", and drawn in a washed-out colour on the neighbouring in-scale row (the one below it in a sharp key, above it in a flat key). Pad presses and auditioning on that row may then be for the hidden NoteRow rather than the row's own.
| int32_t AccidentalRows::auditionYNote | ( | bool | on, |
| uint8_t | yDisplay, | ||
| int32_t | yNoteOfRow, | ||
| std::span< const EditPadPress > | presses ) |
The pitch to audition for the pad row at yDisplay, given the pitch of the row itself. For a note-on, that is the hidden pitch if one of the presses on the row is on one. It is remembered so that the note-off goes to the same pitch, even if the press has ended or moved by then.
|
static |
The NoteRow of the current clip a held press is on: the hidden one it was routed to (EditPadPress:: yNoteOverride), else the one shown at its yDisplay. Null (or a model stack with no NoteRow) if there isn't one.
|
static |
Draws the notes of the current clip's hidden rows onto the image of the pad row they are shown on, in a washed-out version of rowColour. The row's own notes, already drawn and marked in occupancyMask, keep any square they share. occupancyMask must not be null.