add attenuation example
parent
3dcfa5b7fd
commit
54e1e399ee
@ -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…
Reference in New Issue