SPAOP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
SpaopAudioProcessor Class Reference

The SPAOP-plugin's processor class. More...

#include <PluginProcessor.h>

Inheritance diagram for SpaopAudioProcessor:
Inheritance graph
[legend]
Collaboration diagram for SpaopAudioProcessor:
Collaboration graph
[legend]

Public Member Functions

 SpaopAudioProcessor ()
 Constructor. More...
 
 ~SpaopAudioProcessor ()
 Destructor. More...
 
void prepareToPlay (double sampleRate, int samplesPerBlock)
 
void releaseResources ()
 
void processBlock (AudioSampleBuffer &buffer, MidiBuffer &midiMessages)
 
AudioProcessorEditor * createEditor ()
 
bool hasEditor () const
 
const String getName () const
 
int getNumParameters ()
 Returns the number of automatable parameters of this plugin. More...
 
float getParameter (int index)
 Forwards the call to the wonder::Source::getParameter method of the source controlled by this plugin. More...
 
void setParameter (int index, float newValue)
 Forwards the call to the wonder::SourceController::setParameterAndSendChange. More...
 
float getParameterByText (int parameterIndex, const String &parameterText)
 Forwards the call to the wonder::Source::getParameterByText method of the source controlled by this plugin. More...
 
const String getParameterName (int index)
 Forwards the call to the wonder::Source::getParameterName method of the source controlled by this plugin. More...
 
const String getParameterText (int index)
 Forwards the call to the wonder::Source::getParameterText method of the source controlled by this plugin. More...
 
const String getParameterTextByValue (int index, float value)
 Forwards the call to the wonder::Source::getParameterTextByValue method of the source controlled by this plugin. More...
 
int getParameterNumSteps (int index)
 
float getParameterDefaultValue (int index)
 Forwards the call to wonder::Source::getParameterDefaultValue. More...
 
const String getInputChannelName (int channelIndex) const
 
const String getOutputChannelName (int channelIndex) const
 
bool isInputChannelStereoPair (int index) const
 
bool isOutputChannelStereoPair (int index) const
 
bool acceptsMidi () const
 
bool producesMidi () const
 
bool silenceInProducesSilenceOut () const
 
double getTailLengthSeconds () const
 
int getNumPrograms ()
 Returns 0. More...
 
int getCurrentProgram ()
 Returns 0. More...
 
void setCurrentProgram (int index)
 Does nothing. More...
 
const String getProgramName (int index)
 Returns an empty juce::String. More...
 
void changeProgramName (int index, const String &newName)
 Does nothing. More...
 
void getStateInformation (MemoryBlock &destData)
 Stores the current state of the plugin (including the state of the source controlled by this plugin) into the MemoryBlock destData. More...
 
void setStateInformation (const void *data, int sizeInBytes)
 Retores the a state of the plugin (including the state of the source controlled by this plugin) from a memory block (as stored with getStateInformation). More...
 
void setCoordinates (float normalizedX, float normalizedY)
 Sets the coordinates, sending the corresponding OSC-message. More...
 
void setCoordinatesNotifyingHost (float normalizedX, float normalizedY)
 Sets the coordinates, notifying both the host and the OSC-messaging. More...
 
void timerCallback ()
 Callback from the timer. More...
 
wonder::SourceControllergetSourceController () const
 Returns a pointer to the wonder::SourceController object that contains the main logic and the communication threads of this plugin. More...
 
float getZoomFactor () const
 Returns the zoom factor for the GUI. More...
 
void setZoomFactor (float zoomFactor)
 Sets the zoom factor for the GUI. More...
 
bool showOtherSources () const
 Returns true if the GUI shall show all active sources. More...
 
void setShowOtherSources (bool showOtherSources)
 Set the GUI's showOtherSources parameter (As this parameters shall be restorable via getStateInformation and setStateInformation, it needs to be stored within this class.) More...
 
bool showNames () const
 Returns true if the GUI shall the sources' names. More...
 
void setShowNames (bool showNames)
 Set the GUI's showNames parameter (As this parameters shall be restorable via getStateInformation and setStateInformation, it needs to be stored within this class.) More...
 
