FLOSS Manuals

 English |  Español |  Français |  Italiano |  Português |  Русский |  Shqip

CSOUND Español

FILTERS

Audio filters can range from devices that subtly shape the tonal characteristics of a sound to ones that dramatically remove whole portions of a sound spectrum to create new sounds. Csound includes several versions of each of the commonest types of filters and some more esoteric ones also. The full list of Csound's standard filters can be found here. A list of the more specialised filters can be found here.

Los filtros de audio pueden ir desde dispositivos que configuran sutilmente las características tonales de un sonido a los que eliminan dramáticamente porciones enteras de un espectro de sonido para crear nuevos sonidos. Csound incluye varias versiones de cada uno de los tipos más comunes de filtros y algunos más esotéricos también. La lista completa de filtros estándar Csounds se puede encontrar aquí. Aquí puede encontrar una lista de los filtros más especializados.

Lowpass Filters

Filtros de paso bajo

The first type of filter encountered is normally the lowpass filter. As its name suggests it allows lower frequencies to pass through unimpeded and therefore filters higher frequencies. The crossover frequency is normally referred to as the 'cutoff' frequency. Filters of this type do not really cut frequencies off at the cutoff point like a brick wall but instead attenuate increasingly according to a cutoff slope. Different filters offer cutoff slopes of different of steepness. Another aspect of a lowpass filter that we may be concerned with is a ripple that might emerge at the cutoff point. If this is exaggerated intentionally it is referred to as resonance or 'Q'.

El primer tipo de filtro encontrado es normalmente el filtro de paso bajo. Como su nombre sugiere, permite que las frecuencias más bajas pasen sin obstáculos y, por lo tanto, filtran frecuencias más altas. La frecuencia de cruce se conoce normalmente como la frecuencia de corte. Los filtros de este tipo realmente no cortan las frecuencias en el punto de corte como una pared de ladrillo, sino que se atenúan cada vez más según una pendiente de corte. Diferentes filtros ofrecen cutoff pendientes de diferentes de inclinación. Otro aspecto de un filtro de paso bajo que nos puede preocupar es una ondulación que podría surgir en el punto de corte. Si esto se exagera intencionalmente se lo denomina resonancia o Q.

 

 

In the following example, three lowpass filters filters are demonstrated: tone, butlp and moogladder. tone offers a quite gentle cutoff slope and therefore is better suited to subtle spectral enhancement tasks. butlp is based on the Butterworth filter design and produces a much sharper cutoff slope at the expense of a slightly greater CPU overhead. moogladder is an interpretation of an analogue filter found in a moog synthesizer – it includes a resonance control.

En el ejemplo siguiente, se muestran tres filtros de filtro de paso bajo: tone, butlp y moogladder. Tono ofrece una pendiente de corte bastante suave y por lo tanto es más adecuado para sutiles tareas de mejora espectral. Butlp se basa en el diseño del filtro Butterworth y produce una pendiente de corte mucho más nítida a expensas de una sobrecarga de CPU ligeramente mayor. Moogladder es una interpretación de un filtro analógico que se encuentra en un sintetizador moog - incluye un control de resonancia.

In the example a sawtooth waveform is played in turn through each filter. Each time the cutoff frequency is modulated using an envelope, starting high and descending low so that more and more of the spectral content of the sound is removed as the note progresses. A sawtooth waveform has been chosen as it contains strong higher frequencies and therefore demonstrates the filters characteristics well; a sine wave would be a poor choice of source sound on account of its lack of spectral richness.

En el ejemplo, una forma de onda de diente de sierra se reproduce a su vez a través de cada filtro. Cada vez que la frecuencia de corte se modula usando un sobre, comenzando alto y descendiendo bajo de manera que más y más del contenido espectral del sonido se elimina a medida que avanza la nota. Se ha elegido una forma de onda de diente de sierra, ya que contiene frecuencias fuertes más altas y por lo tanto demuestra bien las características de los filtros; Una onda sinusoidal sería una mala elección del sonido de la fuente debido a su falta de riqueza espectral.

   EXAMPLE 05C01_tone_butlp_moogladder.csd

 

<CsoundSynthesizer>

<CsOptions>
-odac ; activates real time sound output
</CsOptions>

<CsInstruments>
; Example by Iain McCurdy

