RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Downloads | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

*Sound

Programmer's Reference Manuals
» *Commands
» *Sound

*Sound

Use

This *Command generates a sound with no delay.

Syntax

*sSound channel amplitude pitch duration

Parameters

channel Channel number (1 – 8)
amplitude Linear scale: 0 silent – &FFF1 loud, or;
Logarithmic scale: &100 silent – &17F loud (a change of 16 will halve/double the amplitude)
pitch Pitch: 0 – 255. Each unit represents a quarter of a semitone. Value of 53 is middle C, or
256 to 32767 (&100 to &7FF) where top 3 bits specify octave, and bottom 12 bits specify fraction of octave. Value of 16384 (&4000) is middle C
duration Duration: 0 to 32767 (&0 – &7FFF) in twentieths of a second. Value of 255 gives a note of infinite duration

Notes

To generate a sound after a specified amount of time use *QSound.

See also

  • Sound_Control
  • Sound_ControlPacked
  • *QSound
Revised on November 24, 2016 10:53:38 by Alan Robertson (52) (58.110.70.190)
Edit | Back in time (3 revisions) | See changes | History | Views: Print | Source | Linked from: *Tempo, *QSound, *Tuning, *Commands, SoundChannels *Commands

Search the Wiki

Social

Follow us on and

Commercial use

For commercial enquiries, please contact the owners of RISC OS, Castle Technology Ltd.

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!

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2011 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