SynthLab SDK
SynthVoice Object

As with all of the SynthLab components, the SynthVoice is designed to be highly flexible in your personal application and coding style. The example synth projects will demonstrate the SynthLab paradigm of sharing data and parameters via module constructors and declaring voices statically in a fixed array, one voice per note of polyphony. You may have existing code that creates note event handlers on the fly or uses completely different schemes for data sharing. That is all fine because the voice and engine object's interfacing functions are generalized and require few arguments. If you adhere to using these functions as prototyped, but with your own implementations inside, then they will still fit into the SynthEngine <-> SynthVoice paradigm.

The SynthLab_SDK's source subfolder contains a partially coded SynthVoice object that you can use as a starting template for your own designs. It includes mostly default parameters that most voice objects need, and implements several helper functions for dealing with the note event lifecycle, voice stealing, and acculumlation into mixing buffers for rendering audio through the voice objects. It does NOT contain any delcarations for SynthModule components and does not depend on them, so you may use this with your existing synth components.

After looking at the template code, move to the next section and we will do an example to convert the MinSynth object from Minimal Standalone Synth into a SynthVoice object, adding more functionality for dealing with the note event lifecycle and sharing parameters rather that instantiating the objects in standalone mode, greatly improving efficiency.

Voice Programming Guide


synthlab_4.png