LMMS
Loading...
Searching...
No Matches
juce_FilterDesign.h
Go to the documentation of this file.
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 By using JUCE, you agree to the terms of both the JUCE 7 End-User License
11 Agreement and JUCE Privacy Policy.
12
13 End User License Agreement: www.juce.com/juce-7-licence
14 Privacy Policy: www.juce.com/juce-privacy-policy
15
16 Or: You may also use this code under the terms of the GPL v3 (see
17 www.gnu.org/licenses).
18
19 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
20 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
21 DISCLAIMED.
22
23 ==============================================================================
24*/
25
26namespace juce
27{
28namespace dsp
29{
30
40template <typename FloatType>
42{
45
47
48 //==============================================================================
67
68 static FIRCoefficientsPtr designFIRLowpassWindowMethod (FloatType frequency, double sampleRate,
69 size_t order, WindowingMethod type,
70 FloatType beta = static_cast<FloatType> (2));
71
85
86 static FIRCoefficientsPtr designFIRLowpassKaiserMethod (FloatType frequency, double sampleRate,
87 FloatType normalisedTransitionWidth,
88 FloatType amplitudedB);
89
90
105 static FIRCoefficientsPtr designFIRLowpassTransitionMethod (FloatType frequency, double sampleRate,
106 size_t order,
107 FloatType normalisedTransitionWidth,
108 FloatType spline);
109
125 static FIRCoefficientsPtr designFIRLowpassLeastSquaresMethod (FloatType frequency, double sampleRate, size_t order,
126 FloatType normalisedTransitionWidth,
127 FloatType stopBandWeight);
128
141 static FIRCoefficientsPtr designFIRLowpassHalfBandEquirippleMethod (FloatType normalisedTransitionWidth,
142 FloatType amplitudedB);
143
144 //==============================================================================
159
160 static ReferenceCountedArray<IIRCoefficients> designIIRLowpassHighOrderButterworthMethod (FloatType frequency, double sampleRate,
161 FloatType normalisedTransitionWidth,
162 FloatType passbandAmplitudedB,
163 FloatType stopbandAmplitudedB);
164
165 //==============================================================================
175
176 static ReferenceCountedArray<IIRCoefficients> designIIRLowpassHighOrderButterworthMethod (FloatType frequency, double sampleRate,
177 int order);
178
188
189 static ReferenceCountedArray<IIRCoefficients> designIIRHighpassHighOrderButterworthMethod (FloatType frequency, double sampleRate,
190 int order);
191
206 static ReferenceCountedArray<IIRCoefficients> designIIRLowpassHighOrderChebyshev1Method (FloatType frequency, double sampleRate,
207 FloatType normalisedTransitionWidth,
208 FloatType passbandAmplitudedB,
209 FloatType stopbandAmplitudedB);
210
225 static ReferenceCountedArray<IIRCoefficients> designIIRLowpassHighOrderChebyshev2Method (FloatType frequency, double sampleRate,
226 FloatType normalisedTransitionWidth,
227 FloatType passbandAmplitudedB,
228 FloatType stopbandAmplitudedB);
229
244 static ReferenceCountedArray<IIRCoefficients> designIIRLowpassHighOrderEllipticMethod (FloatType frequency, double sampleRate,
245 FloatType normalisedTransitionWidth,
246 FloatType passbandAmplitudedB,
247 FloatType stopbandAmplitudedB);
248
263
284 static IIRPolyphaseAllpassStructure designIIRLowpassHalfBandPolyphaseAllpassMethod (FloatType normalisedTransitionWidth,
285 FloatType stopbandAmplitudedB);
286
287private:
288 //==============================================================================
289 static Array<double> getPartialImpulseResponseHn (int n, double kp);
290
291 static ReferenceCountedArray<IIRCoefficients> designIIRLowpassHighOrderGeneralMethod (int type, FloatType frequency, double sampleRate,
292 FloatType normalisedTransitionWidth,
293 FloatType passbandAmplitudedB,
294 FloatType stopbandAmplitudedB);
295 FilterDesign() = delete;
296};
297
298} // namespace dsp
299} // namespace juce
CAdPlugDatabase::CRecord::RecordType type
Definition adplugdb.cpp:93
Definition juce_Array.h:56
Definition juce_ReferenceCountedArray.h:51
WindowingMethod
Definition juce_Windowing.h:48
Definition juce_AudioBlock.h:29
Definition carla_juce.cpp:31
ReferenceCountedObjectPtr< Coefficients > Ptr
Definition juce_FIRFilter.h:238
Array< double > alpha
Definition juce_FilterDesign.h:261
ReferenceCountedArray< IIRCoefficients > directPath
Definition juce_FilterDesign.h:260
ReferenceCountedArray< IIRCoefficients > delayedPath
Definition juce_FilterDesign.h:260
static ReferenceCountedArray< IIRCoefficients > designIIRLowpassHighOrderButterworthMethod(FloatType frequency, double sampleRate, FloatType normalisedTransitionWidth, FloatType passbandAmplitudedB, FloatType stopbandAmplitudedB)
Definition juce_FilterDesign.cpp:340
static FIRCoefficientsPtr designFIRLowpassLeastSquaresMethod(FloatType frequency, double sampleRate, size_t order, FloatType normalisedTransitionWidth, FloatType stopBandWeight)
Definition juce_FilterDesign.cpp:128
typename IIR::Coefficients< FloatType > IIRCoefficients
Definition juce_FilterDesign.h:44
static FIRCoefficientsPtr designFIRLowpassKaiserMethod(FloatType frequency, double sampleRate, FloatType normalisedTransitionWidth, FloatType amplitudedB)
Definition juce_FilterDesign.cpp:67
typename WindowingFunction< FloatType >::WindowingMethod WindowingMethod
Definition juce_FilterDesign.h:46
static Array< double > getPartialImpulseResponseHn(int n, double kp)
Definition juce_FilterDesign.cpp:296
typename FIR::Coefficients< FloatType >::Ptr FIRCoefficientsPtr
Definition juce_FilterDesign.h:43
static IIRPolyphaseAllpassStructure designIIRLowpassHalfBandPolyphaseAllpassMethod(FloatType normalisedTransitionWidth, FloatType stopbandAmplitudedB)
Definition juce_FilterDesign.cpp:615
static ReferenceCountedArray< IIRCoefficients > designIIRLowpassHighOrderChebyshev1Method(FloatType frequency, double sampleRate, FloatType normalisedTransitionWidth, FloatType passbandAmplitudedB, FloatType stopbandAmplitudedB)
Definition juce_FilterDesign.cpp:351
static ReferenceCountedArray< IIRCoefficients > designIIRLowpassHighOrderGeneralMethod(int type, FloatType frequency, double sampleRate, FloatType normalisedTransitionWidth, FloatType passbandAmplitudedB, FloatType stopbandAmplitudedB)
Definition juce_FilterDesign.cpp:384
static ReferenceCountedArray< IIRCoefficients > designIIRHighpassHighOrderButterworthMethod(FloatType frequency, double sampleRate, int order)
Definition juce_FilterDesign.cpp:580
static FIRCoefficientsPtr designFIRLowpassTransitionMethod(FloatType frequency, double sampleRate, size_t order, FloatType normalisedTransitionWidth, FloatType spline)
Definition juce_FilterDesign.cpp:95
static ReferenceCountedArray< IIRCoefficients > designIIRLowpassHighOrderChebyshev2Method(FloatType frequency, double sampleRate, FloatType normalisedTransitionWidth, FloatType passbandAmplitudedB, FloatType stopbandAmplitudedB)
Definition juce_FilterDesign.cpp:362
static ReferenceCountedArray< IIRCoefficients > designIIRLowpassHighOrderEllipticMethod(FloatType frequency, double sampleRate, FloatType normalisedTransitionWidth, FloatType passbandAmplitudedB, FloatType stopbandAmplitudedB)
Definition juce_FilterDesign.cpp:373
static FIRCoefficientsPtr designFIRLowpassHalfBandEquirippleMethod(FloatType normalisedTransitionWidth, FloatType amplitudedB)
Definition juce_FilterDesign.cpp:238
static FIRCoefficientsPtr designFIRLowpassWindowMethod(FloatType frequency, double sampleRate, size_t order, WindowingMethod type, FloatType beta=static_cast< FloatType >(2))
Definition juce_FilterDesign.cpp:33
Definition juce_IIRFilter.h:129
int n
Definition crypt.c:458