[PD] phasor~ and osc~ right inlet: exact timing

Matt Barber brbrofsvl at gmail.com
Mon Apr 19 14:17:08 CEST 2010


> Thanks a lot for your explanations!
>
> On Sun, 2010-04-18 at 22:14 -0400, Matt Barber wrote:
>
>> For this reason I almost always use an 8192-point [table] and
>> [tabread4~] if I need more accurate sinusoids;
>
> By using 'sinesum' messages to [table]s?
> I can't think of another way to have access to more precise sinusoids in
> Pd, or is there any?

Yes, either that (which seems to use the <math.h> sin or cos
functions), or an [until] + [sin] + [tabwrite] routine.  The former is
easier, obviously, and also adds the three guard points automatically
(it also seems to use the same precision of PI=3.14159 that you can
get with floats in Pd patches).

If you want the code, look for the function garray_dofo in g_array.c

Matt




More information about the Pd-list mailing list