sr = 44100
ksmps = 32
nchnls = 1
0dbfs = 1

  instr 1
        prints       "tone%n"    ; indicate filter type in console
aSig    vco2         0.5, 150    ; input signal is a sawtooth waveform
kcf     expon        10000,p3,20 ; descending cutoff frequency
aSig    tone         aSig, kcf   ; filter audio signal
        out          aSig        ; filtered audio sent to output
  endin

  instr 2
        prints       "butlp%n"   ; indicate filter type in console
aSig    vco2         0.5, 150    ; input signal is a sawtooth waveform
kcf     expon        10000,p3,20 ; descending cutoff frequency
aSig    butlp        aSig, kcf   ; filter audio signal
        out          aSig        ; filtered audio sent to output
  endin

  instr 3
        prints       "moogladder%n" ; indicate filter type in console
aSig    vco2         0.5, 150       ; input signal is a sawtooth waveform
kcf     expon        10000,p3,20    ; descending cutoff frequency
aSig    moogladder   aSig, kcf, 0.9 ; filter audio signal
        out          aSig           ; filtered audio sent to output
  endin

</CsInstruments>

<CsScore>
; 3 notes to demonstrate each filter in turn
i 1 0  3; tone
i 2 4  3; butlp
i 3 8  3; moogladder
e
</CsScore>

</CsoundSynthesizer>

Highpass Filters

Filtros de paso alto

A highpass filter is the converse of a lowpass filter; frequencies higher than the cutoff point are allowed to pass whilst those lower are attenuated. atone and buthp are the analogues of tone and butlp. Resonant highpass filters are harder to find but Csound has one in bqrez. bqrez is actually a multi-mode filter and could also be used as a resonant lowpass filter amongst other things. We can choose which mode we want by setting one of its input arguments appropriately. Resonant highpass is mode 1. In this example a sawtooth waveform is again played through each of the filters in turn but this time the cutoff frequency moves from low to high. Spectral content is increasingly removed but from the opposite spectral direction.

Un filtro de paso alto es el inverso de un filtro de paso bajo; Las frecuencias superiores al punto de corte se dejan pasar mientras que las inferiores se atenúan. Atone y buthp son los análogos del tono y del butlp. Resonant filtros de paso alto son más difíciles de encontrar, pero Csound tiene uno en bqrez. Bqrez es en realidad un filtro multi-modo y también podría ser utilizado como un filtro de paso bajo resonante, entre otras cosas. Podemos elegir el modo que deseamos estableciendo apropiadamente uno de sus argumentos de entrada. El paso alto resonante es el modo 1. En este ejemplo, una forma de onda de diente de sierra se reproduce de nuevo a través de cada uno de los filtros a su vez, pero esta vez la frecuencia de corte se mueve de baja a alta. El contenido espectral se elimina cada vez más, pero desde la dirección espectral opuesta.

   EXAMPLE 05C02_atone_buthp_bqrez.csd

<CsoundSynthesizer>

<CsOptions>
-odac ; activates real time sound output
</CsOptions>

<CsInstruments>
; Example by Iain McCurdy

sr = 44100
ksmps = 32
nchnls = 1
0dbfs = 1

  instr 1
        prints       "atone%n"     ; indicate filter type in console
aSig    vco2         0.2, 150      ; input signal is a sawtooth waveform
kcf     expon        20, p3, 20000 ; define envelope for cutoff frequency
aSig    atone        aSig, kcf     ; filter audio signal
        out          aSig          ; filtered audio sent to output
  endin

  instr 2
        prints       "buthp%n"     ; indicate filter type in console
aSig    vco2         0.2, 150      ; input signal is a sawtooth waveform
kcf     expon        20, p3, 20000 ; define envelope for cutoff frequency
aSig    buthp        aSig, kcf     ; filter audio signal
        out          aSig          ; filtered audio sent to output
  endin

  instr 3
        prints       "bqrez(mode:1)%n" ; indicate filter type in console
aSig    vco2         0.03, 150         ; input signal is a sawtooth waveform
kcf     expon        20, p3, 20000     ; define envelope for cutoff frequency
aSig    bqrez        aSig, kcf, 30, 1  ; filter audio signal
        out          aSig              ; filtered audio sent to output
  endin

</CsInstruments>

<CsScore>
; 3 notes to demonstrate each filter in turn
i 1 0  3 ; atone
i 2 5  3 ; buthp
i 3 10 3 ; bqrez(mode 1)
e
</CsScore>

