A ModulatorSynthChain processes multiple independent ModulatorSynth instances serially. More...
Classes | |
class | ModulatorSynthChainHandler |
Handles the ModulatorSynthChain. More... | |
Public Member Functions | |
void | compileAllScripts () |
Compiles all scripts in this chain. More... | |
const Processor * | getChildProcessor (int processorIndex) const override |
returns the total amount of child groups (internal chains + all child synths) | |
int | getNumChildProcessors () const override |
returns the total amount of child groups (internal chains + all child synths) | |
void | prepareToPlay (double newSampleRate, int samplesPerBlock) override |
Prepares all ModulatorSynths for playback. More... | |
void | renderNextBlockWithModulators (AudioSampleBuffer &buffer, const HiseEventBuffer &inputMidiBuffer) override |
This renders the child synths: More... | |
void | restoreFromValueTree (const ValueTree &v) override |
Restores the Processor. More... | |
Public Member Functions inherited from ModulatorSynth | |
virtual int | collectSoundsToBeStarted (const HiseEvent &m) |
This method should go through all sounds that are playable and fill the soundsToBeStarted array. More... | |
float | getBalance (bool getRightChannelGain) const |
Returns the calculated (equal power) pan value for either the left or the right channel. More... | |
const float * | getConstantPitchValues () const |
Returns the pointer to the calculated pitch buffers for the ModulatorSynthVoice's render callback. More... | |
ModulatorSynthVoice * | getFreeVoice (SynthesiserSound *s, int midiChannel, int midiNoteNumber) |
Returns a read pointer to the calculated pitch values. More... | |
float | getGain () const |
Returns the gain of the ModulatorSynth from 0.0 to 1.0. More... | |
ModulatorSynthGroup * | getGroup () const |
Returns the ModulatorSynthGroup that this ModulatorSynth belongs to. More... | |
int | getIndexInGroup () const |
Returns the index of the child synth if it resides in a group and -1 if not. More... | |
float * | getPitchValuesForVoice () const |
Returns a read pointer to the calculated pitch values. More... | |
ModulatorSynth * | getPlayingSynth () |
Returns either itself or the group that is playing its voices. More... | |
int | getVoiceIndex (const SynthesiserVoice *v) const |
Returns the voice index for the voice (the index in the internal voice array). More... | |
void | handleHiseEvent (const HiseEvent &e) |
Same functionality as Synthesiser::handleMidiEvent(), but sends the midi event to all Modulators in the chains. More... | |
virtual void | handleRetriggeredNote (ModulatorSynthVoice *voice) |
specifies the behaviour when a note is started that is already ringing. More... | |
virtual void | initRenderCallback () |
Clears the internal buffer. More... | |
bool | isInGroup () const |
Checks if the Synth was added to a group. More... | |
void | killAllVoicesWithNoteNumber (int noteNumber) |
Kills the note with the specified note number. More... | |
int | killLastVoice (bool allowTailOff=true) |
Kills the voice that is playing for the longest time. More... | |
void | noteOn (const HiseEvent &m) |
Same functionality as Synthesiser::noteOn(), but calls calculateVoiceStartValue() if a new voice is started. More... | |
void | postVoiceRendering (int startSample, int numThisTime) |
This method is called to handle all modulatorchains after the voice rendering and handles the GUI metering. More... | |
virtual void | preVoiceRendering (int startSample, int numThisTime) |
This method is called to handle all modulatorchains just before the voice rendering. More... | |
void | renderVoice (int startSample, int numThisTime) |
This method is called to actually render all voices. More... | |
void | setBalance (float newBalance) |
sets the balance from -1.0 (left) to 1.0 (right) and applies a equal power pan rule. More... | |
void | setClockSpeed (ClockSpeed newClockSpeed) |
Sets the interval for the internal clock callback. More... | |
void | setGain (float newGain) |
sets the gain of the ModulatorSynth from 0.0 to 1.0. More... | |
void | setGroup (ModulatorSynthGroup *parent) |
Sets the parent group. More... | |
virtual bool | soundCanBePlayed (ModulatorSynthSound *sound, int midiChannel, int midiNoteNumber, float velocity) |
Checks if the message fits the sound, but can be overriden to implement other group start logic. More... | |
Public Member Functions inherited from Processor | |
void | enableConsoleOutput (bool shouldBeEnabled) |
Enables the Processor to output messages to the Console. More... | |
bool | getEditorState (int state) const |
Restores the state of the Processor's editor. More... | |
const String & | getId () const |
Returns the unique id of the Processor instance (!= the Processor name). More... | |
virtual Identifier | getIdentifierForParameterIndex (int parameterIndex) const |
This returns a Identifier with the name of the parameter. More... | |
float | getInputValue () const |
This can be used to display the Processors input value. More... | |
int | getLargestBlockSize () const |
Returns the block size. More... | |
virtual const String | getName () const |
Overwrite this and return a pretty name. More... | |
int | getNumParameters () const |
This returns the number of (named) parameters. More... | |
float | getOutputValue () const |
This can be used to display the Processors output value. More... | |
double | getSampleRate () const |
Returns the sample rate. More... | |
const Path | getSymbol () const |
Returns the symbol of the Processor. More... | |
virtual const Identifier | getType () const =0 |
Overwrite this method to specify the name. More... | |
int | getVoiceAmount () const noexcept |
getNumVoices() is occupied by the Synthesiser class, d'oh! | |
bool | isBypassed () const noexcept |
Returns true if the processor is bypassed. More... | |
Processor (MainController *m, const String &id_, int numVoices) | |
Creates a new Processor with the given Identifier. More... | |
void | restoreCompleteEditorState (const XmlElement *storedState) |
Restores the EditorState from a BigInteger that was retrieved using getCompleteEditorState. More... | |
void | setAttribute (int parameterIndex, float newValue, juce::NotificationType notifyEditor) |
Changes a Processor parameter. More... | |
void | setEditorState (int state, bool isOn, NotificationType notifyView=sendNotification) |
Saves the state of the Processor's editor. More... | |
void | setIsOnAir (bool isBeingProcessedInAudioThread) |
Call this method after inserting the processor in the signal chain. More... | |
void | setSymbol (Path newSymbol) |
Sets a special symbol for the Processor. More... | |
virtual | ~Processor () |
Overwrite this if you need custom destruction behaviour. More... | |
Public Member Functions inherited from SafeChangeBroadcaster | |
void | addChangeListener (SafeChangeListener *listener) |
Registers a listener to receive change callbacks from this broadcaster. More... | |
void | removeAllChangeListeners () |
Removes all listeners from the list. More... | |
void | removeChangeListener (SafeChangeListener *listener) |
Unregisters a listener from the list. More... | |
void | sendAllocationFreeChangeMessage () |
This will send a message without allocating a message slot. More... | |
void | sendChangeMessage (const String &=String()) |
Causes an asynchronous change message to be sent to all the registered listeners. More... | |
void | sendSynchronousChangeMessage () |
Sends a synchronous change message to all the registered listeners. More... | |
Public Member Functions inherited from ControlledObject | |
ControlledObject (MainController *m) | |
Creates a new ControlledObject. More... | |
const MainController * | getMainController () const noexcept |
Provides read-only access to the main controller. More... | |
MainController * | getMainController () noexcept |
Provides write access to the main controller. More... | |
Public Member Functions inherited from RoutableProcessor | |
void | editRouting (Component *childComponent) |
Opens a routing editor in the quasi modal popup. More... | |
int | getLeftDestinationChannel () const |
Quick way to get the left target channel. More... | |
int | getLeftSourceChannel () const |
Quick way to get the left channel for processing. More... | |
int | getRightDestinationChannel () const |
Quick way to get the right target channel. More... | |
int | getRightSourceChannel () const |
Quick way to get the right channel for processing. More... | |
Public Member Functions inherited from MacroControlBroadcaster | |
void | addControlledParameter (int macroControllerIndex, const String &processorId, int parameterId, const String ¶meterName, NormalisableRange< double > range, bool readOnly=true) |
Adds a parameter. More... | |
void | clearData (int macroIndex) |
Removes all parameters and resets the name. More... | |
MacroControlData * | getMacroControlData (int index) |
Returns the MacroControlData object at the supplied index. More... | |
const MacroControlData * | getMacroControlData (int index) const |
Returns the MacroControlData object at the supplied index. More... | |
int | getMacroControlIndexForProcessorParameter (const Processor *p, int parameter) const |
searches all macroControls and returns the index of the control if the supplied parameter is mapped or -1 if it is not mapped. More... | |
bool | hasActiveParameters (int macroIndex) |
Checks if the macro control has any parameters. More... | |
void | loadMacroValuesFromValueTree (const ValueTree &v) |
Only loads the values of the macros (and doesn't recreate the macro controls. More... | |
MacroControlBroadcaster (ModulatorSynthChain *chain) | |
Creates a new MacroControlBroadcaster with eight Macro slots. More... | |
void | replaceMacroControlData (int index, MacroControlData *newData, ModulatorSynthChain *parentChain) |
this replaces the macro control data object at the specified index with the new one. More... | |
void | setMacroControl (int macroIndex, float newValue, NotificationType notifyEditor=dontSendNotification) |
sets the macro control to the supplied value and sends a notification message if desired. More... | |
Public Member Functions inherited from Chain | |
bool | restoreChain (const ValueTree &v) |
Restores a Chain from a ValueTree. More... | |
Additional Inherited Members | |
Public Types inherited from ModulatorSynth | |
enum | InternalChains |
These are the three Chains that the ModulatorSynth uses. More... | |
enum | Parameters { Gain = 0, Balance, VoiceLimit, KillFadeTime } |
Public Types inherited from Processor | |
enum | InternalChains |
Overwrite this enum and list all internal chains. More... | |
enum | SpecialParameters |
Overwrite this enum and add new parameters. More... | |
Static Public Member Functions inherited from MacroControlBroadcaster | |
static Processor * | findProcessor (Processor *p, const String &idToSearch) |
Small helper function that iterates all child processors and returns the matching Processor with the given ID. More... | |
Protected Member Functions inherited from Processor | |
virtual Path | getSpecialSymbol () const |
Overwrite this method if you want to supply a custom symbol for the Processor. More... | |
void | setInputValue (float newValue, NotificationType notify=sendNotification) |
Call this from the baseclass whenever you want its editor to display a input value change. More... | |
void | setOutputValue (float newValue) |
Call this from the baseclass whenever you want its editor to display a value change. More... | |
A ModulatorSynthChain processes multiple independent ModulatorSynth instances serially.
This class is supposed to be a wrapper for ModulatorSynths which are processed individually with their own MidiProcessors, Modulators and Effects. You can add some MidiProcessors which will be applied to all chains as well as non polyphonic gain Modulators (like a LfoModulator) which will be applied to the sum of the chain. However, midi messages are not recognized by those modulators (because they are not evaluated on the ModulatorSynthChain level), so don't expect too much.
If you want to create a group of ModulatorSynths that share common Modulators / MidiProcessors, use a ModulatorSynthGroup instead.
A ModulatorSynthChain also allows macro controls which can control any Parameter of every sub processor.
void compileAllScripts | ( | ) |
Compiles all scripts in this chain.
If a ScriptProcessor is restored, the script will not be compiled immediately, because it could rely on other Processors that are created afterwards. Call this function after every processor is created (normally after the restoreFromValueTree function).
|
overridevirtual |
Prepares all ModulatorSynths for playback.
Reimplemented from ModulatorSynth.
|
overridevirtual |
This renders the child synths:
Reimplemented from ModulatorSynth.
|
overridevirtual |
Restores the Processor.
Don't forget to call compileAllScripts() !.
Reimplemented from ModulatorSynth.