summaryrefslogtreecommitdiff
path: root/rotord
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2014-01-27 15:52:21 +0000
committerTim Redfern <tim@eclectronics.org>2014-01-27 15:52:21 +0000
commitd1e12e5dbc41e9d05b40b611d7e62affb15b2ec7 (patch)
tree3f992fc2c910ba4a62f721496b21700820eb5867 /rotord
parent71ab88c9e35d6060fba341f9f034ec0e4ac7c31e (diff)
change meaning of random frequency
Diffstat (limited to 'rotord')
-rwxr-xr-xrotord/httplot1
-rw-r--r--rotord/src/nodes_maths.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/rotord/httplot b/rotord/httplot
index 8f48dce..fb3841c 100755
--- a/rotord/httplot
+++ b/rotord/httplot
@@ -36,6 +36,7 @@ import matplotlib.pyplot as plt
plt.plot(x,y)
plt.ylabel('signal')
plt.xlabel('time')
+plt.title(args.path)
plt.show()
#print response
diff --git a/rotord/src/nodes_maths.h b/rotord/src/nodes_maths.h
index b2aa9c7..7fd0f13 100644
--- a/rotord/src/nodes_maths.h
+++ b/rotord/src/nodes_maths.h
@@ -246,7 +246,7 @@ namespace Rotor {
o=inputs[0]->get(time);
}
else o=time.time;
- uint32_t m=(int)(o/parameters["frequency"]->value);
+ uint32_t m=(int)(o*parameters["frequency"]->value);
PRNG.seed(m^(int)parameters["seed"]->value);
return ((double)(PRNG()&0xffff))+(((o/parameters["frequency"]->value)*parameters["frequency"]->value)-m);