This website works better with JavaScript.
Home
Help
Sign In
VCVRack
/
Fundamental
mirror of
https://github.com/VCVRack/Fundamental.git
Watch
1
Star
0
Fork
0
Code
Issues
0
Releases
25
Wiki
Activity
Browse Source
Replace pow(2, x) with dsp::approxExp2_taylor5.
tags/v1.2.1
Andrew Belt
5 years ago
parent
db0c7a63e5
commit
93cd07de61
2 changed files
with
2 additions
and
2 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
src/LFO.cpp
+1
-1
src/VCO.cpp
+ 1
- 1
src/LFO.cpp
View File
@@ -15,7 +15,7 @@ struct LowFrequencyOscillator {
void setPitch(T pitch) {
pitch = simd::fmin(pitch, 10.f);
freq =
simd::pow(2.f, pitch)
;
freq =
dsp::approxExp2_taylor5(pitch + 30) / 1073741824
;
}
void setPulseWidth(T pw) {
const T pwMin = 0.01f;
+ 1
- 1
src/VCO.cpp
View File
@@ -52,7 +52,7 @@ struct VoltageControlledOscillator {
T sinValue = 0.f;
void setPitch(T pitch) {
freq = dsp::FREQ_C4 *
simd::pow(2.f, pitch)
;
freq = dsp::FREQ_C4 *
dsp::approxExp2_taylor5(pitch + 30) / 1073741824
;
}
void setPulseWidth(T pulseWidth) {
Write
Preview
Loading…
Cancel
Save