bool setCWonderAddress (const std::string &ip, const std::string &port)
 Sets the address where outgoing OSC messages will be sent in "linked to WONDER" mode will be sent (i.e. More...
 

Detailed Description

The SPAOP-plugin's processor class.

Initializes its wonder::SourceController instance and works as the interface to the host software.

See Also
juce::AudioProcessor

Constructor & Destructor Documentation

SpaopAudioProcessor::SpaopAudioProcessor ( )

Constructor.

SpaopAudioProcessor::~SpaopAudioProcessor ( )

Destructor.

Member Function Documentation

bool SpaopAudioProcessor::acceptsMidi ( ) const
void SpaopAudioProcessor::changeProgramName ( int  index,
const String &  newName 
)

Does nothing.

See Also
juce::AudioProcessor
AudioProcessorEditor * SpaopAudioProcessor::createEditor ( )
int SpaopAudioProcessor::getCurrentProgram ( )

Returns 0.

See Also
juce::AudioProcessor
const String SpaopAudioProcessor::getInputChannelName ( int  channelIndex) const
const String SpaopAudioProcessor::getName ( ) const
int SpaopAudioProcessor::getNumParameters ( )

Returns the number of automatable parameters of this plugin.

This equals the value of wonder::Source::totalNumParams.

See Also
juce::AudioProcessor
int SpaopAudioProcessor::getNumPrograms ( )

Returns 0.

See Also
juce::AudioProcessor
const String SpaopAudioProcessor::getOutputChannelName ( int  channelIndex) const
float SpaopAudioProcessor::getParameter ( int  index)

Forwards the call to the wonder::Source::getParameter method of the source controlled by this plugin.

See Also
juce::AudioProcessor, wonder::Source::getParameter
float SpaopAudioProcessor::getParameterByText ( int  parameterIndex,
const String &  parameterText 
)

Forwards the call to the wonder::Source::getParameterByText method of the source controlled by this plugin.

This overrides a method of juce::AudioProcessor that is not contained in the official version of JUCE but only in the fork of JUCE that was created for SPAOP.

See Also
wonder::Source::getParameterByText
float SpaopAudioProcessor::getParameterDefaultValue ( int  index)
const String SpaopAudioProcessor::getParameterName ( int  index)

Forwards the call to the wonder::Source::getParameterName method of the source controlled by this plugin.

See Also
juce::AudioProcessor, wonder::Source::getParameterName
int SpaopAudioProcessor::getParameterNumSteps ( int  index)
const String SpaopAudioProcessor::getParameterText ( int  index)

Forwards the call to the wonder::Source::getParameterText method of the source controlled by this plugin.

See Also
juce::AudioProcessor, wonder::Source::getParameterText
const String SpaopAudioProcessor::getParameterTextByValue ( int  index,
float  value 
)

Forwards the call to the wonder::Source::getParameterTextByValue method of the source controlled by this plugin.

This overrides a method of juce::AudioProcessor that is not contained in the official version of JUCE but only in the fork of JUCE that was created for SPAOP.

See Also
wonder::Source::getParameterTextByValue
const String SpaopAudioProcessor::getProgramName ( int  index)

Returns an empty juce::String.

See Also
juce::AudioProcessor
wonder::SourceController * SpaopAudioProcessor::getSourceController ( ) const

Returns a pointer to the wonder::SourceController object that contains the main logic and the communication threads of this plugin.

Returns
A pointer to the wonder::SourceController object.
void SpaopAudioProcessor::getStateInformation ( MemoryBlock &  destData)

Stores the current state of the plugin (including the state of the source controlled by this plugin) into the MemoryBlock destData.

All attributes are stored in XML format.

See Also
juce::AudioProcessor
double SpaopAudioProcessor::getTailLengthSeconds ( ) const
float SpaopAudioProcessor::getZoomFactor ( ) const

Returns the zoom factor for the GUI.

(As this parameters shall be restorable via getStateInformation and setStateInformation, it needs to be stored within this class.(

Returns
The zoom factor for the GUI.
bool SpaopAudioProcessor::hasEditor ( ) const
bool SpaopAudioProcessor::isInputChannelStereoPair ( int  index) const
bool SpaopAudioProcessor::isOutputChannelStereoPair ( int  index) const
void SpaopAudioProcessor::prepareToPlay ( double  sampleRate,
int  samplesPerBlock 
)
void SpaopAudioProcessor::processBlock ( AudioSampleBuffer &  buffer,
MidiBuffer &  midiMessages 
)
bool SpaopAudioProcessor::producesMidi ( ) const
void SpaopAudioProcessor::releaseResources ( )
void SpaopAudioProcessor::setCoordinates ( float  normalizedX,
float  normalizedY 
)

Sets the coordinates, sending the corresponding OSC-message.

For coordinate changes, this is to be prefered since it will result in only one OSC message (while two separate calls to setParameterNotifyingHost might result in two messages).

Parameters
normalizedXThe new value for the x-coordinate, normalized within [0.0 , 1.0].
normalizedYThe new value for the y-coordinate, normalized within [0.0 , 1.0].
See Also
setParameter
void SpaopAudioProcessor::setCoordinatesNotifyingHost ( float  normalizedX,
float  normalizedY 
)

Sets the coordinates, notifying both the host and the OSC-messaging.

For coordinate changes, this is to be prefered since it will result in only one OSC message (while two separate calls to setParameterNotifyingHost might result in two messages).

Parameters
normalizedXThe new value for the x-coordinate, normalized within [0.0 , 1.0].
normalizedYThe new value for the y-coordinate, normalized within [0.0 , 1.0].
See Also
juce::AudioProcessor::setParameterNotifyingHost
void SpaopAudioProcessor::setCurrentProgram ( int  index)

Does nothing.

See Also
juce::AudioProcessor
bool SpaopAudioProcessor::setCWonderAddress ( const std::string &  ip,
const std::string &  port 
)

Sets the address where outgoing OSC messages will be sent in "linked to WONDER" mode will be sent (i.e.

the address of cWONDER). (Internally, the call is passed to wonder::SourceController::setCWonderAddress.)

Parameters
ipA valid (IPv4) ip string.
portA valid port number between 1024 and 65535.
Returns
true if the address has been set, false if the parameters were invalid.
void SpaopAudioProcessor::setParameter ( int  index,
float  newValue 
)
void SpaopAudioProcessor::setShowNames ( bool  showNames)

Set the GUI's showNames parameter (As this parameters shall be restorable via getStateInformation and setStateInformation, it needs to be stored within this class.)

Parameters
showNamestrue if the GUI shall show the sources' names.
void SpaopAudioProcessor::setShowOtherSources ( bool  showOtherSources)

Set the GUI's showOtherSources parameter (As this parameters shall be restorable via getStateInformation and setStateInformation, it needs to be stored within this class.)

Parameters
showOtherSourcestrue if the GUI shall show all active sources.
void SpaopAudioProcessor::setStateInformation ( const void *  data,
int  sizeInBytes 
)

Retores the a state of the plugin (including the state of the source controlled by this plugin) from a memory block (as stored with getStateInformation).

See Also
juce::AudioProcessor
void SpaopAudioProcessor::setZoomFactor ( float  zoomFactor)

Sets the zoom factor for the GUI.

(As this parameters shall be restorable via getStateInformation and setStateInformation, it needs to be stored within this class.)

Parameters
zoomFactorThe zoom factor for the GUI.
bool SpaopAudioProcessor::showNames ( ) const

Returns true if the GUI shall the sources' names.

(As this parameters shall be restorable via getStateInformation and setStateInformation, it needs to be stored within this class.)

Returns
true if the GUI shall show the sources' names.
bool SpaopAudioProcessor::showOtherSources ( ) const

Returns true if the GUI shall show all active sources.

(As this parameters shall be restorable via getStateInformation and setStateInformation, it needs to be stored within this class.)

Returns
true if the GUI shall show all active sources.
bool SpaopAudioProcessor::silenceInProducesSilenceOut ( ) const
void SpaopAudioProcessor::timerCallback ( )

Callback from the timer.

If the timer runs out, we did not receive a ping message for the incoming "visual" stream which means: the connections is lost.