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
simple enough.

#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)


fgmrdsa
IOhannes

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to