summaryrefslogtreecommitdiffstats
path: root/src/synth_gui.c
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2023-11-21 14:07:33 +0200
committergramanas <anastasis.gramm2@gmail.com>2023-11-21 14:07:33 +0200
commitc03d395f6848fe9b2d1185173a9cf5ec8277394f (patch)
tree2dad9fe79a189096b713559e35cf49497fea817a /src/synth_gui.c
parenta7c39399e3ec051f210d9e991fe0112d0f988817 (diff)
downloadsynth-project-c03d395f6848fe9b2d1185173a9cf5ec8277394f.tar.gz
synth-project-c03d395f6848fe9b2d1185173a9cf5ec8277394f.tar.bz2
synth-project-c03d395f6848fe9b2d1185173a9cf5ec8277394f.zip
Crappy fft for spectrum analysis and initial gtk test
Diffstat (limited to 'src/synth_gui.c')
-rw-r--r--src/synth_gui.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/synth_gui.c b/src/synth_gui.c
index ed10547..c210f2b 100644
--- a/src/synth_gui.c
+++ b/src/synth_gui.c
@@ -191,6 +191,9 @@ draw_signals(synth_t * synth, int x, int y, int width, int height)
else
DrawCircle(i , y + height / 2 + floor(50 * synth->viz.wave[i - x]), point_radius, RAYWHITE);
}
+ for (int i = x; i < WIDTH - x; i++) {
+ DrawCircle(i , y + height / 2 + floor(5 * synth->fftviz.wave[i - x]) * -1, point_radius, RED);
+ }
int c = 0;
for (int i = 0; i < MIDI_NOTES; i++) {