Basic distortion plugin!

This commit is contained in:
Aleks Rutins 2023-04-14 11:31:15 -04:00
parent c226177453
commit a32ece06df
3 changed files with 12 additions and 3 deletions

View file

@ -13,6 +13,9 @@ namespace Dynamite {
case DRIVE:
drive = (const float *)data;
break;
case THRESHOLD:
threshold = (const float *)data;
break;
}
}
@ -21,6 +24,11 @@ namespace Dynamite {
for(uint32_t pos = 0; pos < n_samples; pos++) {
output[pos] = input[pos] * coeff;
if(output[pos] > *threshold) {
output[pos] = *threshold;
} else if (output[pos] < -*threshold) {
output[pos] = -*threshold;
}
}
}
}