DswitchUG Class Reference

DswitchUG switches between two inputs after a certain amount of time. More...

#import <DswitchUG.h>

List of all members.

Public Member Functions

(id) - setInput1:
 Sets the input 1 patchpoint to aPatchPoint.
(id) - setInput2:
 Sets the input 2 patchpoint to aPatchPoint.
(id) - setOutput:
 Sets the output patchpoint to aPatchPoint.
(id) - setScale1:
 Sets the factor by which first input signal is scaled.
(id) - setDelaySamples:
 Immediately switches the DswitchUG to its first input and causes it to switch to its second input after count samples have been read.
(id) - idleSelf
 You never send this message.

Static Public Member Functions

(BOOL) + shouldOptimize:
 Specifies that all arguments are to be optimized if possible except the delay counter.


Detailed Description

DswitchUG switches between two inputs after a certain amount of time.

DswitchUG reads a specified number of samples from its first input signal and then switches to read its second input signal. You can cause a DswitchUG to switch between its two inputs any number of times while its running. A scaler on the first input signal is provided. The input patchpoints must be allocated in the same memory space.

A similar class, DswitchtUG, allows scaling on both signals but restricts the timing of the switch to a tick boundary.

Memory Spaces

DswitchUGab a output b input1 and input2


Member Function Documentation

+ (BOOL) shouldOptimize: (unsigned)  arg  

Specifies that all arguments are to be optimized if possible except the delay counter.

Parameters:
arg is an unsigned.
Returns:
Returns an BOOL.

- (id) setInput1: (id)  aPatchPoint  

Sets the input 1 patchpoint to aPatchPoint.

Parameters:
aPatchPoint is an id.
Returns:
Returns an id. Returns nil if the argument isn't a patchpoint; otherwise returns self.

- (id) setInput2: (id)  aPatchPoint  

Sets the input 2 patchpoint to aPatchPoint.

Parameters:
aPatchPoint is an id.
Returns:
Returns an id. Returns nil if the argument isn't a patchpoint; otherwise returns self.

- (id) setOutput: (id)  aPatchPoint  

Sets the output patchpoint to aPatchPoint.

Parameters:
aPatchPoint is an id.
Returns:
Returns an id. Returns nil if the argument isn't a patchpoint; otherwise returns self.

- (id) setScale1: (double)  scale  

Sets the factor by which first input signal is scaled.

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

- (id) setDelaySamples: (int)  count  

Immediately switches the DswitchUG to its first input and causes it to switch to its second input after count samples have been read.

If count is less than or equal to zero, the switch to the second input is performed immediately. If the object is currently reading from its first input because of a previous invocation of this method, the old count is superceded by the new one.

Parameters:
count is an int. A negative value will switch immediately to input2.
Returns:
Returns self.

- (id) idleSelf  

You never send this message.

Returns:
Returns an id. It's invoked by sending the idle message to the object. Sets the output patchpoint to sink, thus ensuring that the object does not produce any output. Note that you must send setOutput: and run again to use the MKUnitGenerator after sending idle.


The documentation for this class was generated from the following file:

Generated on Sat Dec 5 17:01:14 2009 for MusicKit by  doxygen 1.5.6