ArielQP Class Reference

The Ariel QuintProcessor is a board that fits into the NeXT cube. It features four "satellite" ("slave") DSPs with 16 or 32K of static RAM (SRAM), a hub DSP with 8K of SRAM, a bank of dynamic RAM (DRAM) a set of serial ports, two per DSP, and a SCSI chip. The Music Kit supports the DSPs, the DSP ports, and the DRAM. It does not currently support the SCSI. More...

#import <ArielQP.h>

Inheritance diagram for ArielQP:

MKOrchestra SndStreamClient

List of all members.

Public Member Functions

(id) - satellite:
 Returns the specified satellite, which should be one of 'A', 'B', 'C', or 'D'.
(id) - setSatSoundIn:
 If yesOrNo, enables the hub/satellite inter-process sound link.
(id) - setDRAMAutoRefresh:
 If yesOrNo, enables the DRAM refresh.
(BOOL) - DRAMAutoRefresh
 Returns whether Auto Refresh is on.
(BOOL) - satSoundIn
 Returns whether the hub/satellite inter-process sound link is enabled.
(id) - makeSatellitesPerform:
 Sends the specified selector to the four ArielQPSat objects.
(id) - makeSatellitesPerform:with:
 Sends the specified selector to the four ArielQPSat objects with the specified argument.
(id) - makeQPPerform:
 Sends the specified selector to the objects representing all five DSPs.
(id) - makeQPPerform:with:
 Sends the specified selector to the objects representing all five DSPs with the specified argument.
(id) - setDRAMAutoRefresh:
 If yesOrNo, enables the DRAM refresh.

Static Public Member Functions

(id) + new
 If an ArielQP for slot 2 already exists, returns it.
(id) + newInSlot:
 If an ArielQP for the specified already exists, returns it.


Detailed Description

The Ariel QuintProcessor is a board that fits into the NeXT cube. It features four "satellite" ("slave") DSPs with 16 or 32K of static RAM (SRAM), a hub DSP with 8K of SRAM, a bank of dynamic RAM (DRAM) a set of serial ports, two per DSP, and a SCSI chip. The Music Kit supports the DSPs, the DSP ports, and the DRAM. It does not currently support the SCSI.

ArielQP class serves a dual purpose. First it is a subclass of MKOrchestra that represnts the hub DSP. As such, it can be sent MKOrchestra messages such as allocUnitGenerator:, open, run, etc. Second, it represents the Quint Processor as a whole. The satellite DSPs are represented by instances of the class ArielQPSat (see below). Creating an instance of ArielQP automatically creates the associated ArielQPSat objects. Freeing an ArielQP object frees its ArielQPSat objects.

The ArielQP (hub DSP) may be used as just another DSP, or it may be used as the hub of the 5-DSP configuration. To use it alone, send it the message setSatSoundIn:NO. In this mode, it sends and optionally receives sound from its DSP serial port. The satellite DSPs need not be used. If they are used, each sends and optionally receives sound from its serial port. Note that in this mode you must have an Ariel ProPort plugged into any DSP that you intend to use. If you leave a DSP with no ProPort, its clock will never advance. Thus, for example, if you plan to use only DSP 'D', you should send 'run' to it alone, not to the MKOrchestra class.

Note: The Quint Processor SCI port does not function like the NeXT DSP's SCI port. Therefore, when using a DSPSerialPortDevice with the QuintProcessor, you should send setSendSettings:NO to disable sending of any commands to the SCI port. This implies that the only serial port device you should use with the QuintProcess is the Ariel ProPort.

To use the hub as part of a 5-DSP configuration, send the message setSatSoundIn:YESto the ArielQP. The model here is of four satellites doing synthesis or sound processing of sound received by their serial ports and the hub merging these sounds, possibly doing more processing, and sending the result out its serial port. Since this is the most common way of using the QuintProcessor, the default value of satSoundIn and hubSoundOutare YES . And since the hub is usually responsible for sending sound to its serial port, the default value of serialSoundOut for an ArielQP object is YES. Note that in this mode you must have an Ariel ProPort or equivalent plugged into DSP 'E'.

Note that setSatSoundIn:YESonly enables inter-DSP communication. In order to actually use the sound from the satellites, you must have one or more instances of the unit generator In1qpUG running on the hub. Each instance provides access to one channel of sound from one of the satellite DSPs. Multiple In1qpUG instances may be accessing the same satellite DSP channel. In addition, the Music Kit provides a MKSynthPatch for the common case of simply adding all the satellites into the output stream. This MKSynthPatch is called ArielQPMix. Simply allocating an instance of this MKSynthPatch immediately starts summing the satellites' sound into the hub DSP's output stream. You do not have to send the MKSynthPatch a MKNote. ArielQPMix is part of the Music Kit MKSynthPatch Library.

