3 |
* LinuxSampler - modular, streaming capable sampler * |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
* * |
5 |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
6 |
|
* Copyright (C) 2005 Christian Schoenebeck * |
7 |
* * |
* * |
8 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
9 |
* it under the terms of the GNU General Public License as published by * |
* it under the terms of the GNU General Public License as published by * |
26 |
|
|
27 |
#include "../../common/global.h" |
#include "../../common/global.h" |
28 |
|
|
29 |
#if DEBUG_HEADERS |
#include <gig.h> |
|
# warning Filter.h included |
|
|
#endif // DEBUG_HEADERS |
|
30 |
|
|
31 |
#include "../common/BiquadFilter.h" |
#include "../common/BiquadFilter.h" |
32 |
|
|
33 |
// TODO: Gigasampler's "Turbo Lowpass" and "Bandreject" filters not implemented yet |
// TODO: Gigasampler's "Turbo Lowpass" and "Bandreject" filters not implemented yet |
34 |
|
|
|
#include "../../lib/fileloader/libgig/gig.h" |
|
|
|
|
35 |
#define LSF_BW 0.9 |
#define LSF_BW 0.9 |
36 |
#define LSF_FB 0.9f |
#define LSF_FB 0.9f |
37 |
|
|
70 |
pFilter = &HPFilter; |
pFilter = &HPFilter; |
71 |
break; |
break; |
72 |
case ::gig::vcf_type_bandreject: //TODO: not implemented yet |
case ::gig::vcf_type_bandreject: //TODO: not implemented yet |
73 |
Type = ::gig::vcf_type_bandpass; |
FilterType = ::gig::vcf_type_bandpass; |
74 |
case ::gig::vcf_type_bandpass: |
case ::gig::vcf_type_bandpass: |
75 |
pFilter = &BPFilter; |
pFilter = &BPFilter; |
76 |
break; |
break; |
77 |
case ::gig::vcf_type_lowpassturbo: //TODO: not implemented yet |
case ::gig::vcf_type_lowpassturbo: //TODO: not implemented yet |
78 |
default: |
default: |
79 |
Type = ::gig::vcf_type_lowpass; |
FilterType = ::gig::vcf_type_lowpass; |
80 |
case ::gig::vcf_type_lowpass: |
case ::gig::vcf_type_lowpass: |
81 |
pFilter = &LPFilter; |
pFilter = &LPFilter; |
82 |
|
|
137 |
BasicBPFilter.ApplyFB(base, in, this->resonance * LSF_FB) * this->resonance; |
BasicBPFilter.ApplyFB(base, in, this->resonance * LSF_FB) * this->resonance; |
138 |
} |
} |
139 |
|
|
140 |
|
#if ARCH_X86 |
141 |
// expects to find input in xmm0 and leaves output in xmm7 |
// expects to find input in xmm0 and leaves output in xmm7 |
142 |
inline void Apply4StepsSSE(biquad_param_t* base, biquad_param_t* main) { |
inline void Apply4StepsSSE(biquad_param_t* base, biquad_param_t* main) { |
143 |
float fb; |
float fb; |
165 |
:: "m" (scale) /* %0 */ |
:: "m" (scale) /* %0 */ |
166 |
); |
); |
167 |
} |
} |
168 |
|
#endif // ARCH_X86 |
169 |
|
|
170 |
}; |
}; |
171 |
|
|
172 |
}} //namespace LinuxSampler::gig |
}} //namespace LinuxSampler::gig |