</CsoundSynthesizer>

Bandpass Filters

Filtros de paso de banda

A bandpass filter allows just a narrow band of sound to pass through unimpeded and as such is a little bit like a combination of a lowpass and highpass filter connected in series. We normally expect at least one additional parameter of control: control over the width of the band of frequencies allowed to pass through, or 'bandwidth'.

Un filtro de paso de banda permite que sólo una banda estrecha de sonido para pasar a través sin obstáculos y, como tal, es un poco como una combinación de un paso bajo y filtro de paso alto conectado en serie. Normalmente esperamos al menos un parámetro adicional de control: control sobre el ancho de la banda de frecuencias permitidas a través de, o ancho de banda.

In the next example cutoff frequency and bandwidth are demonstrated independently for two different bandpass filters offered by Csound. First of all a sawtooth waveform is passed through a reson filter and a butbp filter in turn while the cutoff frequency rises (bandwidth remains static). Then pink noise is passed through reson and butbp in turn again but this time the cutoff frequency remains static at 5000Hz while the bandwidth expands from 8 to 5000Hz. In the latter two notes it will be heard how the resultant sound moves from almost a pure sine tone to unpitched noise. butbp is obviously the Butterworth based bandpass filter. reson can produce dramatic variations in amplitude depending on the bandwidth value and therefore some balancing of amplitude in the output signal may be necessary if out of range samples and distortion are to be avoided. Fortunately the opcode itself includes two modes of amplitude balancing built in but by default neither of these methods are active and in this case the use of the balance opcode may be required. Mode 1 seems to work well with spectrally sparse sounds like harmonic tones while mode 2 works well with spectrally dense sounds such as white or pink noise.

En el ejemplo siguiente la frecuencia de corte y el ancho de banda se demuestran independientemente para dos filtros de paso de banda diferentes ofrecidos por Csound. En primer lugar, se pasa una forma de onda de diente de sierra a través de un filtro reson y un filtro butbp a su vez mientras aumenta la frecuencia de corte (el ancho de banda permanece estático). A continuación, el ruido rosa se pasa a través de reson y butbp a su vez, pero esta vez la frecuencia de corte permanece estática a 5000Hz mientras que el ancho de banda se expande de 8 a 5000Hz. En las dos últimas notas se oirá cómo el sonido resultante se mueve desde casi un tono seno puro hasta un ruido sin ruido. Butbp es, obviamente, el filtro de paso de banda basado en Butterworth. Reson puede producir variaciones espectaculares de amplitud dependiendo del valor de ancho de banda y por lo tanto puede ser necesario un cierto equilibrio de amplitud en la señal de salida si se deben evitar muestras fuera de rango y distorsión. Afortunadamente, el código de operación en sí incluye dos modos de balanceo de amplitud incorporados pero por defecto ninguno de estos métodos está activo y en este caso puede ser necesario el uso del código de operación de balance. El modo 1 parece funcionar bien con sonidos espectralmente dispersos como tonos armónicos mientras que el modo 2 funciona bien con sonidos espectralmente densos como el ruido blanco o rosado.

   EXAMPLE 05C03_reson_butbp.csd

<CsoundSynthesizer>

<CsOptions>
-odac ; activates real time sound output
</CsOptions>

<CsInstruments>
; Example by Iain McCurdy

sr = 44100
ksmps = 32
nchnls = 1
0dbfs = 1

  instr 1
        prints       "reson%n"          ; indicate filter type in console
aSig    vco2         0.5, 150           ; input signal: sawtooth waveform
kcf     expon        20,p3,10000        ; rising cutoff frequency
aSig    reson        aSig,kcf,kcf*0.1,1 ; filter audio signal
        out          aSig               ; send filtered audio to output
  endin

  instr 2
        prints       "butbp%n"          ; indicate filter type in console
aSig    vco2         0.5, 150           ; input signal: sawtooth waveform
kcf     expon        20,p3,10000        ; rising cutoff frequency
aSig    butbp        aSig, kcf, kcf*0.1 ; filter audio signal
        out          aSig               ; send filtered audio to output
  endin

  instr 3
        prints       "reson%n"          ; indicate filter type in console
