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

217 Description The ENVELOPE statement is followed by 14 parameters.

ENVELOPE N,T,PI1,P12,PI3,PN1,PN2,PN3,AA,AD,AS,AR,ALA,ALD Parameter Range Function N 1 to 4 Envelope number T bits 0-6 0 to 127 Length of each step in hundredths of a second 0 = auto-repeat pitch envelope bit 7 0 or 1 1 = don’t auto-repeat pitch envelope PI1 -128 to 127 Change of pitch per step in section 1 PI2 -128 to 127 Change of pitch per step in section 2 PI3 -128 to 127 Change of pitch per step in section 3 PN1 0 to 255 Number of steps in section 1 PN2 0 to 255 Number of steps in section 2 PN3 0 to 255 Number of steps in section 3 AA -127 to 127 Change of amplitude per step during attack phase AD -127 to 127 Change of amplitude per step during decay phase AS -127 to 0 Change of amplitude per step during sustain phase AR -127 to 0 Change of amplitude per step during release phase ALA 0 to 126 Target level at end of attack phase ALD 0 to 126 Target level at end of decay phase The N parameter specifies the envelope number that is to be defined.

It normally has a value in the range 1 to 4. If the BASIC statement BPUT# is not being used then envelope numbers up to and including 16 may be used. The T parameter determines the length in hundredths of a second of each step of the pitch and amplitude envelopes. The pitch envelope normally auto-repeats but this can be suppressed by setting the top bit of T – ie using values of T greater than 127. The six parameters PI1, P12, P13, PN1, PN2 and PN3 determine the pitch envelope. The pitch envelope has three sections and each section is specified with two parameters:

the increment, which may be positive or negative, and the number of times the increment is to be applied during that section, that is the number of steps. A typical pitch envelope might look like