#import <ConstantUG.h>
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. |
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.
ConstantUGa a output
+ (BOOL) shouldOptimize: | (unsigned) | arg |
Specifies that all arguments are to be optimized if possible.
arg | is an unsigned. |
- (id) setConstantDSPDatum: | (DSPDatum) | value |
Sets the constant value to value..
value | is an DSPDatum. |
- (id) setConstant: | (double) | value |
Sets the constant value to a DSPDatum converted from value.
value | is a double. |
- (id) setOutput: | (id) | aPatchPoint |
Sets the output patchpoint to aPatchPoint.
aPatchPoint | is an id. |