All Classes Namespaces Functions Variables Enumerations Enumerator Modules Pages
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
MainController Class Referenceabstract
Inheritance diagram for MainController:
GlobalScriptCompileBroadcaster ThreadWithQuasiModalProgressWindow::Holder BackendProcessor FrontendProcessor


class  MacroManager
class  SampleManager

Public Member Functions

void compileAllScripts ()
void allNotesOff ()
void beginParameterChangeGesture (int index)
void endParameterChangeGesture (int index)
void setPluginParameter (int index, float newValue)
double getUptime () const noexcept
double getBpm () const noexcept
void skin (Component &c)
void addTempoListener (TempoListener *t)
void removeTempoListener (TempoListener *t)
void setGlobalVariable (int index, var newVariable)
var getGlobalVariable (int index) const
virtual ModulatorSynthChaingetMainSynthChain ()=0
float getCpuUsage () const
int getNumActiveVoices () const
void setGlobalPitchFactor (double pitchFactorInSemiTones)
double getGlobalPitchFactor () const
double getGlobalPitchFactorSemiTones () const
- Public Member Functions inherited from GlobalScriptCompileBroadcaster
void sendScriptCompileMessage (JavascriptProcessor *processorThatWasCompiled)
void addScriptListener (GlobalScriptCompileListener *listener, bool insertAtBeginning=false)

Static Public Member Functions

static ProcessorcreateProcessor (FactoryType *FactoryTypeToUse, const Identifier &typeName, const String &id)

Protected Member Functions

void setBpm (double bpm_)
void checkAllNotesOff ()

Detailed Description

A class for handling application wide tasks.

Every Processor must be connected to a MainController instance and has access to its public methods.

Member Function Documentation

void addTempoListener ( TempoListener t)

adds a TempoListener to the main controller that will receive a callback whenever the host changes the tempo.

void allNotesOff ( )

Call this if you want all voices to stop.

void beginParameterChangeGesture ( int  index)

same as AudioProcessor::beginParameterGesture().

void checkAllNotesOff ( )

Checks if a connected object called allNotesOff() and replaces the content of the supplied MidiBuffer with a allNoteOff event.

void compileAllScripts ( )

Compiles all scripts in the main synth chain

Processor * createProcessor ( FactoryType FactoryTypeToUse,
const Identifier &  typeName,
const String &  id 

Create a new processor and returns it. You have to supply a Chain that the Processor will be added to.

The function is static (it will get the MainController() instance from the FactoryType).

FactoryTypethis is used to create the processor and connect it to the MainController.
typeNamethe identifier string of the processor that should be created.
idthe name of the processor to be created.
a new processor. You have to manage the ownership yourself.
void endParameterChangeGesture ( int  index)

same as AudioProcessor::beginParameterGesture().

double getBpm ( ) const

returns the tempo as bpm.

float getCpuUsage ( ) const

Returns the time that the plugin spends in its processBlock method.

double getGlobalPitchFactor ( ) const

This returns the global pitch factor.

Use this in your startVoice method and multiplicate it with your angleDelta.

double getGlobalPitchFactorSemiTones ( ) const

This returns the global pitch factor as semitones.

This can be used for displaying / saving purposes.

var getGlobalVariable ( int  index) const

returns the variable saved at the global index.

virtual ModulatorSynthChain* getMainSynthChain ( )
pure virtual

this must be overwritten by the derived class and return the master synth chain.

int getNumActiveVoices ( ) const

Returns the amount of playing voices.

double getUptime ( ) const

Returns the uptime in seconds.

void removeTempoListener ( TempoListener t)

removes a TempoListener.

void setBpm ( double  bpm_)

sets the new BPM and sends a message to all registered tempo listeners if the tempo changed.

void setGlobalPitchFactor ( double  pitchFactorInSemiTones)

This sets the global pitch factor.

void setGlobalVariable ( int  index,
var  newVariable 

saves a variable into the global index.

void setPluginParameter ( int  index,
float  newValue 

sets the plugin parameter to the new Value.

void skin ( Component &  c)

skins the given component (applies the global look and feel to it).

©2017 HISE. This documentation is autogenerated from the HISE source code using Doxygen.