Out2sumUG Class Reference

Out2sumUG sends its monaural input patchpoint to a stereo output stream, panning the sound as indicated by its memory arguments. More...

#import <Out2sumUG.h>

Inheritance diagram for Out2sumUG:

MKUnitGenerator

List of all members.

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.


Detailed Description

Out2sumUG sends its monaural input patchpoint to a stereo output stream, panning the sound as indicated by its memory arguments.

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.

Memory Spaces

Out2sumUGa a input


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.

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

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

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

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

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

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

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

Parameters:
degrees is a double.
scaleValue is a double.
Returns:
Returns self.

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

Returns:
Returns an id.

Reimplemented from MKUnitGenerator.

- (id) idleSelf  

You never send this message.

Returns:
Returns an id. It's invoked by sending the idle message to the object. Since Out2sum has no outputs, it idles itself by patching its inputs to zero. Thus, an idle Out2sum makes no sound. Note that you must send setInput: and run again to use the MKUnitGenerator after sending idle.

Reimplemented from MKUnitGenerator.

- (id) setInput: (id)  aPatchPoint  

Sets the input patchpoint to aPatchPoint.

Parameters:
aPatchPoint is an id.
Returns:
Returns an id. 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:16 2009 for MusicKit by  doxygen 1.5.6