TrebleSettings class final

Configuration for the treble audio effect.

Boost or cut treble (upper) frequencies of the audio using a two-pole shelving filter with a response similar to that of a standard hi-fi's tone-controls. This is also known as shelving equalisation (EQ).

The filter accepts the following options:

Parameters:

  • a: Set transform type of IIR filter. (range 0..6, default DI)
  • b: Set block size used for reverse IIR processing. If this value is set to high enough value (higher than impulse response length truncated when reaches near zero values) filtering will become linear phase otherwise if not big enough it will just produce nasty artifacts. Note that filter delay will be exactly this many samples when set to non-zero value. (range 0..32768, default 0)
  • blocksize: set the block size (range 0..32768, default 0)
  • c: Specify which channels to filter, by default all available are filtered. (range 0..0, default "all", runtime-tunable)
  • channels: Specify which channels to filter, by default all available are filtered. (range 0..0, default "all", runtime-tunable)
  • f: Set the filter's central frequency and so can be used to extend or reduce the frequency range to be boosted or cut. The default value is 3000 Hz. (range 0..999999, default 3000, runtime-tunable)
  • frequency: Set the filter's central frequency and so can be used to extend or reduce the frequency range to be boosted or cut. The default value is 3000 Hz. (range 0..999999, default 3000, runtime-tunable)
  • g: Give the gain at whichever is the lower of ~22 kHz and the Nyquist frequency. Its useful range is about -20 (for a large cut) to +20 (for a large boost). Beware of clipping when using a positive gain. (range -900..900, default 0, runtime-tunable)
  • gain: Give the gain at whichever is the lower of ~22 kHz and the Nyquist frequency. Its useful range is about -20 (for a large cut) to +20 (for a large boost). Beware of clipping when using a positive gain. (range -900..900, default 0, runtime-tunable)
  • m: How much to use filtered signal in output. Default is 1. Range is between 0 and 1. (range 0..1, default 1, runtime-tunable)
  • mix: How much to use filtered signal in output. Default is 1. Range is between 0 and 1. (range 0..1, default 1, runtime-tunable)
  • n: Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB. (range 0..1, default 0, runtime-tunable)
  • normalize: Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB. (range 0..1, default 0, runtime-tunable)
  • p: Set number of poles. Default is 2. (range 1..2, default 2)
  • poles: Set number of poles. Default is 2. (range 1..2, default 2)
  • precision: Set precision of filtering. (range -1..3, default -1)
  • r: Set precision of filtering. (range -1..3, default -1)
  • t: Set method to specify band-width of filter. (range 1..5, default QFACTOR, runtime-tunable)
  • transform: Set transform type of IIR filter. (range 0..6, default DI)
  • w: Determine how steep is the filter's shelf transition. (range 0..99999, default 0.5, runtime-tunable)
  • width: Determine how steep is the filter's shelf transition. (range 0..99999, default 0.5, runtime-tunable)
  • width_type: Set method to specify band-width of filter. (range 1..5, default QFACTOR, runtime-tunable)

Constructors

TrebleSettings({bool enabled = false, TrebleTransformType a = TrebleTransformType.di, int b = 0, int blocksize = 0, String c = 'all', String channels = 'all', double f = 3000.0, double frequency = 3000.0, double g = 0.0, double gain = 0.0, double m = 1.0, double mix = 1.0, bool n = false, bool normalize = false, int p = 2, int poles = 2, TreblePrecision precision = TreblePrecision.auto, TreblePrecision r = TreblePrecision.auto, TrebleWidthType t = TrebleWidthType.q, TrebleTransformType transform = TrebleTransformType.di, double w = 0.5, double width = 0.5, TrebleWidthType width_type = TrebleWidthType.q})
Creates an TrebleSettings with the given parameter values.
const

Properties

a TrebleTransformType
set transform type
final
b int
set the block size
final
blocksize int
set the block size
final
c String
set channels to filter
final
channels String
set channels to filter
final
enabled bool
Whether this effect is inserted into the audio chain.
final
f double
set central frequency
final
frequency double
set central frequency
final
g double
set gain
final
gain double
set gain
final
hashCode int
The hash code for this object.
no setteroverride
m double
set mix
final
mix double
set mix
final
n bool
normalize coefficients
final
normalize bool
normalize coefficients
final
p int
set number of poles
final
poles int
set number of poles
final
precision TreblePrecision
set filtering precision
final
r TreblePrecision
set filtering precision
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
t TrebleWidthType
set filter-width type
final
transform TrebleTransformType
set transform type
final
w double
set width
final
width double
set width
final
width_type TrebleWidthType
set filter-width type
final

Methods

copyWith({bool? enabled, TrebleTransformType? a, int? b, int? blocksize, String? c, String? channels, double? f, double? frequency, double? g, double? gain, double? m, double? mix, bool? n, bool? normalize, int? p, int? poles, TreblePrecision? precision, TreblePrecision? r, TrebleWidthType? t, TrebleTransformType? transform, double? w, double? width, TrebleWidthType? width_type}) TrebleSettings
Returns a copy of this TrebleSettings with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toFilterString() String
Returns the audio chain entry for this effect. Only non-default parameters are emitted.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Constants

bDefault → const int
Default value for b.
blocksizeDefault → const int
Default value for blocksize.
blocksizeMax → const int
Maximum value for blocksize.
blocksizeMin → const int
Minimum value for blocksize.
bMax → const int
Maximum value for b.
bMin → const int
Minimum value for b.
fDefault → const double
Default value for f.
fMax → const double
Maximum value for f.
fMin → const double
Minimum value for f.
frequencyDefault → const double
Default value for frequency.
frequencyMax → const double
Maximum value for frequency.
frequencyMin → const double
Minimum value for frequency.
gainDefault → const double
Default value for gain.
gainMax → const double
Maximum value for gain.
gainMin → const double
Minimum value for gain.
gDefault → const double
Default value for g.
gMax → const double
Maximum value for g.
gMin → const double
Minimum value for g.
mDefault → const double
Default value for m.
mixDefault → const double
Default value for mix.
mixMax → const double
Maximum value for mix.
mixMin → const double
Minimum value for mix.
mMax → const double
Maximum value for m.
mMin → const double
Minimum value for m.
pDefault → const int
Default value for p.
pMax → const int
Maximum value for p.
pMin → const int
Minimum value for p.
polesDefault → const int
Default value for poles.
polesMax → const int
Maximum value for poles.
polesMin → const int
Minimum value for poles.
wDefault → const double
Default value for w.
widthDefault → const double
Default value for width.
widthMax → const double
Maximum value for width.
widthMin → const double
Minimum value for width.
wMax → const double
Maximum value for w.
wMin → const double
Minimum value for w.