Deluge Firmware 1.3.0
Build date: 2025.04.16
Loading...
Searching...
No Matches
PerformanceView Class Referencefinal
Inheritance diagram for PerformanceView:
Collaboration diagram for PerformanceView:

Public Member Functions

bool getGreyoutColsAndRows (uint32_t *cols, uint32_t *rows) override
 
bool opened () override
 
void focusRegained () override
 
void graphicsRoutine () override
 
ActionResult timerCallback () override
 
UIType getUIType () override
 
int32_t getNavSysId () const override
 
bool renderMainPads (uint32_t whichRows, RGB image[][kDisplayWidth+kSideBarWidth], uint8_t occupancyMask[][kDisplayWidth+kSideBarWidth], bool drawUndefinedArea=true) override
 
bool renderSidebar (uint32_t whichRows, RGB image[][kDisplayWidth+kSideBarWidth], uint8_t occupancyMask[][kDisplayWidth+kSideBarWidth]) override
 if entered performance view using pink grid mode pad, render the pink pad
 
void renderViewDisplay ()
 
void renderOLED (deluge::hid::display::oled_canvas::Canvas &canvas) override
 
void redrawNumericDisplay ()
 
void setLedStates ()
 
ActionResult buttonAction (deluge::hid::Button b, bool on, bool inCardRoutine) override
 
ActionResult padAction (int32_t x, int32_t y, int32_t velocity) override
 
ActionResult horizontalEncoderAction (int32_t offset) override
 
ActionResult verticalEncoderAction (int32_t offset, bool inCardRoutine) override
 
void modEncoderAction (int32_t whichModEncoder, int32_t offset) override
 
void modEncoderButtonAction (uint8_t whichModEncoder, bool on) override
 used to reset stutter if it's already active
 
void modButtonAction (uint8_t whichButton, bool on) override
 
void selectEncoderAction (int8_t offset) override
 Used to edit a pad's value in editing mode.
 
