summaryrefslogtreecommitdiff
path: root/rotord
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-12-17 13:36:22 +0000
committerTim Redfern <tim@eclectronics.org>2013-12-17 13:36:22 +0000
commit23868cb49212055fe55ab4da5ad630a9c94ea192 (patch)
treed3414de05c5ba551ffc023fdb0e881fc1ba8e5b3 /rotord
parent293c540eecb2bf2566c96e40f6b66186652a0933 (diff)
frequency parameter for cyclic functions
Diffstat (limited to 'rotord')
-rw-r--r--rotord/src/nodes_maths.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/rotord/src/nodes_maths.h b/rotord/src/nodes_maths.h
index 7b37290..ce474cf 100644
--- a/rotord/src/nodes_maths.h
+++ b/rotord/src/nodes_maths.h
@@ -122,14 +122,8 @@ namespace Rotor {
case ARITHMETIC_pow:
return pow(in,parameters["value"]->value);
break;
-//http://dsp.stackexchange.com/questions/971/how-to-create-a-sine-wave-generator-that-can-smoothly-transition-between-frequen
-//
-//arithmetic needs to keep an accumulator and work from the begiining for some things
-//sin/cos needs a phase accumulator to allow frequency modulation
-
case ARITHMETIC_sin:
phase+=(in-inputs[0]->get(time.lastframe()))*parameters["frequency"]->value;
- //return sin(phase); need to review this
return sin(phase)*parameters["value"]->value;
break;
case ARITHMETIC_cos: