Acorn Computers BBC Micro Model B w/8271 — Acorn BBC Micro Model B w/8271 User Guide Manual PDF (EN)

216 ENVELOPE Purpose The ENVELOPE statement is used with the SOUND statement to control the volume and pitch of a sound while it is playing. All natural sounds change in volume (loudness or amplitude); for example, the sounds from a piano start off loudly and then fade away. An aircraft flying overhead starts off softly, gets louder and then fades away. The variation of amplitude (loudness) for the aircraft, as it flies overhead, looks something like this: This variation of amplitude with time is described as an ‘amplitude envelope’. Some sounds change in pitch. For example, a wailing police siren: This variation of pitch with time is called a ‘pitch envelope’.

The BBC Microcomputer can use both pitch and amplitude envelopes and these are set up with the ENVELOPE statement. Example 10 ENVELOPE 1,1,4,-4,4,10,20,10,127,0,0,-5,126,126 20 SOUND 1,1,100,200