aSig    pinkish      0.5                ; input signal: pink noise
kbw     expon        10000,p3,8         ; contracting bandwidth
aSig    reson        aSig, 5000, kbw, 2 ; filter audio signal
        out          aSig               ; send filtered audio to output
  endin

  instr 4
        prints       "butbp%n"          ; indicate filter type in console
aSig    pinkish      0.5                ; input signal: pink noise
kbw     expon        10000,p3,8         ; contracting bandwidth
aSig    butbp        aSig, 5000, kbw    ; filter audio signal
        out          aSig               ; send filtered audio to output
  endin

</CsInstruments>

<CsScore>
i 1 0  3 ; reson - cutoff frequency rising
i 2 4  3 ; butbp - cutoff frequency rising
i 3 8  6 ; reson - bandwidth increasing
i 4 15 6 ; butbp - bandwidth increasing
e
</CsScore>

</CsoundSynthesizer>

Comb Filtering

Filtrado de peine

A comb filter is a special type of filter that creates a harmonically related stack of resonance peaks on an input sound file. A comb filter is really just a very short delay effect with feedback. Typically the delay times involved would be less than 0.05 seconds. Many of the comb filters documented in the Csound Manual term this delay time, 'loop time'. The fundamental of the harmonic stack of resonances produced will be 1/loop time. Loop time and the frequencies of the resonance peaks will be inversely proportional – as loop time gets smaller, the frequencies rise. For a loop time of 0.02 seconds, the fundamental resonance peak will be 50Hz, the next peak 100Hz, the next 150Hz and so on. Feedback is normally implemented as reverb time – the time taken for amplitude to drop to 1/1000 of its original level or by 60dB. This use of reverb time as opposed to feedback alludes to the use of comb filters in the design of reverb algorithms. Negative reverb times will result in only the odd numbered partials of the harmonic stack being present.

Un filtro de peine es un tipo especial de filtro que crea una pila relacionada armónicamente de picos de resonancia en un archivo de sonido de entrada. Un filtro de peine es realmente sólo un efecto de retardo muy corto con retroalimentación. Típicamente, los tiempos de retardo implicados serían inferiores a 0,05 segundos. Muchos de los filtros de peine documentados en el manual del Csound denominan este tiempo de retardo, tiempo de bucle. El fundamento de la pila armónica de resonancias producidas será 1 / tiempo de bucle. El tiempo de bucle y las frecuencias de los picos de resonancia serán inversamente proporcionales - a medida que el tiempo del bucle se hace más pequeño, las frecuencias aumentan. Para un tiempo de bucle de 0,02 segundos, el pico de resonancia fundamental será de 50 Hz, el próximo pico de 100 Hz, el siguiente de 150 Hz y así sucesivamente. La retroalimentación se implementa normalmente como tiempo de reverberación - el tiempo necesario para que la amplitud descienda a 1/1000 de su nivel original o por 60dB. Este uso del tiempo de reverberación en contraposición a la retroalimentación alude al uso de filtros de peine en el diseño de algoritmos de reverberación. Los tiempos de reverberación negativos darán lugar a que sólo estén presentes los parciales impares de la pila de armónicos.

The following example demonstrates a comb filter using the vcomb opcode. This opcode allows for performance time modulation of the loop time parameter. For the first 5 seconds of the demonstration the reverb time increases from 0.1 seconds to 2 while the loop time remains constant at 0.005 seconds. Then the loop time decreases to 0.0005 seconds over 6 seconds (the resonant peaks rise in frequency), finally over the course of 10 seconds the loop time rises to 0.1 seconds (the resonant peaks fall in frequency). A repeating noise impulse is used as a source sound to best demonstrate the qualities of a comb filter.

En el ejemplo siguiente se muestra un filtro de peine usando el código de operación vcomb. Este código de operación permite la modulación del tiempo de ejecución del parámetro de tiempo de bucle. Durante los primeros 5 segundos de la demostración el tiempo de reverberación aumenta de 0,1 segundos a 2 mientras que el tiempo de bucle permanece constante en 0,005 segundos. Entonces el tiempo de bucle disminuye a 0,0005 segundos durante 6 segundos (los picos resonantes aumentan en frecuencia), finalmente en el transcurso de 10 segundos el tiempo de bucle aumenta a 0,1 segundos (los picos resonantes caen en frecuencia). Se utiliza un impulso de ruido repetitivo como sonido de fuente para demostrar mejor las cualidades de un filtro de peine.

   EXAMPLE 05C04_comb.csd

