Browse Source

Rename f32_4 to float4.

tags/v1.0.1
Andrew Belt 3 years ago
parent
commit
f3c64d873b
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      src/VCA.cpp

+ 4
- 4
src/VCA.cpp View File

@@ -34,9 +34,9 @@ struct VCA : Module {

// Get input
int channels = in.getChannels();
simd::f32_4 v[4];
simd::float4 v[4];
for (int c = 0; c < channels; c += 4) {
v[c / 4] = simd::f32_4::load(&in.voltages[c]);
v[c / 4] = simd::float4::load(&in.voltages[c]);
}

// Apply knob gain
@@ -56,7 +56,7 @@ struct VCA : Module {
}
else {
for (int c = 0; c < channels; c += 4) {
simd::f32_4 cv = simd::f32_4::load(&lin.voltages[c]) / 10.f;
simd::float4 cv = simd::float4::load(&lin.voltages[c]) / 10.f;
cv = clamp(cv, 0.f, 1.f);
v[c / 4] *= cv;
}
@@ -76,7 +76,7 @@ struct VCA : Module {
}
else {
for (int c = 0; c < channels; c += 4) {
simd::f32_4 cv = simd::f32_4::load(&exp.voltages[c]) / 10.f;
simd::float4 cv = simd::float4::load(&exp.voltages[c]) / 10.f;
cv = clamp(cv, 0.f, 1.f);
cv = rescale(pow(expBase, cv), 1.f, expBase, 0.f, 1.f);
v[c / 4] *= cv;


Loading…
Cancel
Save