3 #include "pluginstructures.h" 4 #include "../../examples/synthlab_examples/synthengine.h" 49 droplistControl_ASPiK =
nullptr;
50 droplistControl_RAFX =
nullptr;
52 controlStringCount = 0;
54 for (uint32_t i = 0; i < 4; i++)
56 modKnobLabel_RAFX[i] =
nullptr;
57 modKnobLabel_ASPiK[i] =
nullptr;
62 uint32_t droplistMask = 0;
63 ICustomView* droplistControl_RAFX =
nullptr;
64 ICustomView* droplistControl_ASPiK =
nullptr;
67 uint32_t modKnobMask = 0;
68 ICustomView* modKnobLabel_RAFX[4] = {
nullptr,
nullptr,
nullptr,
nullptr };
69 ICustomView* modKnobLabel_ASPiK[4] = {
nullptr,
nullptr,
nullptr,
nullptr };
73 uint32_t controlStringCount = 0;
87 moduleAuxParamSet(uint32_t _attValCoreMenu, uint32_t _attValWaveMenu, uint32_t _attValModKnobs,
88 uint32_t _coreMenuCtrlID, uint32_t _waveMenuCtrlID,
89 uint32_t _modKnob_A_CtrlID, uint32_t _modKnob_B_CtrlID,
90 uint32_t _modKnob_C_CtrlID, uint32_t _modKnob_D_CtrlID)
91 : attValCoreMenu(_attValCoreMenu)
92 , attValWaveMenu(_attValWaveMenu)
93 , attValModKnobs(_attValModKnobs)
94 , coreMenuCtrlID(_coreMenuCtrlID)
95 , waveMenuCtrlID(_waveMenuCtrlID)
96 , modKnob_A_CtrlID(_modKnob_A_CtrlID)
97 , modKnob_B_CtrlID(_modKnob_B_CtrlID)
98 , modKnob_C_CtrlID(_modKnob_C_CtrlID)
99 , modKnob_D_CtrlID(_modKnob_D_CtrlID) {}
105 uint32_t coreMenuCtrlID = 0;
106 uint32_t waveMenuCtrlID = 0;
107 uint32_t modKnob_A_CtrlID = 0;
108 uint32_t modKnob_B_CtrlID = 0;
109 uint32_t modKnob_C_CtrlID = 0;
110 uint32_t modKnob_D_CtrlID = 0;
147 bool setModKnobLabelView(uint32_t controlID, ICustomView* modKnobLabelControl,
bool isRAFXView);
148 bool setCustomDroplistView(uint32_t controlID, ICustomView* _droplistControl,
bool isRAFXView,
bool isCoreList);
164 std::vector<std::string> names = synthEngine->getModuleCoreNames(moduleType);
181 std::shared_ptr<SynthLab::SynthEngine> synthEngine =
nullptr;
182 void* pluginCore =
nullptr;
183 uint32_t customUpdateCode_1 = 0.0;
197 if ((code & mask) == 0)
248 size_t queueSize =
customViewInfo[index].droplistDataQueue.size_approx();
251 customViewInfo[index].droplistDataQueue.enqueue(synthEngine->getModuleStrings(droplistMask));
257 std::vector<std::string> knobLabels = synthEngine->getModKnobStrings(modKnobMask);
258 uint32_t numLabels = knobLabels.size();
259 numLabels = fmin(numLabels, 4);
260 for (
int i = 0; i < numLabels; i++)
263 size_t queueSize =
customViewInfo[index].modKnobLabelDataQueue[i].size_approx();
266 customViewInfo[index].modKnobLabelDataQueue[i].enqueue(knobLabels[i]);
286 bool success =
customViewInfo[index].droplistDataQueue.try_dequeue(strings);
289 while (
customViewInfo[index].droplistDataQueue.try_dequeue(strings))
307 bool success =
customViewInfo[slot].modKnobLabelDataQueue[index].try_dequeue(
string);
310 while (
customViewInfo[slot].modKnobLabelDataQueue[index].try_dequeue(
string))
bool setModKnobLabelView(uint32_t controlID, ICustomView *modKnobLabelControl, bool isRAFXView)
Adds a custom view interface pointer to the list of custom controls for mod knob labels.
Definition: synthlabds.cpp:96
void enableCustomViewDataQueue(bool value)
get atomic variable as float
Definition: synthlabds.h:143
const uint32_t LFO1_MOD_KNOBS
Definition: synthconstants.h:197
bool haveCustomUpdates() const
set atomic variable with float
Definition: synthlabds.h:144
std::atomic< bool > queueEnabler
atomic bool for enabling/disabling the queue
Definition: synthlabds.h:225
Definition: readerwriterqueue.h:60
Definition: synthlabds.h:85
bool isCustomViewDataQueueEnabled() const
set atomic variable with float
Definition: synthlabds.h:142
bool setCustomDroplistView(uint32_t controlID, ICustomView *_droplistControl, bool isRAFXView, bool isCoreList)
Adds a custom view interface pointer to the list of custom controls for drop-lists or list controls...
Definition: synthlabds.cpp:46
void enableCustomUpdates(bool value)
get atomic variable as float
Definition: synthlabds.h:145
int countTrailingZero(int x)
count trailing zeros in a binary number
Definition: synthfunctions.h:1577
void enqueueCustomData(uint32_t index)
Queues up GUI dynamic strings for reloading into the GUI. The operation is asynchronous thus the queu...
Definition: synthlabds.h:238
const uint32_t CUSTOM_BITS
Definition: synthlabds.h:32
const uint32_t CUSTOM_KNOB_LABEL_INDEX
Definition: synthlabds.h:30
bool updateCustomView(uint32_t slot)
Sets information about the custom view including the strings for the controls.
Definition: synthlabds.cpp:186
const uint32_t LFO1_SOURCE
Definition: synthconstants.h:164
Definition: synthlabds.h:44
void clearCustomViewInfo()
simple clearing of data
Definition: synthlabds.h:172
int32_t customUpdateMaskToIndex(uint32_t mask, bool upper32)
Converts a custom update mask (bits in a uint32_t) into an index for the custom view information arra...
Definition: synthlabds.h:214
bool getModKnobLabel(uint32_t slot, uint32_t index, std::string &string)
De-queue the lists to see if there are mod knob labels for a GUI control.
Definition: synthlabds.h:302
DynamicStringManager(std::shared_ptr< SynthLab::SynthEngine > _synthEngine, void *_pluginCore)
Constructs the manager object; the manager needs access to the synth engine to query it for custom GU...
Definition: synthlabds.cpp:27
bool getWaveformStrings(uint32_t index, std::vector< std::string > &strings)
De-queue the lists to see if there are waveform strings for a GUI control.
Definition: synthlabds.h:279
bool setCustomUpdateCodes(uint32_t customUpdateCode_1, uint32_t customUpdateCode_2)
Functions for dealing with a custom update code uint32_t where each bit encodes a particular GUI cont...
Definition: synthlabds.cpp:137
const uint32_t CUSTOM_OPTION_MENU
Definition: synthlabds.h:28
CustomViewInfo customViewInfo[TOTAL_CUSTOM_VIEWS]
one slot per bit * 2 because MSB sets more stuff
Definition: synthlabds.h:184
int32_t customUpdateCodeToIndex(uint32_t code, uint32_t mask, bool upper32)
Converts a custom update code (bits in a uint32_t) into an index for the custom view information arra...
Definition: synthlabds.h:195
const uint32_t CUSTOM_KNOB_LABEL
Definition: synthlabds.h:29
Dynamic string manager - this object connects plugin parameters and their GUI controls with new or di...
Definition: synthlabds.h:128
std::atomic< bool > updateEnabler
atomic bool for enabling/disabling the queue
Definition: synthlabds.h:226
std::vector< std::string > getModuleCoreNames(uint32_t moduleType)
This demonstrates how to get the module core names from the engine.
Definition: synthlabds.h:162
const uint32_t TOTAL_CUSTOM_VIEWS
Definition: synthlabds.h:31
const uint32_t LFO1_WAVEFORMS
Definition: synthconstants.h:153