#import <Out2sumUG.h>
Public Member Functions | |
(id) | - setLeftScale: |
Sets the factor by which the signal that's written to the left output channel is scaled. | |
(id) | - setRightScale: |
Sets the factor by which the signal that's written to the right output channel is scaled. | |
(id) | - setBearing: |
Distributes the input signal between the two output channels according to the value of degrees: 0.0 degrees is center, -45.0 is hard left, 45.0 is hard right. | |
(id) | - setBearing:scale: |
This is the same as setBearing:, but the amplitude of the input signal is scaled by scaleValue, which should be between 0.0 and 1.0, independent of bearing, before being distributed. | |
(id) | - runSelf |
If bearing has not been set, sets it to 0.0. | |
(id) | - idleSelf |
You never send this message. | |
(id) | - setInput: |
Sets the input patchpoint to aPatchPoint. | |
Static Public Member Functions | |
(BOOL) | + shouldOptimize: |
Specifies that all arguments are to be optimized if possible. |
Out2sumUG adds its input signal to the DSP's stereo output stream. The signal is placed (or “imaged”) between the two channels according to the value set through the setBearing: or setBearing:scale: method. Alternatively, you can set the gain of either channel independently, through the setRightScale: and setLeftScale: methods.
To write to just the left or just the right channel of the stereo ouput stream, you should use an Out1aUG or Out1bUG object, respectively. Where the samples that are written to the DSP output stream are ultimately sent - whether to sound-out or to a soundfile - depends on the state of the Orchestra from which the Out1aUG or Out1bUG object was allocated. By default, the Orchestra sends the samples to sound-out.
If you're building SynthPatch subclasses, you should note that every SynthPatch object should have its own signal-output UnitGenerator; in other words, you don't allocate just one such object and then share it amongst the various SynthPatches. The output signals produced by all the running Out1aUG's, Out1bUG's, and Out2sumUG's are mixed (added) together into the DSP's output stream.
Out2sumUGa a input
+ (BOOL) shouldOptimize: | (unsigned) | arg |
Specifies that all arguments are to be optimized if possible.
arg | is an unsigned. |
Reimplemented from MKUnitGenerator.
- (id) setLeftScale: | (double) | value |
Sets the factor by which the signal that's written to the left output channel is scaled.
By default, the scaler is set to a value that's just a tad less than 1.0. Effective values are between 0.0 and 1.0 (a negative value is the same as its absolute value, but with a 180 degree phase shift).
value | is a double. |
- (id) setRightScale: | (double) | value |
Sets the factor by which the signal that's written to the right output channel is scaled.
By default, the scaler is set to a value that lacks 1.0 by a speck. Effective values are between 0.0 and 1.0 (a negative value is the same as its absolute value, but with a 180 degree phase shift).
value | is a double. |
- (id) setBearing: | (double) | degrees |
Distributes the input signal between the two output channels according to the value of degrees: 0.0 degrees is center, -45.0 is hard left, 45.0 is hard right.
Bearing is reflected as degrees exceeds the boundaries; thus, for example, 50.0 degrees is the same as 40.0, 60.0 is 30.0, 90.0 is 0.0, and so on.
degrees | is a double. |
- (id) setBearing: | (double) | degrees | ||
scale: | (double) | scaleValue | ||
This is the same as setBearing:, but the amplitude of the input signal is scaled by scaleValue, which should be between 0.0 and 1.0, independent of bearing, before being distributed.
degrees | is a double. | |
scaleValue | is a double. |
- (id) runSelf |
If bearing has not been set, sets it to 0.0.
This method is invoked when you send the run message to the object.
Reimplemented from MKUnitGenerator.
- (id) idleSelf |
You never send this message.
Reimplemented from MKUnitGenerator.
- (id) setInput: | (id) | aPatchPoint |
Sets the input patchpoint to aPatchPoint.
aPatchPoint | is an id. |