SynthLab SDK
Dynamic String Function Calls

The SynthModule base class provides built-in functions for retrieving all of these strings at any time during operation. Usually these are called through an interfacing function on the engine object, which then calls a function on the first synth voice (all will have identical strings), which then calls the function on its SynthModule member. Specifically, there are get-string functions for:

  1. the list of up to 4 cores per module
  2. the list of up to 16 module strings per core
  3. the list of four mod knob labels (there will always be four of them)

You can find the get-functions in the SynthModule class declaration; remember that modules may also be used without cores, and so there are two sets of functions, one for use with cores and another for use with solo SynthModules. Note that all of these functions and their arguments are documented within this guide.

// --- function to get the names of the (up to) four cores a SynthModule may own
virtual bool getModuleCoreStrings(std::vector<std::string>& moduleCoreStrings);
// --- For SynthModules WITHOUT cores, or to get the currently selected core's strings
//
// --- function to get the module strings from a SynthModule WITHOUT cores
// for modules WITH cores, this will return the strings of the selected core
virtual bool getModuleStrings(std::vector<std::string>& moduleStrings, std::string ignoreStr = "");
// --- function to get the mod knob labels form a SynthModule WITHOUT cores
// for modules WITH cores, this will return the mod knob labels of the selected core
virtual bool getModKnobStrings(std::vector<std::string>& modKnobStrings);
// --- For SynthModules WITH cores
// --- function to get the module strings from a SynthModule WITH cores for a PARTICULAR core of interest
// (use coreIndex argument, 0 to 3 for the four cores)
virtual bool getModuleStrings(uint32_t coreIndex, std::vector<std::string>& moduleStrings, std::string ignoreStr);
// --- function to get the mod knob labels for a PARTICULAR core of interest
// (use coreIndex argument, 0 to 3 for the four cores)
virtual bool getModKnobStrings(uint32_t coreIndex, std::vector<std::string>& modKnobStrings);
//

Lastly, there is a function that will create a list of ALL of the module strings for all of the module cores, providing up to 64 entries. This is used in the Wave Sequencing synth to allow the user to sequence waveforms from any of the four wavetable cores that are loaded. This function simply appends each set of module strings in succession and will always produce a string that has 64 entries, though some of the entries may be blank strings.

// --- get a combination of all module strings for all cores at once; the resulting vector will have 64 entries
virtual bool getAllModuleStrings(std::vector<std::string>& moduleStrings, std::string ignoreStr);
// ---


synthlab_4.png