Showing changes from revision #1 to #2:
Added | Removed | Changed
The GateOff entry is used to finish synthesising a sound. Simple voices may stop immediately, which is liable to cause an audible ‘click’; more refined algorithms might gradually release the note over a number of buffer periods. A GateOff entry may be immediately followed by a GateOn entry.
Entry | |
---|---|
R0 | Pointer to Voice Generator |
R4 | Flag byte |
R6 | Negative if Channel Handler configuration has changed |
R7 | Channel number (0-7) |
R8 | Sample period in µS |
R9 | Pointer to Sound Channel Control Block |
R10 | Buffer end address for this channel (exclusive) |
R11 | Interleave increment (1, 2, 4 or 8) |
R12 | Buffer start address for this channel (inclusive) |
Exit | |
---|---|
R0 | Flag byte |
On exit the F2 bit (bit 1) is set if the voice is to stop sounding, or the A bit (bit 3) is set if the voice is still being released.
The Voice Generator is entered in IRQ mode with IRQs enabled, they must remain enabled to ensure that system devices do not have a lengthy wait to be serviced. The code for a Voice Generator must therefore be re-entrant, and R14 must not be used as a subroutine link register, since an interrupt will corrupt it. Sufficient IRQ stack depth must be maintained for system IRQ handling. You can enter SVC mode if you wish.
To return to the Channel Handler use LDR PC,[R13],#4
The buffer length is a multiple of 4 words (16 bytes) long, and word aligned and the interleave is dependent on the number of channels.