summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAnastasios Grammenos <anastasios.grammenos@noris.gr>2023-09-14 13:45:45 +0300
committerAnastasios Grammenos <anastasios.grammenos@noris.gr>2023-09-14 13:45:45 +0300
commit21eecb756fc671b8cc6657f8b07a3affd38536db (patch)
treed6a3fe1b30fc3ab15a3532fa183258116cc36d85 /src
parent70d0d8ab25a1a9e92aa3016b661b0a9fe1c3c7cb (diff)
downloadsynth-project-21eecb756fc671b8cc6657f8b07a3affd38536db.tar.gz
synth-project-21eecb756fc671b8cc6657f8b07a3affd38536db.tar.bz2
synth-project-21eecb756fc671b8cc6657f8b07a3affd38536db.zip
sin without interpolation
Diffstat (limited to 'src')
-rw-r--r--src/osc_sin.c8
1 files 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