C++ API Reference RNBO: RNBO::ProcessInterface Class Reference

RNBO: RNBO::ProcessInterface Class Reference

An interface for signal-rate data processing. More...

#include <RNBO_ProcessInterface.h>

Inheritance diagram for RNBO::ProcessInterface:
process_interface RNBO::BaseInterface RNBO::ParameterInterface RNBO::PatcherInterface RNBO::PatcherInterfaceImpl

Public Member Functions

virtual void prepareToProcess (number sampleRate, Index maxBlockSize, bool force=false)=0
 Set the sample rate and vector size before doing any processing. More...
 
virtual void process (const SampleValue *const *audioInputs, Index numInputs, SampleValue *const *audioOutputs, Index numOutputs, Index sampleFrames)=0
 Process non-interleaved SampleValue* audio buffers with optional MIDI I/O. More...
 
- Public Member Functions inherited from RNBO::BaseInterface
virtual void initialize ()
 
virtual Index getNumMidiInputPorts () const =0
 
virtual Index getNumMidiOutputPorts () const =0
 
virtual Index getNumInputChannels () const =0
 
virtual Index getNumOutputChannels () const =0
 
- Public Member Functions inherited from RNBO::ParameterInterface
virtual ParameterIndex getNumParameters () const =0
 Get the number of visible parameters. More...
 
virtual ConstCharPointer getParameterName (ParameterIndex index) const =0
 Get the parameter name (may not be unique) More...
 
virtual ConstCharPointer getParameterId (ParameterIndex index) const =0
 Get the unique ID of a parameter. More...
 
virtual void getParameterInfo (ParameterIndex index, ParameterInfo *info) const =0
 Get detailed information about a parameter. More...
 
virtual ParameterValue getParameterValue (ParameterIndex index)=0
 
virtual void setParameterValue (ParameterIndex index, ParameterValue value, MillisecondTime time=RNBOTimeNow)=0
 Set a parameter's normalized [0..1] value. More...
 
virtual ParameterValue getParameterNormalized (ParameterIndex index)
 Get a parameter's normalized [0..1] value. More...
 
virtual void setParameterValueNormalized (ParameterIndex index, ParameterValue normalizedValue, MillisecondTime time=RNBOTimeNow)
 Set a parameter's normalized [0..1] value. More...
 
virtual ParameterValue convertToNormalizedParameterValue (ParameterIndex index, ParameterValue value) const =0
 Convert a parameter value from its real value to a normalized representation [0..1]. More...
 
virtual ParameterValue convertFromNormalizedParameterValue (ParameterIndex index, ParameterValue normalizedValue) const =0
 Convert a parameter value from a normalized representation [0..1] to its real value. More...
 
virtual ParameterValue constrainParameterValue (ParameterIndex, ParameterValue value) const
 Apply and get the constrained parameter value. More...
 

Detailed Description

An interface for signal-rate data processing.

Member Function Documentation

◆ prepareToProcess()

virtual void RNBO::ProcessInterface::prepareToProcess ( number  sampleRate,
Index  maxBlockSize,
bool  force = false 
)
pure virtual

Set the sample rate and vector size before doing any processing.

This method is almost a no-op when there is no change in sample rate or vector size and force is false (the default) so it is suitable to call before each processing call. Note that an increase of maxBlockSize will allocate memory, however.

If this method returns false, do not call process() afterwards. Instead, call prepareToProcess() again.

Parameters
sampleRatethe sample rate to use
maxBlockSizethe maximum vector size; actual processing could be made in smaller chunks
forceif true, ensures the dspsetup methods of patcher objects are called
Returns
false if called during setPatcher, true otherwise

◆ process()

virtual void RNBO::ProcessInterface::process ( const SampleValue *const *  audioInputs,
Index  numInputs,
SampleValue *const *  audioOutputs,
Index  numOutputs,
Index  sampleFrames 
)
pure virtual

Process non-interleaved SampleValue* audio buffers with optional MIDI I/O.

Parameters
audioInputsnon-interleaved audio inputs (e.g. a 2D array: SampleValues[numInputs][sampleFrames])
numInputsthe number of audio input buffers
audioOutputsnon-interleaved audio outputs (e.g. a 2D array: SampleValues[numOutputs][sampleFrames])
numOutputsthe number of audio output buffers
sampleFramesthe number of samples in a single input or output
midiInputan optional pointer to a MidiEventList of input events associated with this audio vector
midiOutputan optional pointer to a MidiEventList which can receive MIDI output generated during the audio vector

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