Public Member Functions | List of all members
HardcodedScriptProcessor Class Reference

The base class for all MidiProcessors that are hardcoded scripts. More...

Inheritance diagram for HardcodedScriptProcessor:
ScriptBaseMidiProcessor MidiProcessor ProcessorWithScriptingContent Processor SafeChangeBroadcaster RestorableObject ControlledObject Dispatchable Arpeggiator CCSwapper ChannelFilterScriptProcessor ChannelSetterScriptProcessor DemoHardcodedScriptProcessor LegatoProcessor MuteAllScriptProcessor ReleaseTriggerScriptProcessor

Public Member Functions

virtual void onControl (ScriptingApi::Content::ScriptComponent *, var)
 called whenever a script control was moved. More...
 
virtual void onController ()
 called if a cc message is processed. More...
 
virtual void onInit ()
 This callback will get called if the object is created or resetted. More...
 
virtual void onNoteOff ()
 called if a note off message is processed. More...
 
virtual void onNoteOn ()
 called if a note on message is processed. More...
 
virtual void onTimer (int)
 called periodically if the timer was started. More...
 
- Public Member Functions inherited from MidiProcessor
virtual ProcessorgetChildProcessor (int) override
 Normally a MidiProcessor has no child processors, but it is virtual for the MidiProcessorChain. More...
 
virtual int getNumChildProcessors () const override
 Normally a MidiProcessor has no child processors, but it is virtual for the MidiProcessorChain. More...
 
void ignoreEvent ()
 If this method is called within processMidiMessage(), the message will be ignored. More...
 
 MidiProcessor (MainController *m, const String &id)
 Creates a new MidiProcessor. 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...
 
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...
 
virtual int getNumInternalChains () const
 If your processor uses internal chains, you can return the number here. 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...
 
virtual void prepareToPlay (double sampleRate_, int samplesPerBlock_)
 Sets the sample rate and the block size. 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...
 
virtual void setBypassed (bool shouldBeBypassed, NotificationType notifyChangeHandler=dontSendNotification) noexcept
 This bypasses the processor. 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 MainControllergetMainController () const noexcept
 Provides read-only access to the main controller. More...
 
MainControllergetMainController () noexcept
 Provides write access to the main controller. More...
 

Additional Inherited Members

- 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...
 
- Protected Member Functions inherited from Processor
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...
 
- Protected Member Functions inherited from ProcessorWithScriptingContent
void initContent ()
 Call this from the base class to create the content. More...
 
- Protected Attributes inherited from MidiProcessor
int samplePos
 the sample position within the processBlock. More...
 

Detailed Description

The base class for all MidiProcessors that are hardcoded scripts.

You can use a ScriptProcessor to develope the functionality and then copy the callbacks from the script to the virtual methods in order to have a hardcoded C++ Processor.

You obviously have to change some language specific stuff (eg. 'var' 'function' ...), but this class tries to smooth out the process of converting as much as possible.

Member Function Documentation

virtual void onControl ( ScriptingApi::Content::ScriptComponent *  ,
var   
)
inlinevirtual

called whenever a script control was moved.

virtual void onController ( )
inlinevirtual

called if a cc message is processed.

virtual void onInit ( )
inlinevirtual

This callback will get called if the object is created or resetted.

virtual void onNoteOff ( )
inlinevirtual

called if a note off message is processed.

virtual void onNoteOn ( )
inlinevirtual

called if a note on message is processed.

virtual void onTimer ( int  )
inlinevirtual

called periodically if the timer was started.

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