#import <SndAudioProcessor.h>
Public Member Functions | |
(id) | - init |
Initialization method. | |
(id) | - initWithParamCount:name: |
Initialization method. | |
(id) | - initWithParameterDictionary:name: |
Initialization using a dictionary of parameters. | |
(id) | - reset |
Message sent when host determines the SndAudioProcessor should reinitialize its processing state. Eg, a delay processor would zero its z-buffers. | |
(int) | - paramCount |
Gets the number of parameters. | |
(float) | - paramValue: |
Gets the value of the indexed parameter. | |
(NSString *) | - paramName: |
Gets the name of indexed parameter. | |
(NSString *) | - paramLabel: |
Returns a label or extra text describing the parameters units of measurement. | |
(NSString *) | - paramDisplay: |
Converts an object-internal value into a more user-friendly representation. | |
(void) | - setParam:toValue: |
Sets the indexed parameter to the value given. | |
(BOOL) | - processReplacingInputBuffer:outputBuffer: |
Process the inputBuffer, and replace the results in the output buffer. | |
(void) | - setAudioProcessorChain: |
(Internal SndKit use only) Individual processors may want to query their enclosing processor chain, for example to get the time at the start of the buffer (nowTime). This method gets called when a processor gets added to the chain, with the id of the chain. | |
(SndAudioProcessorChain *) | - audioProcessorChain |
Returns the SndAudioProcessorChain to which the processor is attached. | |
(BOOL) | - isActive |
Processor activity status query method. | |
(id) | - setActive: |
Sets the active status of the processor. | |
(id) | - setName: |
Assigns the SndAudioProcessor instance a new name. | |
(NSString *) | - name |
Returns the name of the audio processor. | |
(NSDictionary *) | - paramDictionary |
Returns an NSDictionary holding all parameters of a SndAudioProcessor instance. | |
(void) | - setParamsWithDictionary: |
Sets parameters with names and values provided by the given NSDictionary. | |
(void) | - setParamWithKey:toValue: |
Assigns the parameter named keyName to the passed value. | |
(NSNumber *) | - paramObjectForIndex: |
Returns the parameter value as an NSNumber given an index. | |
(void) | - setParameterDelegate: |
Assigns the current parameter delegate. | |
(id) | - parameterDelegate |
Static Public Member Functions | |
(void) | + registerAudioProcessorClass: |
Registers an SndAudioProcessor class. | |
(NSArray *) | + fxClasses |
Use this to get a list of all the available FX processors. | |
(NSArray *) | + availableAudioProcessors |
Returns an array of names of available audio units (on MacOS X). | |
(id) | + audioProcessor |
Factory method. | |
(SndAudioProcessor *) | + audioProcessorNamed: |
Returns an autoreleased instance of a SndProcessor subclass named processorName. | |
Protected Attributes | |
int | numParams |
SndAudioProcessorChain * | audioProcessorChain |
NSString * | name |
BOOL | active |
id | parameterDelegate |
To come
+ (void) registerAudioProcessorClass: | (id) | fxclass |
Registers an SndAudioProcessor class.
Automatically called by the SndAudioProcessor init method, so any subclasses will automatically register themselves once instantiated.
fxclass | The class of an SndAudioProcessor |
+ (NSArray*) fxClasses |
Use this to get a list of all the available FX processors.
+ (NSArray *) availableAudioProcessors |
Returns an array of names of available audio units (on MacOS X).
The names returned can be assumed to be human readable and reasonably formatted. They can also be assumed to be unique and therefore can be used to create an instance using +processorNamed:.
Reimplemented in SndAudioUnitProcessor.
+ (id) audioProcessor |
+ (SndAudioProcessor *) audioProcessorNamed: | (NSString *) | processorName |
Returns an autoreleased instance of a SndProcessor subclass named processorName.
processorName | The name of a SndAudioProcessor as returned previously by availableAudioProcessors. |
Reimplemented in SndAudioUnitProcessor.
- (id) init |
- (id) initWithParamCount: | (const int) | count | ||
name: | (NSString *) | name | ||
Initialization method.
count | Number of parameters. | |
name | Name of sound audio processor. |
Reimplemented in SndAudioUnitProcessor.
- (id) initWithParameterDictionary: | (NSDictionary *) | paramDictionary | ||
name: | (NSString *) | name | ||
Initialization using a dictionary of parameters.
paramDictionary | NSDictionary of parameters and values to initialise SndAudioProcessor instance with. | |
name | Name of the SndAudioProcessor to initialise. |
- (id) reset |
Message sent when host determines the SndAudioProcessor should reinitialize its processing state. Eg, a delay processor would zero its z-buffers.
- (int) paramCount |
Gets the number of parameters.
- (float) paramValue: | (const int) | index |
Gets the value of the indexed parameter.
Following the VST convention, this should be in the range [0,1]. No enforcement at the present time.
index | Index of the parameter |
Reimplemented in SndAudioUnitProcessor, SndAudioFader, and SndAudioProcessorReverb.
- (NSString *) paramName: | (const int) | index |
Gets the name of indexed parameter.
index | Parameter index |
Reimplemented in SndAudioUnitProcessor, SndAudioFader, and SndAudioProcessorReverb.
- (NSString *) paramLabel: | (const int) | index |
Returns a label or extra text describing the parameters units of measurement.
index | Parameter index |
Reimplemented in SndAudioUnitProcessor.
- (NSString *) paramDisplay: | (const int) | index |
Converts an object-internal value into a more user-friendly representation.
index | Parameter index |
Reimplemented in SndAudioUnitProcessor.
- (void) setParam: | (const int) | index | ||
toValue: | (const float) | value | ||
Sets the indexed parameter to the value given.
By VST convention, the argument v should be in the range [0,1]. If the internal parameter has a different range, this should be mapped internally.
index | Index of the parameter to be set. | |
value | Floating point value in the range [0,1] |
Reimplemented in SndAudioUnitProcessor, SndAudioFader, and SndAudioProcessorReverb.
- (BOOL) processReplacingInputBuffer: | (SndAudioBuffer *) | inB | ||
outputBuffer: | (SndAudioBuffer *) | outB | ||
Process the inputBuffer, and replace the results in the output buffer.
Overide this method with your own FX processing routines. There is nothing to stop inB and outB referring to the same buffer - be warned that replacing the output values in outB may change inB in these cases.
inB | The input buffer | |
outB | The output buffer |
Reimplemented in SndAudioUnitProcessor, SndAudioFader, and SndAudioProcessorReverb.
- (void) setAudioProcessorChain: | (SndAudioProcessorChain *) | inChain |
(Internal SndKit use only) Individual processors may want to query their enclosing processor chain, for example to get the time at the start of the buffer (nowTime). This method gets called when a processor gets added to the chain, with the id of the chain.
inChain |
Returns the SndAudioProcessorChain to which the processor is attached.
- (BOOL) isActive |
Processor activity status query method.
- (id) setActive: | (const BOOL) | b |
Sets the active status of the processor.
b | TRUE if the processor is to be made active. |
- (id) setName: | (NSString *) | aName |
- (NSString *) name |
Returns the name of the audio processor.
- (NSDictionary *) paramDictionary |
Returns an NSDictionary holding all parameters of a SndAudioProcessor instance.
- (void) setParamsWithDictionary: | (NSDictionary *) | paramDictionary |
Sets parameters with names and values provided by the given NSDictionary.
paramDictionary | an NSDictionary holding NSString keys and NSValue float encoded objects. |
- (void) setParamWithKey: | (NSString *) | keyName | ||
toValue: | (NSNumber *) | value | ||
Assigns the parameter named keyName to the passed value.
keyName | An NSString case-sensitively matching a parameter name. | |
value | An NSValue holding an encoded float value between 0.0 and 1.0. |
- (NSNumber *) paramObjectForIndex: | (const int) | i |
Returns the parameter value as an NSNumber given an index.
- (void) setParameterDelegate: | (id) | delegate |
Assigns the current parameter delegate.
The message -parameter:ofAudioProcessor:didChangeTo: is sent to the delegate when a parameter changes.
delegate | An object to receive notification that a parameter changed value. |
- (id) parameterDelegate |
- (int) numParams [protected] |
Number of parameters in the audio processor
- (SndAudioProcessorChain*) audioProcessorChain [protected] |
The SndAudioProcessorChain hosting this processor
- (NSString*) name [protected] |
- (BOOL) active [protected] |
Indicates the processor instance will perform the processing.
- (id) parameterDelegate [protected] |
Delegate object informed when a parameters value is changed.