Namespace: DadGUI::cBypass_On_Off_Manager Files: cBypassOnOffManager.h / cBypassOnOffManager.cpp Directory: DAD_FORGE/GUI/Core/ Inheritance: iBypassOnOffManager, DadGUI::iGUI_EventListener Description: Manages state transitions between bypass, off, and on for audio effects, including fade-in/fade-out process management and MIDI commands.
📋 Class Description
The cBypass_On_Off_Manager class is responsible for managing state changes of an audio effect. It ensures smooth transitions between “Bypass”, “Off”, and “On” states using fade processes via the Dry/Wet mixer. It also listens to GUI fast update events and MIDI commands to trigger these transitions.
🔗 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
"GUI_Defines.h"
DAD_FORGE/GUI
Global GUI definitions
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 different possible states of the audio effect.
Element
Value
Description
bypass
0
Effect is bypassed (direct signal)
off
1
Effect is disabled (signal cut/muted)
on
2
Effect is active (processed signal)
📚 Public Methods
Initialize
Element
Details
Method
void Initialize()
Description
Initializes the manager with default states (Bypass), configures bypass relays, and subscribes to GUI fast update events.
Return
void
on_GUI_FastUpdate
Element
Details
Method
void on_GUI_FastUpdate()
Description
Handles the state machine during fast updates. Checks if a fade process is complete to update the internal state and triggers the necessary transitions toward the target state.
Return
void
setState
Element
Details
Method
void setState(eEffectState_t State)
Description
Sets the desired target state for the effect.
Parameter(s)
State
eEffectState_t: The target state (bypass, off, or on)
Return
void
🔒 Protected / Private Methods
BypassToOn
Element
Details
Method
void BypassToOn()
Description
Triggers a transition from Bypass state to On state by activating the fade-in of the Dry/Wet mixer.
Return
void
OnToBypass
Element
Details
Method
void OnToBypass()
Description
Triggers a transition from On state to Bypass state by activating the fade-out of the Dry/Wet mixer.
Return
void
OffToBypass
Element
Details
Method
void OffToBypass()
Description
Triggers a transition from Off state to Bypass state by activating the fade-out of the Dry/Wet mixer.
Return
void
OnToOff
Element
Details
Method
void OnToOff()
Description
Triggers a transition from On state to Off state by activating the fade-out of the Dry/Wet mixer.
Return
void
OffToOn
Element
Details
Method
void OffToOn()
Description
Triggers a transition from Off state to On state by activating the fade-in of the Dry/Wet mixer.