Alexandre Torres Porres porres at gmail.com
Thu Apr 10 17:54:05 CEST 2014

hey, I tried making mine a bit more understandable

it works with any table size. Just set the size as the argument in the
[table] object.

This means it works with [tabosc4~] if you'd like, and it makes the extra 3
guard points correctively.

The guard points thing and interpolation is a bit hard to grasp at first.
Say you have 0-96 points, you need extra 3 points (1 in the beggining, 2 at
the end) so it goes now from 0-99 and your original indexes are now from *1
to 97*. The first point (0) needs to be equal to the last one (97) and then
the extra two points (98-99) must be equal to (1-2).

What my patch does is get the table size and consider it has these extra
points, so it writes the table values like sinesum does.

In the example I'm doing a hann window and using it as an envelope, but you
could do whatever.

cheers

2014-04-10 8:45 GMT-03:00 IOhannes m zmölnig <zmoelnig at iem.at>:

> 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
>
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20140410/15bb34cc/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: interpolation.pd
Type: application/octet-stream
Size: 2201 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20140410/15bb34cc/attachment-0001.obj>