Skip to content

Commit

Permalink
Update filter docs
Browse files Browse the repository at this point in the history
  • Loading branch information
iver56 committed Sep 30, 2024
1 parent 0f4986b commit 804e094
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 35 deletions.
4 changes: 2 additions & 2 deletions audiomentations/augmentations/band_pass_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ def __init__(
:param max_rolloff: Maximum filter roll-off (in dB/octave)
Must be a multiple of 6
:param zero_phase: Whether filtering should be zero phase.
When this is set to `True` it will not affect the phase of the
When this is set to `True`, it will not affect the phase of the
input signal but will sound 3 dB lower at the cutoff frequency
compared to the non-zero phase case (6 dB vs 3 dB). Additionally,
it is 2 times slower than in the non-zero phase case. If you
it is twice as slow as the non-zero phase case. If you
absolutely want no phase distortions (e.g. want to augment an
audio file with lots of transients, like a drum track), set
this to `True`.
Expand Down
6 changes: 3 additions & 3 deletions audiomentations/augmentations/band_stop_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ def __init__(
:param max_rolloff: Maximum filter roll-off (in dB/octave)
Must be a multiple of 6
:param zero_phase: Whether filtering should be zero phase.
When this is set to `true` it will not affect the phase of the
When this is set to `True`, it will not affect the phase of the
input signal but will sound 3 dB lower at the cutoff frequency
compared to the non-zero phase case (6 dB vs 3 dB). Additionally,
it is 2 times slower than in the non-zero phase case. If you
it is twice as slow as the non-zero phase case. If you
absolutely want no phase distortions (e.g. want to augment a
drum track), set this to `true`.
drum track), set this to `True`.
:param p: The probability of applying this transform
"""
super().__init__(
Expand Down
6 changes: 3 additions & 3 deletions audiomentations/augmentations/high_pass_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ def __init__(
:param max_rolloff: Maximum filter roll-off (in dB/octave)
Must be a multiple of 6
:param zero_phase: Whether filtering should be zero phase.
When this is set to `true` it will not affect the phase of the
When this is set to `True`, it will not affect the phase of the
input signal but will sound 3 dB lower at the cutoff frequency
compared to the non-zero phase case (6 dB vs. 3 dB). Additionally,
it is 2 times slower than in the non-zero phase case. If you
it is twice as slow as the non-zero phase case. If you
absolutely want no phase distortions (e.g. want to augment a
drum track), set this to `true`.
drum track), set this to `True`.
:param p: The probability of applying this transform
"""
super().__init__(
Expand Down
6 changes: 3 additions & 3 deletions audiomentations/augmentations/low_pass_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ def __init__(
:param max_rolloff: Maximum filter roll-off (in dB/octave)
Must be a multiple of 6
:param zero_phase: Whether filtering should be zero phase.
When this is set to `true` it will not affect the phase of the
When this is set to `True`, it will not affect the phase of the
input signal but will sound 3 dB lower at the cutoff frequency
compared to the non-zero phase case (6 dB vs. 3 dB). Additionally,
it is 2 times slower than in the non-zero phase case. If you
it is twice as slow as the non-zero phase case. If you
absolutely want no phase distortions (e.g. want to augment a
drum track), set this to `true`.
drum track), set this to `True`.
:param p: The probability of applying this transform
"""
super().__init__(
Expand Down
12 changes: 6 additions & 6 deletions docs/waveform_transforms/band_pass_filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@ augmented_sound = transform(my_waveform_ndarray, sample_rate=48000)
[`max_bandwidth_fraction`](#max_bandwidth_fraction){ #max_bandwidth_fraction }: `float` • range: [0.0, 2.0]
: :octicons-milestone-24: Default: `1.99`. Maximum bandwidth relative to center frequency

[`min_rolloff`](#min_rolloff){ #min_rolloff }: `float` • unit: Decibels/octave
[`min_rolloff`](#min_rolloff){ #min_rolloff }: `int` • unit: Decibels/octave
: :octicons-milestone-24: Default: `12`. Minimum filter roll-off (in dB/octave).
Must be a multiple of 6
Must be a multiple of 6 (or 12 if `zero_phase` is `True`)

[`max_rolloff`](#max_rolloff){ #max_rolloff }: `float` • unit: Decibels/octave
[`max_rolloff`](#max_rolloff){ #max_rolloff }: `int` • unit: Decibels/octave
: :octicons-milestone-24: Default: `24`. Maximum filter roll-off (in dB/octave)
Must be a multiple of 6
Must be a multiple of 6 (or 12 if `zero_phase` is `True`)

[`zero_phase`](#zero_phase){ #zero_phase }: `bool`
: :octicons-milestone-24: Default: `False`. Whether filtering should be zero phase.
When this is set to `True` it will not affect the phase of the input signal but will
When this is set to `True`, it will not affect the phase of the input signal but will
sound 3 dB lower at the cutoff frequency compared to the non-zero phase case (6 dB
vs. 3 dB). Additionally, it is 2 times slower than in the non-zero phase case. If
vs. 3 dB). Additionally, it is twice as slow as the non-zero phase case. If
you absolutely want no phase distortions (e.g. want to augment an audio file with
lots of transients, like a drum track), set this to `True`.

Expand Down
16 changes: 8 additions & 8 deletions docs/waveform_transforms/band_stop_filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,24 @@ can hear that the timbre is different in the transformed sound than in the origi
: :octicons-milestone-24: Default: `4000.0`. Maximum center frequency in hertz

[`min_bandwidth_fraction`](#min_bandwidth_fraction){ #min_bandwidth_fraction }: `float`
: :octicons-milestone-24: Default: `0.5`. Minimum bandwidth relative to center frequency
: :octicons-milestone-24: Default: `0.5`. Minimum bandwidth fraction relative to center frequency

[`max_bandwidth_fraction`](#max_bandwidth_fraction){ #max_bandwidth_fraction }: `float`
: :octicons-milestone-24: Default: `1.99`. Maximum bandwidth relative to center frequency
: :octicons-milestone-24: Default: `1.99`. Maximum bandwidth fraction relative to center frequency

[`min_rolloff`](#min_rolloff){ #min_rolloff }: `float` • unit: Decibels/octave
[`min_rolloff`](#min_rolloff){ #min_rolloff }: `int` • unit: Decibels/octave
: :octicons-milestone-24: Default: `12`. Minimum filter roll-off (in dB/octave).
Must be a multiple of 6
Must be a multiple of 6 (or 12 if `zero_phase` is `True`)

[`max_rolloff`](#max_rolloff){ #max_rolloff }: `float` • unit: Decibels/octave
[`max_rolloff`](#max_rolloff){ #max_rolloff }: `int` • unit: Decibels/octave
: :octicons-milestone-24: Default: `24`. Maximum filter roll-off (in dB/octave)
Must be a multiple of 6
Must be a multiple of 6 (or 12 if `zero_phase` is `True`)

[`zero_phase`](#zero_phase){ #zero_phase }: `bool`
: :octicons-milestone-24: Default: `False`. Whether filtering should be zero phase.
When this is set to `True` it will not affect the phase of the input signal but will
When this is set to `True`, it will not affect the phase of the input signal but will
sound 3 dB lower at the cutoff frequency compared to the non-zero phase case (6 dB
vs. 3 dB). Additionally, it is 2 times slower than in the non-zero phase case. If
vs. 3 dB). Additionally, it is twice as slow as the non-zero phase case. If
you absolutely want no phase distortions (e.g. want to augment an audio file with
lots of transients, like a drum track), set this to `True`.

Expand Down
8 changes: 4 additions & 4 deletions docs/waveform_transforms/high_pass_filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ Can also be set for zero-phase filtering (will result in a 6 dB drop at cutoff).

[`min_rolloff`](#min_rolloff){ #min_rolloff }: `float` • unit: Decibels/octave
: :octicons-milestone-24: Default: `12`. Minimum filter roll-off (in dB/octave).
Must be a multiple of 6
Must be a multiple of 6 (or 12 if `zero_phase` is `True`)

[`max_rolloff`](#max_rolloff){ #max_rolloff }: `float` • unit: Decibels/octave
: :octicons-milestone-24: Default: `24`. Maximum filter roll-off (in dB/octave).
Must be a multiple of 6
Must be a multiple of 6 (or 12 if `zero_phase` is `True`)

[`zero_phase`](#zero_phase){ #zero_phase }: `bool`
: :octicons-milestone-24: Default: `False`. Whether filtering should be zero phase.
When this is set to `True` it will not affect the phase of the input signal but will
When this is set to `True`, it will not affect the phase of the input signal but will
sound 3 dB lower at the cutoff frequency compared to the non-zero phase case (6 dB
vs. 3 dB). Additionally, it is 2 times slower than in the non-zero phase case. If
vs. 3 dB). Additionally, it is twice as slow as the non-zero phase case. If
you absolutely want no phase distortions (e.g. want to augment an audio file with
lots of transients, like a drum track), set this to `True`.

Expand Down
12 changes: 6 additions & 6 deletions docs/waveform_transforms/low_pass_filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ Can also be set for zero-phase filtering (will result in a 6 dB drop at cutoff).
[`max_cutoff_freq`](#max_cutoff_freq){ #max_cutoff_freq }: `float` • unit: hertz
: :octicons-milestone-24: Default: `7500.0`. Maximum cutoff frequency

[`min_rolloff`](#min_rolloff){ #min_rolloff }: `float` • unit: Decibels/octave
[`min_rolloff`](#min_rolloff){ #min_rolloff }: `int` • unit: Decibels/octave
: :octicons-milestone-24: Default: `12`. Minimum filter roll-off (in dB/octave).
Must be a multiple of 6
Must be a multiple of 6 (or 12 if `zero_phase` is `True`)

[`max_rolloff`](#max_rolloff){ #max_rolloff }: `float` • unit: Decibels/octave
[`max_rolloff`](#max_rolloff){ #max_rolloff }: `int` • unit: Decibels/octave
: :octicons-milestone-24: Default: `24`. Maximum filter roll-off (in dB/octave)
Must be a multiple of 6
Must be a multiple of 6 (or 12 if `zero_phase` is `True`)

[`zero_phase`](#zero_phase){ #zero_phase }: `bool`
: :octicons-milestone-24: Default: `False`. Whether filtering should be zero phase.
When this is set to `True` it will not affect the phase of the input signal but will
When this is set to `True`, it will not affect the phase of the input signal but will
sound 3 dB lower at the cutoff frequency compared to the non-zero phase case (6 dB
vs. 3 dB). Additionally, it is 2 times slower than in the non-zero phase case. If
vs. 3 dB). Additionally, it is twice as slow as the non-zero phase case. If
you absolutely want no phase distortions (e.g. want to augment an audio file with
lots of transients, like a drum track), set this to `True`.

Expand Down

0 comments on commit 804e094

Please sign in to comment.