EasyManua.ls Logo

Commodore Amiga A2000 - Page 164

Commodore Amiga A2000
380 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
A sample for an equal-tempered scale typically represents one full cycle of a note. To
avoid aliasing distortion with these samples you should use period values in the range
124-256 only. Periods from 124-256 correspond to playback rates in the range 14-28K
samples per second which makes the most effective use of the Amiga's 7 kHz cut-off filter
to prevent noise. To stay within this range you will need a different sample for each
octave.
If you cannot use a different sample for each octave, then you will have to adjust the
period value over its full range 124-65536. This is easier for the programmer but can
produce undesirable high-frequency noise in the resulting tone. Read the section called
"Aliasing Distortion" for more about this.
The values in Table 5-7 were generated using the formula shown below. To calculate the
tone generated with a given sample size and period use:
Clock Constant 3579545
Frequency = -------------- = ------- = 880.8hz
Sample Bytes*Period 16*Period
The clock constant in an NTSC system is 3579545 ticks per second. In a PAL system, the
clock constant is 3546895 ticks per second. Sample bytes is the number of bytes in one
cycle of the waveform sample. (The clock constant is derived from dividing the system
clock value by 2. The value will vary when using an external system clock, such as a
genlock.)
Using the formula above you can generate the values needed for the even-tempered scale
for any arbitrary sample. Table 5-8 gives a close approximation of a five octave even
tempered-scale using five samples. The values were derived using the formula above.
Notice that in each octave period values are the same but the sample size is halved. The
samples listed represent a simple triangular wave form.
- Audio Hardware 155

Table of Contents

Other manuals for Commodore Amiga A2000

Related product manuals