MusicKit  0.0.0
Scl2add2UG.h
00001 /*
00002   $Id$
00003   
00004   Defined In: The MusicKit
00005   Description:
00006     Scl2add2UG. From dsp macro /usr/lib/dsp/ugsrc/scl2add2.asm (see source for details).
00007 
00008         You instantiate a subclass of the form Scl2add2UG<a><b><c>, where 
00009         <a> = space of output
00010         <b> = space of input1
00011         <c> = space of input2
00012 
00013       The scl2add2 unit-generator multiplies two input signals
00014       times constant scalers then adds them together to produce a
00015       third.  The output vector can be the same as an input vector.
00016       Inner loop is two instructions if space of input1 is "x" and
00017       space of input2 is "y", otherwise three instructions.
00018 
00019   Original Author: David A. Jaffe
00020 
00021   Copyright (c) 1988-1992, NeXT Computer, Inc.
00022   Portions Copyright (c) 1994 NeXT Computer, Inc. and reproduced under license from NeXT
00023   Portions Copyright (c) 1994 Stanford University.
00024   Portions Copyright (c) 1999-2001, The MusicKit Project.
00025 */
00026 // classgroup Patchpoint Arithmetic
00045 #ifndef __MK_Scl2add2UG_H___
00046 #define __MK_Scl2add2UG_H___
00047 
00048 #import <MusicKit/MKUnitGenerator.h>
00049 @interface Scl2add2UG:MKUnitGenerator
00050 
00051 
00061 -setInput1: (id) aPatchPoint;
00062 /* Sets input1. This is the input that is scaled. */
00063 
00064 
00074 -setInput2: (id) aPatchPoint;
00075 /* Sets input2. */
00076 
00077 
00087 -setOutput: (id) aPatchPoint;
00088 /* Sets output. */
00089 
00090 
00100 -setScale1: (double) val;
00101 
00110 - setScale2: (double) val;
00111 
00119 +(BOOL)shouldOptimize:(unsigned) arg;
00120 
00132 -idleSelf;
00133   /* Sets output to write to sink. */
00134 
00135 @end
00136 
00137 #endif