Deluge Firmware 1.4.0
Build date: 2026.11.30
Loading...
Searching...
No Matches
deluge::gui::View Class Reference

Assorted utilities for manging the user interface. More...

#include <view.h>

Collaboration diagram for deluge::gui::View:

Public Types

enum class  HeldPadEdit : uint8_t { NONE , NOTE_LOCK , AUTOMATING }
 What a knob turn on held note pads is doing to the param, shown in the value popup.

Public Member Functions

void focusRegained ()
ActionResult buttonAction (deluge::hid::Button b, bool on, bool inCardRoutine)
void setTimeBaseScaleLedState ()
void setLedStates ()
void clipStatusMidiLearnPadPressed (bool on, Clip *whichLoopable)
void noteRowMuteMidiLearnPadPressed (bool on, NoteRow *whichNoteRow)
void endMidiLearnPressSession (MidiLearn newThingPressed=MidiLearn::NONE)
void noteOnReceivedForMidiLearn (MIDICable &cable, int32_t channel, int32_t note, int32_t velocity)
void pcReceivedForMIDILearn (MIDICable &cable, int32_t channel, int32_t pc)
void ccReceivedForMIDILearn (MIDICable &cable, int32_t channel, int32_t cc, int32_t value)
void drumMidiLearnPadPressed (bool on, Drum *drum, Kit *kit)
void instrumentMidiLearnPadPressed (bool on, Instrument *instrument)
void sectionMidiLearnPadPressed (bool on, uint8_t section)
void midiLearnFlash ()
void setModLedStates ()
int32_t getModKnobMode ()
void modEncoderAction (int32_t whichModEncoder, int32_t offset)
void modEncoderButtonAction (uint8_t whichModEncoder, bool on)
void modButtonAction (uint8_t whichButton, bool on)
void setKnobIndicatorLevels ()
void setKnobIndicatorLevel (uint8_t whichModEncoder)
int32_t convertPatchCableKnobPosToIndicatorLevel (int32_t knobPos)
void setActiveModControllableTimelineCounter (TimelineCounter *playPositionCounter, bool shouldSendMidiFeedback=true)
void setActiveModControllableWithoutTimelineCounter (ModControllable *modControllable, ParamManager *paramManager)
void cycleThroughReverbPresets ()
char const * getReverbPresetDisplayName (int32_t preset)
int32_t getCurrentReverbPreset ()
void setModRegion (uint32_t pos=0xFFFFFFFF, uint32_t length=0, int32_t noteRowId=0)
void notifyParamAutomationOccurred (ParamManager *paramManager, bool updateModLevels=true)
void handleParamAutomationNotice ()
void setSoundEditorParamManager (ParamManager *paramManager)
void displayAutomation ()
void displayOutputName (Output *output, bool doBlink=true, Clip *clip=nullptr)
void instrumentChanged (ModelStackWithTimelineCounter *modelStack, Instrument *newInstrument)
void navigateThroughPresetsForInstrumentClip (int32_t offset, ModelStackWithTimelineCounter *modelStack, bool doBlink=false)
void navigateThroughAudioOutputsForAudioClip (int32_t offset, AudioClip *clip, bool doBlink=false)
bool changeOutputType (OutputType newOutputType, ModelStackWithTimelineCounter *modelStack, bool doBlink=false)
void drawOutputNameFromDetails (OutputType outputType, int32_t slot, int32_t subSlot, char const *name, bool isNameEmpty, bool editedByUser, bool doBlink, Clip *clip=nullptr)
void startMIDILearn ()
void endMIDILearn ()
RGB getClipMuteSquareColour (Clip *clip, RGB thisColour, bool allowMIDIFlash=true)
ActionResult clipStatusPadAction (Clip *clip, bool on, int32_t yDisplayIfInSessionView=-1)
void flashPlayEnable ()
void flashPlayDisable ()
void flashPlayRoutine ()
void activateMacro (uint32_t y)
Clip * findNextClipForOutput (Output *output)
bool renderMacros (int32_t column, uint32_t y, int32_t selectedMacro, RGB image[][kDisplayWidth+kSideBarWidth], uint8_t occupancyMask[][kDisplayWidth+kSideBarWidth])
int32_t calculateKnobPosForDisplay (deluge::modulation::params::Kind kind, int32_t paramID, int32_t knobPos)
void displayModEncoderValuePopup (deluge::modulation::params::Kind kind, int32_t paramID, int32_t newKnobPos, PatchSource source1=PatchSource::NONE, PatchSource source2=PatchSource::NONE, HeldPadEdit heldPadEdit=HeldPadEdit::NONE)
void flushPendingModEncoderValuePopup ()
void potentiallyMakeItHarderToTurnKnob (int32_t whichModEncoder, ModelStackWithAutoParam *modelStackWithParam, int32_t newKnobPos)
void sendMidiFollowFeedback (ModelStackWithAutoParam *modelStackWithParam=nullptr, int32_t knobPos=kNoSelection, bool isAutomation=false)
bool potentiallyRenderVUMeter (RGB image[][kDisplayWidth+kSideBarWidth])
void potentiallyRenderAndSendVUMeter ()
void getParameterNameFromModEncoder (int32_t whichModEncoder, char *parameterName)
bool isClipContext ()
int32_t calculateKnobPosForModEncoderTurn (deluge::modulation::params::Kind kind, int32_t knobPos, int32_t offset)

