From 21eecb756fc671b8cc6657f8b07a3affd38536db Mon Sep 17 00:00:00 2001 From: Anastasios Grammenos Date: Thu, 14 Sep 2023 13:45:45 +0300 Subject: sin without interpolation --- src/osc_sin.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/osc_sin.c b/src/osc_sin.c index 66478d2..79a1726 100644 --- a/src/osc_sin.c +++ b/src/osc_sin.c @@ -2,17 +2,15 @@ osc_t OSC_sin = { .name = "f_sin", - .len = 20000, + .len = 1, .start = 0, - .end = 20000, + .end = 1, }; float osc_sin(float offset) { - return osc_interpolate(offset, - sin(2 * M_PI * (int)offset / OSC_sin.len), - sin(2 * M_PI * osc_next_index(&OSC_sin, offset) / OSC_sin.len)); + return sin(2 * M_PI * offset); } float -- cgit v1.2.3