#import <ArielQP.h>
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. |
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.
+ (id) new |
If an ArielQP for slot 2 already exists, returns it.
+ (id) newInSlot: | (unsigned short) | slot |
If an ArielQP for the specified already exists, returns it.
slot | is an int. |
- (id) satellite: | (char) | which |
Returns the specified satellite, which should be one of 'A', 'B', 'C', or 'D'.
which | is a char. |
- (id) setSatSoundIn: | (BOOL) | yesOrNo |
If yesOrNo, enables the hub/satellite inter-process sound link.
yesOrNo | is a BOOL. |
- (id) setDRAMAutoRefresh: | (BOOL) | yesOrNo |
If yesOrNo, enables the DRAM refresh.
yesOrNo | is a BOOL. |
- (BOOL) DRAMAutoRefresh |
Returns whether Auto Refresh is on.
- (BOOL) satSoundIn |
Returns whether the hub/satellite inter-process sound link is enabled.
- (id) makeSatellitesPerform: | (SEL) | selector |
Sends the specified selector to the four ArielQPSat objects.
selector | is a SEL. |
- (id) makeSatellitesPerform: | (SEL) | selector | ||
with: | (id) | arg | ||
Sends the specified selector to the four ArielQPSat objects with the specified argument.
selector | is a SEL. | |
arg | is an id. |
- (id) makeQPPerform: | (SEL) | selector |
Sends the specified selector to the objects representing all five DSPs.
selector | is a SEL. |
- (id) makeQPPerform: | (SEL) | selector | ||
with: | (id) | arg | ||
Sends the specified selector to the objects representing all five DSPs with the specified argument.
selector | is a SEL. | |
arg | is an id. |
- (id) setDRAMAutoRefresh: | (BOOL) | yesOrNo |
If yesOrNo, enables the DRAM refresh.
yesOrNo | is a BOOL. |