SynthLab SDK
SynthLab::ModMatrixParameters Struct Reference

Custom GUI control structure for the modulation matrix. More...

#include <synthlabparams.h>

Public Member Functions

ModMatrixParametersoperator= (const ModMatrixParameters &params)
 
void setMM_SourceIntensity (uint32_t destination, double intensity)
 set source intensity value More...
 
void setMM_ChannelEnable (uint32_t source, uint32_t destination, bool enable)
 enable/disable a routing channel More...
 
void setMM_HardwireEnable (uint32_t source, uint32_t destination, bool enable)
 set/clear a routing as hardwired More...
 
void setMM_ChannelIntensity (uint32_t source, uint32_t destination, double intensity)
 set the channel intensity control that connects a source/destination pair in a routing More...
 
void setMM_DestHardwireIntensity (uint32_t source, uint32_t destination, double intensity)
 set the hardwired intensity control that connects a source/destination pair in a routing and bypasses the normal enable/intensity switches More...
 
void setMM_DestIntensity (uint32_t destination, double intensity)
 set the destination (column) intensity control More...
 
void setMM_DestDefaultValue (uint32_t destination, double defaultValue)
 set a defalt value to prevent accidental no-note events More...
 
void setMM_DestHighPriority (uint32_t destination, bool _priorityModulation)
 mark a destination has high-priority More...
 
void setMM_HardwiredRouting (uint32_t source, uint32_t destination, double intensity=1.0)
 Helper function to set a source/destination/intensity trio that defines a hard-wired routing. More...
 

Public Attributes

std::shared_ptr< std::array< ModSource, kNumberModSources > > modSourceRows = std::make_shared<std::array<ModSource, kNumberModSources>>()
 
std::shared_ptr< std::array< ModDestination, kNumberModDestinations > > modDestinationColumns = std::make_shared<std::array<ModDestination, kNumberModDestinations>>()
 

Detailed Description

Custom GUI control structure for the modulation matrix.

  • consists of a set of modulation ROWS (sources) and COLUMNS (destinations)
  • the parameter structure also does some of the work when the mod matrix is being prgrammed; this was simpler than having the matrix object perform the chores since much of it happens in the GUI update handler in your framework.
Author
Will Pirkle http://www.willpirkle.com
Remarks
This object is included in Designing Software Synthesizer Plugins in C++ 2nd Ed. by Will Pirkle
Version
Revision : 1.0
Date
Date : 2021 / 05 / 02

Member Function Documentation

◆ setMM_ChannelEnable()

void SynthLab::ModMatrixParameters::setMM_ChannelEnable ( uint32_t  source,
uint32_t  destination,
bool  enable 
)
inline

enable/disable a routing channel

Parameters
sourcethe channel for the source
destinationthe index of the destination column
enabletrue to enable the routing, false to disonnect it

◆ setMM_ChannelIntensity()

void SynthLab::ModMatrixParameters::setMM_ChannelIntensity ( uint32_t  source,
uint32_t  destination,
double  intensity 
)
inline

set the channel intensity control that connects a source/destination pair in a routing

  • not used in SythLab project, but gives flexibility if you want to use it
Parameters
sourcethe channel for the source
destinationthe index of the destination column
intensitythe strength of the routing [0, 1]

◆ setMM_DestDefaultValue()

void SynthLab::ModMatrixParameters::setMM_DestDefaultValue ( uint32_t  destination,
double  defaultValue 
)
inline

set a defalt value to prevent accidental no-note events

Parameters
destinationthe index of the destination column
defaultValueinitial value

◆ setMM_DestHardwireIntensity()

void SynthLab::ModMatrixParameters::setMM_DestHardwireIntensity ( uint32_t  source,
uint32_t  destination,
double  intensity 
)
inline

set the hardwired intensity control that connects a source/destination pair in a routing and bypasses the normal enable/intensity switches

Parameters
sourcethe channel for the source
destinationthe index of the destination column
intensitythe strength of the routing [0, 1]

◆ setMM_DestHighPriority()

void SynthLab::ModMatrixParameters::setMM_DestHighPriority ( uint32_t  destination,
bool  _priorityModulation 
)
inline

mark a destination has high-priority

  • high-priority modulations are done on every sample intervale and are fine rather than coarse like their block processing countarparts
  • not used in SynthLab
Parameters
destinationthe index of the destination column
_priorityModulationtrue for priority

◆ setMM_DestIntensity()

void SynthLab::ModMatrixParameters::setMM_DestIntensity ( uint32_t  destination,
double  intensity 
)
inline

set the destination (column) intensity control

Parameters
destinationthe index of the destination column
intensitythe strength of the routing [0, 1]

◆ setMM_HardwiredRouting()

void SynthLab::ModMatrixParameters::setMM_HardwiredRouting ( uint32_t  source,
uint32_t  destination,
double  intensity = 1.0 
)
inline

Helper function to set a source/destination/intensity trio that defines a hard-wired routing.

Parameters
sourcethe index of the channel
destinationthe index of the destination column
intensityon range [-1.0, +1.0]

◆ setMM_HardwireEnable()

void SynthLab::ModMatrixParameters::setMM_HardwireEnable ( uint32_t  source,
uint32_t  destination,
bool  enable 
)
inline

set/clear a routing as hardwired

Parameters
sourcethe channel for the source
destinationthe index of the destination column
enabletrue to enable the routing, false to disonnect it

◆ setMM_SourceIntensity()

void SynthLab::ModMatrixParameters::setMM_SourceIntensity ( uint32_t  destination,
double  intensity 
)
inline

set source intensity value

Parameters
destinationthe index of the source row
intensitythe intensity value from [0, 1]

Member Data Documentation

◆ modDestinationColumns

std::shared_ptr<std::array<ModDestination, kNumberModDestinations> > SynthLab::ModMatrixParameters::modDestinationColumns = std::make_shared<std::array<ModDestination, kNumberModDestinations>>()

array of modulation destinations (columns)

◆ modSourceRows

std::shared_ptr<std::array<ModSource, kNumberModSources> > SynthLab::ModMatrixParameters::modSourceRows = std::make_shared<std::array<ModSource, kNumberModSources>>()

array of modulation sources (rows)


The documentation for this struct was generated from the following file: