SndAudioUnitProcessor Class Reference

Wraps an audio unit and it's signal processing behaviour. More...

#import <SndAudioUnitProcessor.h>

Inheritance diagram for SndAudioUnitProcessor:

SndAudioProcessor

List of all members.

Public Member Functions

(AudioUnit) - audioUnit
 Returns the C++ AudioUnit handle.
(id) - initWithParamCount:name:
 Initialization method.
(BOOL) - processReplacingInputBuffer:outputBuffer:
 Process the given audio buffer through the AudioUnit.
(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.

Static Public Member Functions

(NSArray *) + availableAudioProcessors
 Returns an array of names of available audio units (on MacOS X).
(SndAudioProcessor *) + audioProcessorNamed:
 Returns an autoreleased instance of a SndAudioProcessor subclass named processorName.

Protected Attributes

AudioUnit audioUnit
int inputBusNumber
unsigned int inputChannelCount
int outputBusNumber
int parameterListLength
AudioUnitParameterID * parameterIDList
BOOL auIsNonInterleaved
float * interleavedInputSamples


Detailed Description

Wraps an audio unit and it's signal processing behaviour.

There is one AudioUnit per SndAudioUnitProcessor instance. In this context it forms the Model in an MVC triumvariate with SndAudioUnitController managing the display of the Audio Units GUI and the management of parameter changes.


Member Function Documentation

+ (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:. For the SndAudioUnitProcessor class, these names are those returned by those Apple AudioUnits available for loading.

Returns:
Returns an autoreleased NSArray of NSStrings of audio processors.

Reimplemented from SndAudioProcessor.

+ (SndAudioProcessor *) audioProcessorNamed: (NSString *)  processorName  

Returns an autoreleased instance of a SndAudioProcessor subclass named processorName.

Parameters:
processorName An NSString with one of the names returned by +availableAudioProcessors.

Reimplemented from SndAudioProcessor.

- (id) initWithParamCount: (const int)  count
name: (NSString *)  name 

Initialization method.

Parameters:
count Number of parameters.
name Name of sound audio processor.
Returns:
Returns self.

Reimplemented from SndAudioProcessor.

- (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.

Parameters:
index Index of the parameter
Returns:
parameter value

Reimplemented from SndAudioProcessor.

- (NSString *) paramName: (const int)  index  

Gets the name of indexed parameter.

Parameters:
index Parameter index
Returns:
NSString with parameter name

Reimplemented from SndAudioProcessor.

- (NSString*) paramLabel: (const int)  index  

Returns a label or extra text describing the parameters units of measurement.

Parameters:
index Parameter index
Example: if the parameter is in deciBels, an appropriate result might be to return "dB"
Returns:
Returns the label for the parameter.

Reimplemented from SndAudioProcessor.

- (NSString *) paramDisplay: (const int)  index  

Converts an object-internal value into a more user-friendly representation.

Parameters:
index Parameter index
Example: An instance variable may have a floating point range [0,1], but it represents a deciBel amount for user purposes. This method is an opportunity for the object to provide a more meaningful description of the parameter.
Returns:
Returns an NSString containing the alternative string representation of the parameter

Reimplemented from SndAudioProcessor.

- (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.

Parameters:
index Index of the parameter to be set.
value Floating point value in the range [0,1]

Reimplemented from SndAudioProcessor.


Member Data Documentation

- (AudioUnit) audioUnit [protected]

The AudioUnit handle used by the Apple AudioUnit API

- (int) inputBusNumber [protected]

The bus of the audio unit to supply audio data to.

- (unsigned int) inputChannelCount [protected]

The number of channels on the input bus.

- (int) outputBusNumber [protected]

The bus of the audio unit to retrieve audio data from. This could perhaps be determined by examining the bus characteristics of each audio unit.

- (int) parameterListLength [protected]

The number of parameters in this AudioUnit.

- (AudioUnitParameterID*) parameterIDList [protected]

An array of AudioUnitParameterIDs used to refer to each AudioUnit parameter.

- (BOOL) auIsNonInterleaved [protected]

Indicates if the AudioUnit accepts data as non-interleaved buffers (YES), or as a single interleaved buffer (NO).

- (float*) interleavedInputSamples [protected]

buffer holding audio data in interleaved format.


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

Generated on Sat Dec 5 17:01:16 2009 for MusicKit by  doxygen 1.5.6