Csound Csound-dev Csound-tekno Search About

amplitude response of tone & atone (cont)

Date1997-05-20 07:08
FromTrevor Baca
Subjectamplitude response of tone & atone (cont)
Eli Brandt wrote:
>As a first approximation, think of "tone" as having no effect below
>the cutoff frequency, and attenuating above it.  The amount of
>attenuation is proportional to how many *octaves* the signal is above
>the cutoff.  (6 dB/octave for a one-pole filter, specifically.)
>
>But 0 Hz is at minus infinity on the octave scale.  If you pick this
>as the cutoff, nothing will get through.  (Except DC, and in practice
>that probably won't work either.)

This works well.  However, plugging a bunch of different values into khp
for tone and atone suggests that the amplitude response curves of tone and
atone look something like these (which raise some questions):



       AMPLITUDE RESPONSE CURVE OF TONE
       |
       |
       |
ouput  |
amp    |    /-------------\    <-------- just below input amp value (90-97%)
values |   /               \
       |  /                 \       N.B. the plateau isn't really flat;
       | /                   \      the slope of the rise gradually decreases
       |/                     \
       -------------------------
       0        sr/2          sr

Question:
(1) Why doesn't tone's passband allow the input signal to pass at 100%
power?  (With a noise input of 10000, the maximum output signal amp is
~9700).



       AMPLITUDE RESPONSE CURVE OF ATONE
       |
       |
       | /\                    /\   |-------- these output amps are *greater*
ouput  |/  \                  /  \  |-------- than the input amp!
amp    |    --              --      <-------- input amp value
values |      --          --
       |        --      --
       |          ------
       |
       ---------------------------
       0           sr/2          sr

Questions:
(1) How is it possible that an output signal from atone can have a greater
amplitude than the input signal?  (When sr = 10000 and noise with an amp of
10000 is filtered with khp = 400, the output amp is ~12100).
(2) Why does the output signal amp constantly decrease as khp -> sr/2?
Shouldn't the passband that is *not* filtered out output at 100% of the
input power?  (When sr = 10000 and noise with an amp of 10000 is filtered
with khp = 2500, the output signal is only 5000 rather than 10000).


Trevor Baca
tbaca@ccwf.cc.utexas.edu


Date1997-05-20 18:13
FromEli Brandt
SubjectRe: amplitude response of tone & atone (cont)
Trevor Baca wrote:
>        AMPLITUDE RESPONSE CURVE OF TONE
>        |
>        |
>        |
> ouput  |
> amp    |    /-------------\    <-------- just below input amp value (90-97%)
> values |   /               \
>        |  /                 \       N.B. the plateau isn't really flat;
>        | /                   \      the slope of the rise gradually decreases
>        |/                     \
>        -------------------------
>        0        sr/2          sr

First, don't bother trying to do anything above the Nyquist frequency, sr/2.

Ignoring the aliased half, this graph looks backwards.  Hmm, maybe
you're running noise through the filter and plotting cutoff on the x-axis?
(A conventional amplitude response curve is a plot of a fixed filter's
response to various sinusoids.)  If that's not it, I have no idea
what's going on. :-)

> (1) Why doesn't tone's passband allow the input signal to pass at 100%
> power?  (With a noise input of 10000, the maximum output signal amp is
> ~9700).

Even an analog filter doesn't really have a perfectly flat passband
right out to the cutoff, and this is a digital approximation.  If you
set Fc to 1kHz and run a 10-Hz sine, though, I bet you'll get pretty
near unity gain.

-- 
     Eli Brandt  |  eli+@cs.cmu.edu  |  http://www.cs.cmu.edu/~eli/