aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/guttersynth.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/guttersynth.c b/src/guttersynth.c
index 7e1607a..7e30411 100644
--- a/src/guttersynth.c
+++ b/src/guttersynth.c
@@ -95,7 +95,7 @@ static void gutter_distortion(gutter_state* s, FLT* audio_ptr)
default:
output = input;
}
- *audio_ptr = output;
+ *audio_ptr = output;
}
@@ -106,13 +106,13 @@ static void gutter_distortion(gutter_state* s, FLT* audio_ptr)
*/
void gutter_randomisefilters(gutter_state* s)
{
- int i, b, f;
+ int i, b, f;
for (b = 0; b < s->bankCount; b++) {
for (f = 0; f < s->filterCount; f++) {
- i = b * s->bankCount + f;
+ i = b * s->bankCount + f;
s->filterFreqs[i] = rangerandom(100, 4000);
- s->gains[i] = rangerandom(0, 1);
- s->Q[i] = rangerandom(20, 200);
+ s->gains[i] = rangerandom(0, 1);
+ s->Q[i] = rangerandom(20, 200);
}
}
gutter_calccoeffs(s);
@@ -140,11 +140,11 @@ int gutter_setdistortionmethod(gutter_state* s, int method)
*/
int gutter_setfreq(gutter_state* s, int bank, int filter, FLT value)
{
- if (bank >= s->bankCount || filter >= s->filterCount || bank < 0 || filter < 0) {
- return -1;
- }
- s->filterFreqs[bank*s->bankCount+filter] = value;
- return 0;
+ if (bank >= s->bankCount || filter >= s->filterCount || bank < 0 || filter < 0) {
+ return -1;
+ }
+ s->filterFreqs[bank*s->bankCount+filter] = value;
+ return 0;
}
@@ -160,10 +160,10 @@ int gutter_setfreq(gutter_state* s, int bank, int filter, FLT value)
*/
int gutter_setq(gutter_state* s, int bank, int filter, FLT value)
{
- if (bank >= s->bankCount || filter >= s->filterCount || bank < 0 || filter < 0) {
- return -1;
- }
- s->Q[bank*s->bankCount+filter] = value;
+ if (bank >= s->bankCount || filter >= s->filterCount || bank < 0 || filter < 0) {
+ return -1;
+ }
+ s->Q[bank*s->bankCount+filter] = value;
return 0;
}
@@ -180,10 +180,10 @@ int gutter_setq(gutter_state* s, int bank, int filter, FLT value)
*/
int gutter_setgain(gutter_state* s, int bank, int filter, FLT value)
{
- if (bank >= s->bankCount || filter >= s->filterCount || bank < 0 || filter < 0) {
- return -1;
- }
- s->gains[bank*s->bankCount+filter] = value;
+ if (bank >= s->bankCount || filter >= s->filterCount || bank < 0 || filter < 0) {
+ return -1;
+ }
+ s->gains[bank*s->bankCount+filter] = value;
return 0;
}
@@ -246,7 +246,7 @@ gutter_state* gutter_init_ca(int bankCount, int filterCount, int samplerate,
size2d = sizeof(FLT) * bankCount * filterCount;
s->gains = (FLT*) allocator(size2d);
- s->Q = (FLT*) allocator(size2d);
+ s->Q = (FLT*) allocator(size2d);
s->filterFreqs = (FLT*) allocator(size2d);
s->gi.prevX1 = (FLT*) allocator(size2d);
s->gi.prevX2 = (FLT*) allocator(size2d);
@@ -277,8 +277,8 @@ gutter_state* gutter_init_ca(int bankCount, int filterCount, int samplerate,
s->gi.prevX2[i] = 0;
s->gi.prevY1[i] = 0;
s->gi.prevY2[i] = 0;
- s->gains[i] = 1;
- s->Q[i] = 1;
+ s->gains[i] = 1;
+ s->Q[i] = 1;
}
}
@@ -473,4 +473,4 @@ void gutter_process_samples(gutter_state* s, FLT* audioOutput, int nsamps)
for (i = 0; i < nsamps; i++) {
audioOutput[i] = gutter_process_input(s, 0);
}
-} \ No newline at end of file
+}