ConstantUG Class Reference

ConstantUG simply writes a constant to its output patchpoint. More...

#import <ConstantUG.h>

List of all members.

Public Member Functions

(id) - setConstantDSPDatum:
 Sets the constant value to value..
(id) - setConstant:
 Sets the constant value to a DSPDatum converted from value.
(id) - setOutput:
 Sets the output patchpoint to aPatchPoint.

Static Public Member Functions

(BOOL) + shouldOptimize:
 Specifies that all arguments are to be optimized if possible.


Detailed Description

ConstantUG simply writes a constant to its output patchpoint.

ConstantUG produces a constant value. Since you can set the value of a patchpoint directly through the MKSynthData method setToConstant:, you rarely need instances of this class. However, a ConstantUG object can be used to initialize, on each tick, a constant-valued patchpoint that may have been written to during the previous tick. For example, you can implement additive synthesis by creating a patch in which each oscillator reads a patchpoint, adds its own signal into the value, and then writes the sum back to the same patchpoint in preparation for the next oscillator. In this case, you would use a ConstantUG to clear the patchpoint before the first oscillator reads it.

Memory Spaces

ConstantUGa a output


Member Function Documentation

+ (BOOL) shouldOptimize: (unsigned)  arg  

Specifies that all arguments are to be optimized if possible.

Parameters:
arg is an unsigned.
Returns:
Returns an BOOL.

- (id) setConstantDSPDatum: (DSPDatum)  value  

Sets the constant value to value..

Parameters:
value is an DSPDatum.
Returns:
Returns self.

- (id) setConstant: (double)  value  

Sets the constant value to a DSPDatum converted from value.

Parameters:
value is a double.
Returns:
Returns self.

- (id) setOutput: (id)  aPatchPoint  

Sets the output patchpoint to aPatchPoint.

Parameters:
aPatchPoint is an id.
Returns:
Returns nil if the argument isn't a patchpoint; otherwise returns self.


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

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