TablookiUG Class Reference

TablookiUG does interpolated table lookup, using its input as an index into the table. More...

#import <TablookiUG.h>

Inheritance diagram for TablookiUG:

MKUnitGenerator

List of all members.

Public Member Functions

(id) - setInput:
 Sets the input patchpoint to aPatchPoint.
(id) - setOutput:
 Sets the output patchpoint to aPatchPoint.
(id) - setLookupTable:
 Sets the SynthData object used as the lookup table to aSynthData.
(id) - idleSelf
 You never send this message.

Static Public Member Functions

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


Detailed Description

TablookiUG does interpolated table lookup, using its input as an index into the table.

TablookiUG does interpolated table-lookup. It takes its input, which is assumed to be between -1 and 1, scales it so that -1.0 maps onto the start of the table and 1.0 maps onto the end of the table, then does a lookup and returns the corresponding table value. If the computed address is not an integer, TablookiUG does linear interpolation between table values - thus, it gives a high-quality mapping.

To use it in a Waveshaping context, simply use an oscillator as the input to the TablookiUG and set the TablookiUG's table to the appropriate distortion table. For an example, see the Waveshape MKSynthPatch in the Music Kit's MKSynthPatch library.

Note that the table size should be odd. This gives a symetrical table. For example, if the table size is 101, the point at 50 represents 0, there are 50 points corresponding to negative input (0-49, inclusive) and 50 points corresponding to positive input (51-100, inclusive).

Memory Spaces

TablookiUGabc a output b input c lookup table memory


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) setInput: (id)  aPatchPoint  

Sets the input patchpoint to aPatchPoint.

Parameters:
aPatchPoint is an id.
Returns:
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 nil if the argument isn't a patchpoint; otherwise returns self.

- (id) setLookupTable: (id)  aSynthData  

Sets the SynthData object used as the lookup table to aSynthData.

The table size must be odd. If aSynthData has an even length, the top-most point is not used.

Parameters:
aSynthData is an id.
Returns:
Returns self.

- (id) idleSelf  

You never send this message.

It's invoked by sending the idle message to the object. Sets the output patchpoint, as well as the delay memory, 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.

Returns:
Returns an id.

Reimplemented from MKUnitGenerator.


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

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