DadGUI::cOn_Off_Manager

Namespace: DadGUI::cOn_Off_Manager
Files: cBypassOnOffManager.h / cBypassOnOffManager.cpp
Directory: DAD_FORGE/GUI/Core/
Inheritance: iBypassOnOffManager, DadGUI::iGUI_EventListener
Description: Manages state transitions between the ON and OFF states for audio effects.

๐Ÿ“‹ Class Description

The cOn_Off_Manager class is a simplified implementation of iBypassOnOffManager that does not handle the โ€œBypassโ€ state. It focuses on the transition between activation (ON) and deactivation (OFF) of the effect. It uses fade-in/fade-out processes to ensure smooth audio transitions and listens to MIDI commands to toggle between these two states.

๐Ÿ”— External Dependencies

File Inclusions

Included File Source Role
"GUI_Event.h" DAD_FORGE/GUI GUI event management
"cDryWet.h" DAD_FORGE/Drivers Dry/Wet mixing control for transitions
"cMidi.h" DAD_FORGE/Drivers MIDI message management

Global Variables

Variable / Object Type Source Role
__DryWet DadDrivers::cDryWet extern in cBypassOnOffManager.h Audio mixing control for transitions
__Midi DadDrivers::cMidi extern in cBypassOnOffManager.cpp MIDI command reception
__GUI_EventManager DadGUI::GUI_EventManager extern in cBypassOnOffManager.cpp GUI event publishing/subscription

๐ŸŽฏ Enumerations and Associated Structures

eEffectState_t

Represents the states supported by this manager (bypass mode is mapped to OFF).

Element Value Description
bypass 0 Mapped to off state in this manager
off 1 Effect is disabled
on 2 Effect is active

๐Ÿ“š Public Methods

Initialize

Element Details
Method void Initialize()
Description Initializes the state to โ€˜offโ€™, configures the Dry/Wet mixer, subscribes to GUI events, and configures MIDI callbacks (ON, OFF, BYPASS).
Return void

on_GUI_FastUpdate

Element Details
Method void on_GUI_FastUpdate()
Description Checks if a target state change has been requested. If so, initiates the transition (OnToOff or OffToOn). Updates the internal state once the fade is complete.
Return void

setState

Element Details
Method void setState(eEffectState_t State)
Description Sets the target state. Note: the bypass state is converted to off for this manager.
Parameter(s) ย 
State eEffectState_t: The desired target state.
Return void

๐Ÿ”’ Protected / Private Methods

OnToOff

Element Details
Method void OnToOff()
Description Triggers the transition from the On state to the Off state via a fade-out.
Return void

OffToOn

Element Details
Method void OffToOn()
Description Triggers the transition from the Off state to the On state via a fade-in.
Return void

MIDI_On_CallBack

Element Details
Method static void MIDI_On_CallBack(uint8_t control, uint8_t value, uint32_t userData)
Description MIDI callback for the ON state.
Parameter(s) ย 
control uint8_t: MIDI CC code
value uint8_t: Value
userData uint32_t: Pointer to the instance
Return void

MIDI_Off_CallBack

Element Details
Method static void MIDI_Off_CallBack(uint8_t control, uint8_t value, uint32_t userData)
Description MIDI callback for the OFF state.
Parameter(s) ย 
control uint8_t: MIDI CC code
value uint8_t: Value
userData uint32_t: Pointer to the instance
Return void

MIDI_ByPass_CallBack

Element Details
Method static void MIDI_ByPass_CallBack(uint8_t control, uint8_t value, uint32_t userData)
Description MIDI callback for BYPASS (mapped to OFF).
Parameter(s) ย 
control uint8_t: MIDI CC code
value uint8_t: Value
userData uint32_t: Pointer to the instance
Return void

๐Ÿ“ฆ Data Members

Private Variables

Member Type Description
m_OldEffectState eEffectState_t Previous state for change detection.
m_FadeInProcess bool Fade process in progress indicator.

DAD_FORGE/DSP - Dad Design DSP Library
Copyright (c) 2024-2026 Dad Design.


This site uses Just the Docs, a documentation theme for Jekyll.