
6.2 Pitch
In a musical note the pitch is by far the single most important factor. A musical note can be
described as a regular oscillation, all oscillations have frequency, period and amplitude. (see fig 1).
Figure 1: The characteristics of a musical note
The frequency is the number of oscillations per second, and the period is length of time each
oscillation lasts. Amplitude is an attribute of volume and is not relevant here in defining the pitch of
a note.
Frequency and period are related to each other by the simple formula:
Frequency (
expressed in Hertz
) = l/Period (
expressed in seconds
)
The relationship between frequency and the <tone period> in the SOUND
command is:
Frequency
(expressed in Hz)
= 125000 / <tone period>
Thus a tone period) of 1000 would result in a 125 Hz tone, and a tone period) of 125 would result in a
1000Hz (1kHz) note.
Either of these could be used to set the pitch, but Amstrad BASIC chooses to use the <tone period>.
Don’t be mislead by the fact that as the period goes up in value, the pitch goes down. The pitch
appears in the keyword description of SOUND as <tone period>. The range of tone periods available
is extensive (0....4095) and must be expressed as an integer. This may lead to some rounding errors
when constructing a scale of musical notes, but nothing that would offend any but the most critical
ear-see Appendix VII.
When a note is played on a real musical instrument the pitch may vary, sometimes deliberately by
vibrato. Using the
ENT
command (
EN
velope
T
one) we can design a specific format for the structure
of period changes during each note - and this may be invoked in the
SOUND
command. This feature
is known here as the <tone envelope>.
Содержание CPC464
Страница 1: ......
Страница 32: ...or you can type 3e1 1e1 ENTER 300 2 3000x1000 Type 3e3 1e3 ENTER 3000000 3 3000x0 001 Type 3e3 1e 3 ENTER 3 ...
Страница 102: ...PRINT 10 AND 12 Results in 8 PRINT 10 AND 1000 Results in 8 again ...
Страница 118: ...TO DO DRAW THIS PAGE ...
Страница 219: ...actual value may be made to vary during the execution of a program ...
Страница 240: ...Text and WINDOW planner Mode 2 80 Columns ...
Страница 241: ......
Страница 245: ...Sound envelope Music planner sheet ...