uint32_t getMaxZoom () override
 why do I need this? (code won't compile without it)
 
uint32_t getMaxLength () override
 why do I need this? (code won't compile without it)
 
void savePerformanceViewLayout ()
 update saved perfomance view layout and update saved changes status
 
void loadPerformanceViewLayout ()
 backup current layout, load saved layout, log layout change, update change status
 
void updateLayoutChangeStatus ()
 
void resetPerformanceView (ModelStackWithThreeMainThings *modelStack)
 
void renderFXDisplay (deluge::modulation::params::Kind paramKind, int32_t paramID, int32_t knobPos=kNoSelection)
 Render Parameter Name and Value set when using Performance Pads.
 
bool possiblyRefreshPerformanceViewDisplay (deluge::modulation::params::Kind kind, int32_t id, int32_t newKnobPos)
 
- Public Member Functions inherited from TimelineView
void scrollFinished () override
 
TimelineViewtoTimelineView () final
 Convert this view to a TimelineView.
 
virtual bool calculateZoomPinSquares (uint32_t oldScroll, uint32_t newScroll, uint32_t newZoom, uint32_t oldZoom)
 
virtual bool setupScroll (uint32_t oldScroll)
 
virtual void tellMatrixDriverWhichRowsContainSomethingZoomable ()
 
ActionResult buttonAction (deluge::hid::Button b, bool on, bool inCardRoutine) override
 
void displayZoomLevel (bool justPopup=false)
 
ActionResult horizontalEncoderAction (int32_t offset) override
 
void displayScrollPos ()
 
void displayNumberOfBarsAndBeats (uint32_t number, uint32_t quantization, bool countFromOne, char const *tooLongText)
 
void initiateXScroll (uint32_t newXScroll, int32_t numSquaresToScroll=kDisplayWidth)
 
bool zoomToMax (bool inOnly=false)
 
void initiateXZoom (int32_t zoomMagnitude, int32_t newScroll, uint32_t oldZoom)
 
void midiLearnFlash () override
 
bool scrollRightToEndOfLengthIfNecessary (int32_t maxLength)
 
bool scrollLeftIfTooFarRight (int32_t maxLength)
 
void tripletsButtonPressed ()
 
void setTripletsLEDState ()
 
int32_t getPosFromSquare (int32_t square, int32_t localScroll=-1) const
 
int32_t getPosFromSquare (int32_t square, int32_t xScroll, uint32_t xZoom) const
 
int32_t getSquareFromPos (int32_t pos, bool *rightOnSquare=nullptr, int32_t localScroll=-1)
 
int32_t getSquareFromPos (int32_t pos, bool *rightOnSquare, int32_t xScroll, uint32_t xZoom)
 
int32_t getSquareEndFromPos (int32_t pos, int32_t localScroll=-1)
 
bool isSquareDefined (int32_t square, int32_t xScroll=-1)
 
bool isSquareDefined (int32_t square, int32_t xScroll, uint32_t xZoom)
 
bool inTripletsView () const
 
- Public Member Functions inherited from RootUI
virtual bool getAffectEntire ()
 
bool canSeeViewUnderneath () final
 
virtual bool supportsTriplets () const
 
virtual void notifyPlaybackBegun ()
 
virtual uint32_t getGreyedOutRowsNotRepresentingOutput (Output *output)
 
virtual void noteRowChanged (InstrumentClip *clip, NoteRow *noteRow)
 
virtual void playbackEnded ()
 
virtual void clipNeedsReRendering (Clip *clip)
 
virtual void sampleNeedsReRendering (Sample *sample)
 
- Public Member Functions inherited from UI
virtual void displayOrLanguageChanged ()
 
virtual ClipMindertoClipMinder ()
 
virtual bool pcReceivedForMidiLearn (MIDICable &fromCable, int32_t channel, int32_t program)
 
virtual bool noteOnReceivedForMidiLearn (MIDICable &fromCable, int32_t channel, int32_t note, int32_t velocity)
 
virtual bool exitUI ()
 returns whether a UI exited
 
void close ()
 

Public Attributes

bool defaultEditingMode
 
bool editingParam
 
bool justExitedSoundEditor
 
FXColumnPress fxPress [kDisplayWidth]
 
PadPress lastPadPress
 
bool onFXDisplay
 
uint32_t timeKeyboardShortcutPress
 
- Public Attributes inherited from UI
bool oledShowsUIUnderneath
 

Private Member Functions

void initPadPress (PadPress &padPress)
 
void initFXPress (FXColumnPress &columnPress)
 
void initLayout (ParamsForPerformance &layout)
 
void initDefaultFXValues (int32_t xDisplay)
 
void renderRow (RGB *image, int32_t yDisplay)
 render every column, one row at a time
 
bool isParamAssignedToFXColumn (deluge::modulation::params::Kind paramKind, int32_t paramID)
 check if a param has been assinged to any of the FX columns
 
void setCentralLEDStates ()
 
void normalPadAction (ModelStackWithThreeMainThings *modelStack, int32_t xDisplay, int32_t yDisplay, int32_t on)
 process pad actions in the normal performance view or value editor
 
void paramEditorPadAction (ModelStackWithThreeMainThings *modelStack, int32_t xDisplay, int32_t yDisplay, int32_t on)
 process pad actions in the param editor
 
bool isPadShortcut (int32_t xDisplay, int32_t yDisplay)
 check if pad press corresponds to a shortcut pad on the grid
 
bool setParameterValue (ModelStackWithThreeMainThings *modelStack, deluge::modulation::params::Kind paramKind, int32_t paramID, int32_t xDisplay, int32_t knobPos, bool renderDisplay=true)
 
void getParameterValue (ModelStackWithThreeMainThings *modelStack, deluge::modulation::params::Kind paramKind, int32_t paramID, int32_t xDisplay, bool renderDisplay=true)
 
void padPressAction (ModelStackWithThreeMainThings *modelStack, deluge::modulation::params::Kind paramKind, int32_t paramID, int32_t xDisplay, int32_t yDisplay, bool renderDisplay=true)
 
void padReleaseAction (ModelStackWithThreeMainThings *modelStack, deluge::modulation::params::Kind paramKind, int32_t paramID, int32_t xDisplay, bool renderDisplay=true)
 
void resetFXColumn (ModelStackWithThreeMainThings *modelStack, int32_t xDisplay)
 
void releaseViewOnExit (ModelStackWithThreeMainThings *modelStack)
 
void resetPadPressInfo ()
 initialize pad press info structs
 
void releaseStutter (ModelStackWithThreeMainThings *modelStack)
 check if stutter is active and release it if it is
 
void writeDefaultsToFile ()
 write/load default values
 
void writeDefaultFXValuesToFile (Serializer &writer)
 
void writeDefaultFXParamToFile (Serializer &writer, int32_t xDisplay)
 convert paramID to a paramName to write to XML
 
void writeDefaultFXRowValuesToFile (Serializer &writer, int32_t xDisplay)
 
void writeDefaultFXHoldStatusToFile (Serializer &writer, int32_t xDisplay)
 
void loadDefaultLayout ()
 if no XML file exists, load default layout (paramKind, paramID, xDisplay, yDisplay, rowColour, rowTailColour)
 
void readDefaultsFromBackedUpFile ()
 re-read defaults from backed up XML in memory in order to reduce SD Card IO
 
void readDefaultsFromFile ()
 read defaults from XML
 
void readDefaultFXValuesFromFile ()
 
void readDefaultFXParamAndRowValuesFromFile (int32_t xDisplay)
 
void readDefaultFXParamFromFile (int32_t xDisplay)
 
void readDefaultFXRowNumberValuesFromFile (int32_t xDisplay)
 
void readDefaultFXHoldStatusFromFile (int32_t xDisplay)
 
void initializeHeldFX (int32_t xDisplay)
 
int32_t getKnobPosForSinglePadPress (int32_t xDisplay, int32_t yDisplay)
 
int32_t calculateKnobPosForSelectEncoderTurn (int32_t knobPos, int32_t offset)
 used to calculate new knobPos when you turn the select encoder
 
void backupPerformanceLayout ()
 backup performance layout column press info so changes can be undone / redone later
 
bool shouldRestorePreviousHoldPress (int32_t xDisplay)
 
void restorePreviousHoldPress (int32_t xDisplay)
 re-load performance layout column press info from backup
 
void logPerformanceViewPress (int32_t xDisplay, bool closeAction=true)
 
bool anyChangesToLog ()
 check if there are any changes that needed to be logged in action logger for undo/redo mechanism to work
 

Private Attributes

bool successfullyReadDefaultsFromFile
 
bool anyChangesToSave
 
FXColumnPress backupXMLDefaultFXPress [kDisplayWidth]
 
ParamsForPerformance backupXMLDefaultLayoutForPerformance [kDisplayWidth]
 
int32_t backupXMLDefaultFXValues [kDisplayWidth][kDisplayHeight]
 
PadPress firstPadPress
 
ParamsForPerformance layoutForPerformance [kDisplayWidth]
 
int32_t defaultFXValues [kDisplayWidth][kDisplayHeight]
 
int32_t layoutBank
 
int32_t layoutVariant
 
bool performanceLayoutBackedUp
 
FXColumnPress backupFXPress [kDisplayWidth]
 
bool sessionButtonActive = false
 
bool sessionButtonUsed = false
 

Additional Inherited Members

- Protected Member Functions inherited from ClipNavigationTimelineView
void horizontalScrollForLinearRecording (int32_t newXScroll)
 
- Protected Attributes inherited from UI
UIType uiType
 
- Static Protected Attributes inherited from ClipNavigationTimelineView
static int32_t xScrollBeforeFollowingAutoExtendingLinearRecording
 

Member Function Documentation

◆ buttonAction()

ActionResult PerformanceView::buttonAction ( deluge::hid::Button b,
bool on,
bool inCardRoutine )
overridevirtual

Reimplemented from UI.

◆ focusRegained()

void PerformanceView::focusRegained ( )
overridevirtual

Reimplemented from ClipNavigationTimelineView.

◆ getGreyoutColsAndRows()

bool PerformanceView::getGreyoutColsAndRows ( uint32_t * cols,
uint32_t * rows )
overridevirtual

Reimplemented from UI.

◆ getKnobPosForSinglePadPress()

int32_t PerformanceView::getKnobPosForSinglePadPress ( int32_t xDisplay,
int32_t yDisplay )
private

converts grid pad press yDisplay into a knobPosition value default this will likely need to be customized based on the parameter to create some more param appropriate ranges

◆ getMaxLength()

uint32_t PerformanceView::getMaxLength ( )
overridevirtual

why do I need this? (code won't compile without it)

Implements TimelineView.

◆ getMaxZoom()

uint32_t PerformanceView::getMaxZoom ( )
overridevirtual

why do I need this? (code won't compile without it)

Implements TimelineView.

◆ getNavSysId()

int32_t PerformanceView::getNavSysId ( ) const
nodiscardoverridevirtual

Reimplemented from TimelineView.

◆ getParameterValue()

void PerformanceView::getParameterValue ( ModelStackWithThreeMainThings * modelStack,
deluge::modulation::params::Kind paramKind,
int32_t paramID,
int32_t xDisplay,
bool renderDisplay = true )
private

get the current value for a parameter and update display if value is different than currently shown update current value stored

◆ getUIType()

UIType PerformanceView::getUIType ( )
inlineoverridevirtual

Implements UI.

◆ graphicsRoutine()

void PerformanceView::graphicsRoutine ( )
overridevirtual

Reimplemented from UI.

◆ horizontalEncoderAction()

ActionResult PerformanceView::horizontalEncoderAction ( int32_t offset)
overridevirtual

Reimplemented from ClipNavigationTimelineView.

◆ logPerformanceViewPress()

void PerformanceView::logPerformanceViewPress ( int32_t xDisplay,
bool closeAction = true )
private

used in conjunction with backupPerformanceLayout to log changes while in Performance View so that you can undo/redo them afters

◆ modButtonAction()

void PerformanceView::modButtonAction ( uint8_t whichButton,
bool on )
overridevirtual

Reimplemented from UI.

◆ modEncoderAction()

void PerformanceView::modEncoderAction ( int32_t whichModEncoder,
int32_t offset )
overridevirtual

updates the display if the mod encoder has just updated the same parameter currently being held / last held if no param is currently being held, it will reset the display to just show "Performance View"

Reimplemented from UI.

◆ modEncoderButtonAction()

void PerformanceView::modEncoderButtonAction ( uint8_t whichModEncoder,
bool on )
overridevirtual

used to reset stutter if it's already active

Reimplemented from UI.

◆ opened()

bool PerformanceView::opened ( )
overridevirtual

Reimplemented from UI.

◆ padAction()

ActionResult PerformanceView::padAction ( int32_t x,
int32_t y,
int32_t velocity )
overridevirtual

Reimplemented from UI.

◆ readDefaultFXParamFromFile()

void PerformanceView::readDefaultFXParamFromFile ( int32_t xDisplay)
private

compares param name from tag to the list of params available for use in performance view if param is found, it loads the layout info for that param into the view (paramKind, paramID, xDisplay, yDisplay, rowColour, rowTailColour)

◆ releaseViewOnExit()

void PerformanceView::releaseViewOnExit ( ModelStackWithThreeMainThings * modelStack)
private

reset press info and stutter when exiting performance view exit out of default editing mode

◆ renderMainPads()

bool PerformanceView::renderMainPads ( uint32_t whichRows,
RGB image[][kDisplayWidth+kSideBarWidth],
uint8_t occupancyMask[][kDisplayWidth+kSideBarWidth],
bool drawUndefinedArea = true )
overridevirtual

Reimplemented from UI.

◆ renderOLED()

void PerformanceView::renderOLED ( deluge::hid::display::oled_canvas::Canvas & canvas)
overridevirtual

Implements UI.

◆ renderSidebar()

bool PerformanceView::renderSidebar ( uint32_t whichRows,
RGB image[][kDisplayWidth+kSideBarWidth],
uint8_t occupancyMask[][kDisplayWidth+kSideBarWidth] )
overridevirtual

if entered performance view using pink grid mode pad, render the pink pad

Reimplemented from UI.

◆ renderViewDisplay()

void PerformanceView::renderViewDisplay ( )

render performance view display on opening

XXX: This should take a canvas and render to it rather than pulling the main image all the time.

◆ resetFXColumn()

void PerformanceView::resetFXColumn ( ModelStackWithThreeMainThings * modelStack,
int32_t xDisplay )
private

resets a single FX column to remove held status and reset the param value assigned to that FX column to pre-held state

◆ resetPerformanceView()

void PerformanceView::resetPerformanceView ( ModelStackWithThreeMainThings * modelStack)

called when you press <> + back in param editor, it will clear existing param mappings in regular performance view or value editor, it will clear held pads and reset param values to pre-held state

◆ selectEncoderAction()

void PerformanceView::selectEncoderAction ( int8_t offset)
overridevirtual

Used to edit a pad's value in editing mode.

Reimplemented from UI.

◆ setParameterValue()

bool PerformanceView::setParameterValue ( ModelStackWithThreeMainThings * modelStack,
deluge::modulation::params::Kind paramKind,
int32_t paramID,
int32_t xDisplay,
int32_t knobPos,
bool renderDisplay = true )
private

this will set a new value for a parameter if we're dealing with stutter, it will check if stutter is active and end the stutter first if we're dealing with stutter, it will change the stutter rate value and then begin stutter if you're in the value editor, pressing a column and changing the value will also open the sound editor menu for the parameter to show you the current value in the menu in regular performance view, this function will also update the parameter value shown on the display

◆ timerCallback()

ActionResult PerformanceView::timerCallback ( )
overridevirtual

Reimplemented from UI.

◆ updateLayoutChangeStatus()

void PerformanceView::updateLayoutChangeStatus ( )

this compares the last loaded XML file defaults to the current layout in performance view to determine if there are any unsaved changes

◆ verticalEncoderAction()

ActionResult PerformanceView::verticalEncoderAction ( int32_t offset,
bool inCardRoutine )
overridevirtual

Reimplemented from UI.

◆ writeDefaultFXHoldStatusToFile()

void PerformanceView::writeDefaultFXHoldStatusToFile ( Serializer & writer,
int32_t xDisplay )
private

for each FX column, write the held status, what row is being held, and what previous value was (previous value is used to reset param after you remove the held status)

◆ writeDefaultFXRowValuesToFile()

void PerformanceView::writeDefaultFXRowValuesToFile ( Serializer & writer,
int32_t xDisplay )
private

creates "8 - 1 row # tags within a "row" tag" limiting # of rows to the # of rows on the grid (8 = kDisplayHeight)

◆ writeDefaultFXValuesToFile()

void PerformanceView::writeDefaultFXValuesToFile ( Serializer & writer)
private

creates "FX1 - FX16 tags" limiting # of FX to the # of columns on the grid (16 = kDisplayWidth) could expand # of FX in the future if we allow user to selected from a larger bank of FX / build their own FX

◆ writeDefaultsToFile()

void PerformanceView::writeDefaultsToFile ( )
private

write/load default values

create default XML file and write defaults I should check if file exists before creating one

Member Data Documentation

◆ backupXMLDefaultFXPress

FXColumnPress PerformanceView::backupXMLDefaultFXPress[kDisplayWidth]
private

backup loaded layout (what's currently in XML file) backup the last loaded/last saved changes, so you can compare and let user know if any changes need to be saved


The documentation for this class was generated from the following files: