MusicKit  0.0.0
Out2sumUG.h
00001 /*
00002   $Id$
00003   
00004   Defined In: The MusicKit
00005   Description:
00006     Out2sumUG - from dsp macro /usr/lib/dsp/ugsrc/out2sum.asm (see source for details).
00007 
00008    Out2sum writes its input signal to both channels of the stereo output 
00009    sample stream of the DSP, adding into that stream. 
00010    The stream is cleared before each DSP tick (each orchestra program 
00011    iteration). Out2sum also provides individual scaling on each output channel.
00012    The method setBearing: allows a convenient way to control the proportion
00013    of the signal sent to each channel.
00014 
00015    You instantiate a subclass of the form 
00016    Out2sumUG<a>, where <a> = space of input
00017 
00018   Original Author: David A. Jaffe
00019 
00020   Copyright (c) 1988-1992, NeXT Computer, Inc.
00021   Portions Copyright (c) 1994 NeXT Computer, Inc. and reproduced under license from NeXT
00022   Portions Copyright (c) 1994 Stanford University.
00023   Portions Copyright (c) 1999-2001, The MusicKit Project.
00024 */
00025 // classgroup Sound Inputs and Outputs
00058 #ifndef __MK_Out2sumUG_H___
00059 #define __MK_Out2sumUG_H___
00060 
00061 #import <MusicKit/MKUnitGenerator.h>
00062 
00063 @interface Out2sumUG : MKUnitGenerator
00064 {
00065   BOOL _reservedOut2sum1; 
00066   double bearingScale;
00067 }
00068 
00076 +(BOOL)shouldOptimize:(unsigned) arg;
00077 
00089 - setLeftScale: (double) value;
00090 
00102 - setRightScale: (double) value;
00103 
00115 - setBearing: (double) degrees;
00116 /* As a convenience, you can set both scaleA and scaleB with a single 
00117    message. 
00118 
00119    When val is 0, the signal is equally distributed between the two channels.
00120    When val is -45, you get the left channel, +45 you get the right channel.
00121    Val = 90 is the same as val = 0. */  
00122 
00123 
00132 - setBearing: (double) degrees scale: (double) scaleValue;
00133 
00141 - runSelf;
00142 
00154 -idleSelf;
00155 /* Since Out2sum has no outputs, it idles itself by patching its inputs
00156    to zero. Thus, an idle Out2sum makes no sound. */ 
00157 
00158 
00168 -setInput: (id) aPatchPoint;
00169 /* Sets input patch point. */
00170 @end
00171 
00172 #endif