<CsoundSynthesizer>

<CsOptions>
-odac ;activates real time sound output
</CsOptions>

<CsInstruments>
;Example by Iain McCurdy

sr = 44100
ksmps = 32
nchnls = 1
0dbfs = 1

  instr 1
; -- generate an input audio signal (noise impulses) --
; repeating amplitude envelope:
kEnv         loopseg   1,0, 0,1,0.005,1,0.0001,0,0.9949,0
aSig         pinkish   kEnv*0.6                     ; pink noise pulses

; apply comb filter to input signal
krvt    linseg  0.1, 5, 2                           ; reverb time
alpt    expseg  0.005,5,0.005,6,0.0005,10,0.1,1,0.1 ; loop time
aRes    vcomb   aSig, krvt, alpt, 0.1               ; comb filter
        out     aRes                                ; audio to output
  endin

</CsInstruments>

<CsScore>
i 1 0 25
e
</CsScore>

</CsoundSynthesizer>

Other Filters Worth Investigating

Otros Filtros que Vale la pena Investigar

In addition to a wealth of low and highpass filters, Csound offers several more unique filters. Multimode such as bqrez provide several different filter types within a single opcode. Filter type is normally chosen using an i-rate input argument that functions like a switch. Another multimode filter, clfilt, offers additional filter controls such as 'filter design' and 'number of poles' to create unusual sound filters. unfortunately some parts of this opcode are not implemented yet.

Además de una gran cantidad de filtros de paso bajo y alto, Csound ofrece varios filtros más únicos. Multimode como bqrez proporcionan varios tipos de filtros diferentes dentro de un solo opcode. El tipo de filtro se elige normalmente utilizando un argumento de entrada i-rate que funciona como un conmutador. Otro filtro multimodo, clfilt, ofrece controles de filtro adicionales como el diseño del filtro y el número de polos para crear filtros de sonido inusuales. Desafortunadamente algunas partes de este código de operación todavía no están implementadas.

 

eqfil is essentially a parametric equaliser but multiple iterations could be used as modules in a graphic equaliser bank. In addition to the capabilities of eqfil, pareq adds the possibility of creating low and high shelving filtering which might prove useful in mastering or in spectral adjustment of more developed sounds.

Eqfil es esencialmente un ecualizador paramétrico pero iteraciones múltiples podrían ser utilizadas como módulos en un banco de ecualizador gráfico. Además de las capacidades de eqfil, pareq añade la posibilidad de crear filtros de estanterías bajas y altas que podrían resultar útiles en el mastering o en el ajuste espectral de sonidos más desarrollados.

rbjeq offers a quite comprehensive multimode filter including highpass, lowpass, bandpass, bandreject, peaking, low-shelving and high-shelving, all in a single opcode

Rbjeq ofrece un filtro multimodo muy completo, incluyendo highpass, lowpass, bandpass, bandreject, peaking, shelving y shelving, todo en un solo opcode

statevar offers the outputs from four filter types - highpass, lowpass, bandpass and bandreject - simultaneously so that the user can morph between them smoothly. svfilter does a similar thing but with just highpass, lowpass and bandpass filter types.

Statevar ofrece las salidas de cuatro tipos de filtro - paso alto, paso bajo, paso de banda y bandreject - simultáneamente para que el usuario pueda moverse entre ellos suavemente. Svfilter hace algo similar pero con sólo los tipos de filtro de paso alto, paso bajo y filtro de paso de banda.

phaser1 and phaser2 offer algorithms containing chains of first order and second order allpass filters respectively. These algorithms could conceivably be built from individual allpass filters, but these ready-made versions provide convenience and added efficiency.

Phaser1 y phaser2 ofrecen algoritmos que contienen cadenas de primer orden y filtros de paso de segundo orden respectivamente. Estos algoritmos podrían ser construidos a partir de todos los filtros de paso, pero estas versiones ya hechas proporcionan comodidad y mayor eficiencia.

hilbert is a specialist IIR filter that implements the Hilbert transformer.

Hilbert es un filtro IIR especialista que implementa el transformador Hilbert.

hilbert is a specialist IIR filter that implements the Hilbert transformer.

Hilbert es un filtro IIR especialista que implementa el transformador Hilbert.

There has been error in communication with Booktype server. Not sure right now where is the problem.

You should refresh this page.