The hub has another special funtion - it alone can access the bank of DRAM. To access the DRAM, you need a unit generator that reads and writes the DRAM to be running on the hub. The Music Kit provides one such unit generator, DelayqpUG, which implements a digital delay line using the DRAM. To use it, simply allocate one from the ArielQP object that represents the hub. DelayqpUG is very much like the DelayUG except that it is capable of much longer delays. Note that currently, the ArielQP class does not support automatic allocation of DRAM - the MKSynthData class is not used and the application has to keep track of what memory it is using. By combining instances of In1qpUG and DelayqpUG, it is easy to make a MKSynthPatch that reverberates the sound from the other DSPs. Note that in the current implemenation, the satellites do not have direct access to the DRAM. To do reverberation, they send their sound to the hub, either via inter-process sound or via the DSP serial ports. (Chaining DSP serial ports is a practical and useful technique and is another approach to combining the power of the five DSPs. )

The Music Kit 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. 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.

The current version of mkmon_A_qp_hub_8k.dsp assumes a 256K DRAM bank. If you upgrade to larger DRAM, you have to change the configuration code in smsrc/reset_boot.asm.

For an example of how to write a DSP unit generator that uses DRAM, see ugsrc/delayqp.asm. You should bracket any reading/writing of DRAM with the macros begin_dram_access and end_dram_access. See the file smsrc/qp.asm for other useful QuintProcessor DSP macros.


Member Function Documentation

+ (id) new  

If an ArielQP for slot 2 already exists, returns it.

Returns:
Returns an id. Otherwise, if an Ariel QuintProcessor board is installed in slot 2, creates and returns a new instance of ArielQP and creates, if necessary, four instances of ArielQPSat. Otherwise returns nil.

+ (id) newInSlot: (unsigned short)  slot  

If an ArielQP for the specified already exists, returns it.

Parameters:
slot is an int.
Returns:
Returns an id. Otherwise, if an Ariel QuintProcessor board is installed in the specified, creates and returns a new instance of ArielQP and creates, if necessary, four instances of ArielQPSat. Otherwise returns nil. <<Note: In release 4.0 of the Music Kit, the first Ariel QuintProcessor must be in slot 2, the second must be in slot 4 and the third must be in slot 6. >>

- (id) satellite: (char)  which  

Returns the specified satellite, which should be one of 'A', 'B', 'C', or 'D'.

Parameters:
which is a char.
Returns:
Returns an id.

- (id) setSatSoundIn: (BOOL)  yesOrNo  

If yesOrNo, enables the hub/satellite inter-process sound link.

Parameters:
yesOrNo is a BOOL.
Returns:
Returns an id. Note that if the link is enabled, all five DSPs must be sent the run message. Otherwise, the hub DSP will block waiting for sound from the satellites that are not running. If the link is not enabled, then the hub does not block and the other DSPs need not be running. setSatSoundIn: must be sent when the ArielQP and ArielQPSat objects are closed (i.e. before they have been sent the -open message.

- (id) setDRAMAutoRefresh: (BOOL)  yesOrNo  

If yesOrNo, enables the DRAM refresh.

Parameters:
yesOrNo is a BOOL.
Returns:
Returns an id. If you use the macros provided in the file smsrc/qp.asm, your unit generator will automatically turn off refresh before accessing memory, then turn it on again. Refresh is off by default. For very low sampling rates or non-sequential DRAM accesses, it may be necessary to turn it on. You'll know if you need to turn it on because you'll hear clicks and pops.

- (BOOL) DRAMAutoRefresh  

Returns whether Auto Refresh is on.

Returns:
Returns a BOOL.

- (BOOL) satSoundIn  

Returns whether the hub/satellite inter-process sound link is enabled.

Returns:
Returns a BOOL.

- (id) makeSatellitesPerform: (SEL)  selector  

Sends the specified selector to the four ArielQPSat objects.

Parameters:
selector is a SEL.
Returns:
Returns an id.

- (id) makeSatellitesPerform: (SEL)  selector
with: (id)  arg 

Sends the specified selector to the four ArielQPSat objects with the specified argument.

Parameters:
selector is a SEL.
arg is an id.
Returns:
Returns an id.

- (id) makeQPPerform: (SEL)  selector  

Sends the specified selector to the objects representing all five DSPs.

Parameters:
selector is a SEL.
Returns:
Returns an id.

- (id) makeQPPerform: (SEL)  selector
with: (id)  arg 

Sends the specified selector to the objects representing all five DSPs with the specified argument.

Parameters:
selector is a SEL.
arg is an id.
Returns:
Returns an id.

- (id) setDRAMAutoRefresh: (BOOL)  yesOrNo  

If yesOrNo, enables the DRAM refresh.

Parameters:
yesOrNo is a BOOL.
Returns:
Returns an id. If you use the macros provided in the file smsrc/qp.asm, your unit generator will automatically turn off refresh before accessing memory, then turn it on again. Refresh is off by default. For very low sampling rates or non-sequential DRAM accesses, it may be necessary to turn it on. You'll know if you need to turn it on because you'll hear clicks and pops.


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