[PD] Loading arrays with arbitrary wave forms
IOhannes m zmölnig
zmoelnig at iem.at
Thu Apr 10 13:45:56 CEST 2014
On 04/09/2014 09:46 AM, IOhannes m zmoelnig wrote:
> [sin] |
ah, there is no [sin] object, use [cos] instead.
anyhow, the patch was not really meant to be be copied to your Pd
instance, but to show how easy it is to do what you want.
it basically consists of two three parts:
#1 generate numbers 0..1023; i'm using [until] and a counter for this.
for simplicity, the counter is not reset at the beginning, so it will
only generate the correct numbers once (the next time you click on
[1024(, it will instead generate numbers 1024..2047); adding a reset is
#2 normalize the numbers 0..1023 to something more useful, e.g. to
0..2pi (my code is bogus here, as it incorporates a deg2rad conversion
without ever seeing deg values) and use these values as input to a
function (in my example sin(x)+0.1*random())
#3 write the generated value into the table at the given index (the
value from the counter)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 880 bytes
Desc: OpenPGP digital signature
More information about the Pd-list