add attenuation example

main
Clyne 1 year ago
parent 3dcfa5b7fd
commit 54e1e399ee
Signed by: clyne
GPG Key ID: 3267C8EBF3F9AFC7

@ -0,0 +1,12 @@
Sample* process_data(Samples samples)
{
const auto p = param1();
const float scale = p / 4095.f;
const auto offset = (4095 - p) / 2;
for (int i = 0; i < SIZE; ++i)
samples[i] = samples[i] * scale + offset;
return samples;
}
Loading…
Cancel
Save