MidiProcessor
A MidiProcessor processes a MidiBuffer.
It can be used to change the incoming MIDI data before it is sent to a ModulatorSynth
. Note that if you want to create your own MIDI processors, you should use the HardcodedScriptProcessor as base class since it offers a simpler integration of existing Javascript code and a cleaner API.
Class Hierarchy
Base Classes
Derived Classes
- hise::MidiPlayer
hise::MidiProcessorChain
- hise::raw::MainProcessor
hise::ScriptBaseMidiProcessor
Class methods
MidiProcessor
MidiProcessor(MainController *m, const String &id)
Creates a new MidiProcessor. You can supply a ModulatorSynth
which owns the MidiProcessor to allow the processor to change its properties.
getColour
Colour getColour() const
Overwrite this method if you want a special colour.
This colour will be used in the debug console and in the editor.
getSpecialSymbol
Path getSpecialSymbol() const override
Overwrite this method if you want to supply a custom symbol for the Processor
.
By default, it creates an empty Path, so you either have to set a custom Symbol using setSymbol()
, or overwrite the getSpecialSymbol()
method in a subclass.
getChildProcessor
Processor * getChildProcessor(int) override
Normally a MidiProcessor has no child processors, but it is virtual for the MidiProcessorChain.
getNumChildProcessors
int getNumChildProcessors() const override
Normally a MidiProcessor has no child processors, but it is virtual for the MidiProcessorChain.
createEditor
ProcessorEditorBody * createEditor(ProcessorEditor *parentEditor) override
If you want an editor that is more than the header, overwrite this method and return a subclass of ProcessorEditorBody.
processHiseEvent
void processHiseEvent(HiseEvent &e)=0
Process the incoming event.
ignoreEvent
void ignoreEvent()
If this method is called within processMidiMessage(), the message will be ignored.
preprocessBuffer
void preprocessBuffer(HiseEventBuffer &buffer, int numSamples)
Overwrite this method if your processor wants to process the entire buffer at once in addition of single messages.
By default this is deactivated, but if you override isProcessingWholeBuffer() and return true, it will use this method.