RISC OS Open
Safeguarding the past, present and future of RISC OS for everyone
ROOL
Home | News | Downloads | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

Sound Voice Generator GateOff (changes)

Showing changes from revision #1 to #2: Added | Removed | Changed

Programmer's SoundChannels Reference Manuals
» Part 15 – SWI Calls
» Sound Sound_InstallVoice
» Sound_InstallVoice Sound Voice Generator
» Sound Voice Generator

Voice Generator GateOff

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.

Notes

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.

See also

  • Sound_Configure, Sound Voice Generator
Revised on November 13, 2017 02:30:28 by Alan Robertson (52) (49.192.18.196)
Edit | Back in time (1 revision) | Hide changes | History | Views: Print | Source | Linked from: Sound Voice Generator

Search the Wiki

Social

Follow us on and

ROOL Store

Buy RISC OS Open merchandise here, including SD cards for Raspberry Pi and more.

Donate! Why?

Help ROOL make things happen – please consider donating!

RISC OS IPR

RISC OS is an Open Source operating system owned by RISC OS Developments Ltd and licensed primarily under the Apache 2.0 license.

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2018 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys