pvsbandr

pvsbandr — A band reject filter working in the spectral domain.

Description

Filter the pvoc frames, rejecting bins whose frequency is within a band, and with linear interpolation for transitional bands.

Syntax

fsig pvsbandr fsigin, xlowcut,
    xlowfull, xhighfull, xhighcut[, ktype]

Performance

fsig -- output pv stream

fsigin -- input pv stream.

xlowcut, xlowfull, xhighfull, xhighcut -- define a trapezium shape for the band that is rejected. The a-rate versions only apply to the sliding case.

ktype -- specifies the shape of the transitional band. If at the default value of zero the shape is as below, with linear transition in amplitude. Other values give an exponential curve


(1 - exp( r*type )) / (1 - exp(type))
      

This includes a linear dB shape when ktype is log(10) or about 2.30.

The opcode performs a band-reject filter with a spectral envelope shaped like


        klowcut                       khighcut
________                                      ______________
        \                                    /
         \                                  /
          \                                /
           \                              /  
            \                            /    
     klowfull\__________________________/ khighfull

Examples

Example 348. Example

asig  in                                 ; get the signal in

fsig  pvsanal   asig, 1024, 256, 1024, 1 ; analyse it
ftps  pvsbandr  fsig, 200, 400, 1000, 2000 ; filter 300-1500Hz
atps  pvsynth   ftps                     ; synthesise it
        


Credits

Author: John ffitch
December 2007