The Filter Statement - Commodore 128 System Manual

Hide thumbs Also See for 128:
Table of Contents

Advertisement

The FILTER Statement

The FILTER statement specifies the cutoff frequency, the type of
filter being used and the resonance. The resonance is the
peaking effect of the sound wave frequency as it approaches the
cutoff frequency. The resonance determines the sharpness and
clearness of a sound: the higher the resonance, the sharper the
sound.
This is the format of the FILTER statement:
FILTER cf, Ip, bp, hp, res
Here's what the parameters mean:
cf
Cutoff frequency (0 - 2047)
Ip
Low-pass filter 0 = off, 1 = on
bp
Band-pass filter 0 = off, 1 = on
hp
High-pass filter 0 = off, 1 = on
res —
Resonance (0 -1 5 )
You can specify the cutoff frequency to be any value between 0
and 2047. Turn on the low-pass filter by specifying a 1 as the
second parameter in the FILTER statement. Turn on the band­
pass filter by specifying a 1 as the third parameter and enable the
high-pass filter with a 1 in the fourth parameter position. Turn off
any of the three filters by placing a 0 in the respective position of
the filter you want to disable. You can enable or disable one, two
or all three of the filters at the same time.
Now that you have some background on the FILTER statement,
add this line to your sound program, but do not RUN the program
yet.
45 FILTER 1 2 0 0 ,1 ,0 , 0 ,1 0
Line 45 sets the cutoff frequency at 1200, turns on the low-pass
filter, disables the high-pass and band-pass filters and assigns a
10 as the resonance level. Now go back and turn the filter on in
your PLAY statements by changing all the X0 filter control
characters to X1. Reset the sound chip by pressing RUN/STOP
and RESTORE keys and RUN your sound program again. Notice
the differences between the way the notes sound and how they
sounded without the filter. Change line 45 to:
45 FILTER 1200, 0 ,1 ,0 ,1 0
7-22

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

128d

Table of Contents