Public Attributes

MidiLearn thingPressedForMidiLearn = MidiLearn::NONE
bool deleteMidiCommandOnRelease
bool midiLearnFlashOn
bool shouldSaveSettingsAfterMidiLearn
LearnedMIDI * learnedThing
Instrument * instrumentPressedForMIDILearn
Drum * drumPressedForMIDILearn
Kit * kitPressedForMIDILearn
ModelStackWithThreeMainThings activeModControllableModelStack
uint8_t dummy [MODEL_STACK_MAX_SIZE - sizeof(ModelStackWithThreeMainThings)]
bool pendingParamAutomationUpdatesModLevels
bool clipArmFlashOn
bool blinkOn
uint32_t timeSaveButtonPressed
int32_t modNoteRowId
uint32_t modPos
uint32_t modLength
bool displayVUMeter

Private Member Functions

void startParamAutomationTimers ()
void pretendModKnobsUntouchedForAWhile ()
void instrumentBeenEdited ()
void clearMelodicInstrumentMonoExpressionIfPossible ()
int32_t getMaxYDisplayForVUMeter (float level)
void renderVUMeter (int32_t maxYDisplay, int32_t xDisplay, RGB thisImage[][kDisplayWidth+kSideBarWidth])
 render AudioEngine::approxRMSLevel as a VU meter on the grid
void modEncoderAction_nonExistentParam (int32_t whichModEncoder, int32_t offset, ModelStackWithAutoParam *modelStackWithParam)
void modEncoderAction_existentParam (int32_t whichModEncoder, int32_t offset, ModelStackWithAutoParam *modelStackWithParam, bool noteTailsAllowedBefore)
ModelStackWithAutoParam * getModelStackWithParam (int32_t whichModEncoder, bool &noteTailsAllowedBefore)
void modEncoderButtonAction_deleteAutomation (uint8_t whichModEncoder)
void modEncoderButtonAction_changeModControllable (uint8_t whichModEncoder, bool on)

Private Attributes

uint8_t paramAutomationNotice_ = 0
ParamManager * soundEditorParamManager_ = nullptr
int32_t cachedMaxYDisplayForVUMeterL
int32_t cachedMaxYDisplayForVUMeterR
bool renderedVUMeter
bool vuMeterImageChanged {false}
bool hasPendingModEncoderValuePopup = false
deluge::modulation::params::Kind pendingPopupKind = deluge::modulation::params::Kind::NONE
int32_t pendingPopupParamID = -1
int32_t pendingPopupKnobPos = 0
PatchSource pendingPopupSource1 = PatchSource::NONE
PatchSource pendingPopupSource2 = PatchSource::NONE
HeldPadEdit pendingPopupHeldPadEdit = HeldPadEdit::NONE

Static Private Attributes

static constexpr uint8_t kParamNoticeActive = 1
static constexpr uint8_t kParamNoticeSoundEditor = 2
static constexpr uint8_t kParamNoticeModLevels = 4
static constexpr uint32_t MIN_DISPLAY_OWNERSHIP_TIME = kSampleRate
static constexpr uint32_t DISPLAY_TIMEOUT = kSampleRate / 4
static constexpr uint32_t MIN_UPDATE_INTERVAL = kSampleRate / 22

Detailed Description

Assorted utilities for manging the user interface.

Member Function Documentation

◆ convertPatchCableKnobPosToIndicatorLevel()

int32_t deluge::gui::View::convertPatchCableKnobPosToIndicatorLevel ( int32_t knobPos)

if you're dealing with a patch cable which has a -128 to +128 range we'll need to convert it to a 0 - 128 range for purpose of rendering on knob indicators

◆ potentiallyRenderAndSendVUMeter()

void deluge::gui::View::potentiallyRenderAndSendVUMeter ( )

For the views' graphicsRoutine(): render the VU meter into the sidebar if it's showing, and send the sidebar only if that changed it - most of the time the level hasn't moved a pad

◆ potentiallyRenderVUMeter()

bool deluge::gui::View::potentiallyRenderVUMeter ( RGB image[][kDisplayWidth+kSideBarWidth])

if you've toggled showing the VU meter, and the mod encoders are controllable (e.g. affect entire on) and the current mod button selected is the volume/pan button render VU meter on the grid


The documentation for this class was generated from the following files:
  • src/deluge/gui/views/view.h
  • src/deluge/gui/views/view.cpp