DelayqpUG Class Reference

DelayqpUG is similar to DelayUG, but it uses the Ariel QuintProcessor's DRAM memory to produce the delay. More...

#import <DelayqpUG.h>

Inheritance diagram for DelayqpUG:

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) - setDelayAddress:length:
 Sets the address and length of the DRAM segment used as delay memory.
(id) - adjustLength:
 Sets the number of delayed samples to newDelayLength.
(id) - setPointer:
 Repositions the pointer to point to the n'th sample in the DRAM segment used as delay memory, counting from sample 0.
(id) - resetPointer
 Resets the pointer to the beginning of the DRAM segment used as delay memory.
(int) - length
 Returns the number of samples delay.
(id) - runSelf
 Subclass implementation of this method provides instructions for making the object's DSP code usable (as defined by the subclass).
(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 pointer.


Detailed Description

DelayqpUG is similar to DelayUG, but it uses the Ariel QuintProcessor's DRAM memory to produce the delay.

DelayqpUG may only be used on the hub (master) DSP of the Ariel QuintProcessor. It delays its input signal by some number of samples, using the dynamic RAM (DRAM), before producing it at its output. Each DelayqpUG maintains a single pointer into the delay memory. When the object is run, a tick's worth of samples are read and replaced with an equal number of samples from the input signal. The pointer is then incremented by a tick. When the pointer reaches the end of the delay memory, it automatically jumps back to the beginning, even if it's in the middle of a tick - in other words, the length of the delay memory needn't be a multiple of the tick size. The rate at which the pointer is incremented can't be modified, nor can you offset the beginning of the delay memory. However, you can reposition the pointer to any arbitrary sample in the delay memory through the setPointer: method.

DRAM requires periodic refreshing. You can control whether this is "implicit" (done by the mere accessing of the memory) or "automatic" (done by the Quint Processor refresh hardware.) The ArielQP method setDRAMAutoRefresh:controls the refresh mode.

Currently there is no support for automatic allocation of DRAM. That is, there is no parallel to the automatic system provided for DSP SRAM. The application must keep track of allocation itself. By convention, location 1 is used as a "sink" location (a place to write garbage) and location 0 is a "zero" location (a place that is guaranteed to always hold a zero, assuming nobody overwrites it.)

The MusicKit does not automatically clear DRAM, with the exception of the "zero" location. If you want to clear a segment of DRAM, use a DelayqpUG, set the input location to [orchestra segmentZero: MK_xPatch] (or MK_yPatch), and let the DelayqpUG run for a while.

Memory Spaces

DelayqpUGab a output b input


Member Function Documentation

+ (BOOL) shouldOptimize: (unsigned)  arg  

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

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) setDelayAddress: (DSPDatum)  address
length: (DSPDatum)  length 

Sets the address and length of the DRAM segment used as delay memory.

Also sets the pointer to the start of the DRAM segment.

Parameters:
address is a DSPDatum.
length is a DSPDatum.
Returns:
Returns self.

- (id) adjustLength: (int)  newDelayLength  

Sets the number of delayed samples to newDelayLength.

Parameters:
newDelayLength is an int.
Returns:
Returns an id.

- (id) setPointer: (int)  offset  

Repositions the pointer to point to the n'th sample in the DRAM segment used as delay memory, counting from sample 0.

Parameters:
offset is an int.
Returns:
Returns self.

- (id) resetPointer  

Resets the pointer to the beginning of the DRAM segment used as delay memory.

Returns:
Returns self.

- (int) length  

Returns the number of samples delay.

Returns:
Returns an int.

- (id) runSelf  

Subclass implementation of this method provides instructions for making the object's DSP code usable (as defined by the subclass).

You never invoke this method directly, it's invoked automatically by the run method. The default does nothing and returns the receiver.

Returns:
Returns an id.

Reimplemented from MKUnitGenerator.

- (id) idleSelf  

You never send this message.

It's invoked by sending the idlemessage to the object. Sets the output patchpoint to sink, thus ensuring that the object does not produce any output. Also, sets the DRAM delay memory segment to DRAM's sink (location 0) and the length to 1, so that the object. 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:14 2009 for MusicKit by  doxygen 1.5.6