<div dir="ltr">hey, I tried making mine a bit more understandable<div><br></div><div>it works with any table size. Just set the size as the argument in the [table] object.</div><div><br></div><div>This means it works with [tabosc4~] if you&#39;d like, and it makes the extra 3 guard points correctively.</div>
<div><br></div><div>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 <u>1 to 97</u>. 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).</div>
<div><br></div><div>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.</div><div><br></div><div>In the example I&#39;m doing a hann window and using it as an envelope, but you could do whatever.</div>
<div><br></div><div>cheers</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-04-10 8:45 GMT-03:00 IOhannes m zmölnig <span dir="ltr">&lt;<a href="mailto:zmoelnig@iem.at" target="_blank">zmoelnig@iem.at</a>&gt;</span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 04/09/2014 09:46 AM, IOhannes m zmoelnig wrote:<br>
&gt; [sin]            |<br>
<br>
ah, there is no [sin] object, use [cos] instead.<br>
<br>
anyhow, the patch was not really meant to be be copied to your Pd<br>
instance, but to show how easy it is to do what you want.<br>
<br>
it basically consists of two three parts:<br>
#1 generate numbers 0..1023; i&#39;m using [until] and a counter for this.<br>
for simplicity, the counter is not reset at the beginning, so it will<br>
only generate the correct numbers once (the next time you click on<br>
[1024(, it will instead generate numbers 1024..2047); adding a reset is<br>
simple enough.<br>
<br>
#2 normalize the numbers 0..1023 to something more useful, e.g. to<br>
0..2pi (my code is bogus here, as it incorporates a deg2rad conversion<br>
without ever seeing deg values) and use these values as input to a<br>
function (in my example sin(x)+0.1*random())<br>
<br>
#3 write the generated value into the table at the given index (the<br>
value from the counter)<br>
<br>
<br>
fgmrdsa<br>
<span class="HOEnZb"><font color="#888888">IOhannes<br>
<br>
</font></span><br>_______________________________________________<br>
<a href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br></blockquote></div><br></div>