From d1e12e5dbc41e9d05b40b611d7e62affb15b2ec7 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Mon, 27 Jan 2014 15:52:21 +0000 Subject: change meaning of random frequency --- rotord/httplot | 1 + rotord/src/nodes_maths.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3