#import <Out1nUG.h>
Public Member Functions | |
(id) | - setScale: |
Sets the factor by which the input signal is scaled. | |
(id) | - setChannel: |
Sets the channel to which the Out1nUG sends its output. | |
(id) | - runSelf |
If scale has not been set, sets it to 1.0. | |
(id) | - setInput: |
Sets the input patchpoint to aPatchPoint. | |
Static Public Member Functions | |
(BOOL) | + shouldOptimize: |
Specifies that all arguments are to be optimized if possible. |
Out1aUG, Out1bUG and Out1nUG provide single-channel access to the DSP's stereo output stream. Out1aUG writes its input signal to the left channel, Out1bUG writes to the right channel and Out1nUG allows the channel to be set with a method. To write a stereo signal, it may be more convenient to use a single Out2sumUG object rather than one of each of these.
Where the samples that are written to the DSP output stream are ultimately sent
If you're building a MKSynthPatch subclass, you should note that every MKSynthPatch object should have its own signal-output MKUnitGenerator; in other words, you don't allocate just one such object and then share it amongst the various MKSynthPatches. The output signals produced by all the running Out1aUG's, Out1bUG's, Out1nUG's and Out2sumUG's are mixed (added) together into the DSP's output stream.
Out1nUG additionally makes possible quadraphonic (or other multi-channel) output, with the proper external serial port device. Additionally, the orchestra must be set up as follows:
[anOrch setSerialSoundOut:YES]; [anOrch setSerialPortDevice:[[QuadSerialPortDevice alloc] init]]; [anOrch open];
where QuadSerialPortDevice is a custom subclass of DSPSerialPortDevice that overrides the -outputChannelCount method to return 4 and overrides the -setUpSerialPort: method to send the correct settings for the particular device.
Out1nUGa a input
+ (BOOL) shouldOptimize: | (unsigned) | arg |
Specifies that all arguments are to be optimized if possible.
arg | is an unsigned. |
Reimplemented from MKUnitGenerator.
- (id) setScale: | (double) | value |
Sets the factor by which the input signal is scaled.
By default, the scaler is set to 1.0. Effective values are between 0.0 and 1.0 (negative values are the same as their absolute values, but with a 180 degree phase shift).
value | is a double. |
- (id) setChannel: | (int) | chan |
Sets the channel to which the Out1nUG sends its output.
chan is 0-based. For example, in a square quadraphonic configuration, the channels would be as follows:
chan position 0 left front 1 right front 2 right rear (or left rear, if using "Z" convention) 3 left rear (or right rear, if using "Z" convention)
You should never set chan greater than or equal to the number of output channels.
chan | is an int. |
- (id) runSelf |
If scale has not been set, sets it to 1.0.
This method is invoked when you send the run message to the object.
Reimplemented from MKUnitGenerator.
- (id) setInput: | (id) | aPatchPoint |
Sets the input patchpoint to aPatchPoint.
aPatchPoint | is an id. |