writing externals

Miller Puckette mpuckett at man104nfs.UCSD.EDU
Sat Apr 17 01:18:56 CEST 1999

Hi all,  sorry for teh long silence (the show was a success!)

Klaus Voltmer asked about Pd's performance which is inferior to that
of FTS on R5000s.  There are at least three possible factors:

1.  Overall CPU use is probably higher in Pd than FTS because the code
isn't anywhere near as carefully optimized (yet) as FTS;

2.  Pd doesn't request "real time" status from the IRIX scheduler.  I don't
want to do that until I've got a bulletproof way to protect IRIX from freezing
(as readers have already discussed here.)

3.  Pd can actually block trying to write graphics updates to the GUI front end.
There is as yet no way to defer graphics updates when the GUI side is busy;
I hope to put this in a bit later when I've got the design more stable.

So my best answer is that I'm trying to improve things.

This problem (from Johannes Zmoelnig) is different:

> <P>1) on a PentiumII @ 288MHz and a SoundBlaster-AWE32 in full-duplex mode
> (-ada) I get the *permanent* error-message"resyncing-audio".
> <BR>Even very harmless patches (like "Test Audio And Midi") don't get anything

This almost certainly means the ADC and DAC are running at different sample
rates.  Pd doesn't check the audio hardware sample rate.  Also, if your ADC and
ADC are running at the same rate but aren't synchronized, you'll get the
"resync" message occasionally.

> What happened to functions of the following type in release 0.25test3
> (for Win)
>     class_addmethod(any_class, anyfunction, gensym("float"), 0);
> my externals wouldn't work until I changed it to
>     class_addfloat(any_class, anyfunction);
> Did you do this on purpose ( to distinguish between floats and
> "float"-symbols) ?

The correct call would be,

class_addmethod(any_class, anyfunction, gensym("float"), A_FLOAT, 0);

otherwise Pd won't send the argument.  This should be exactly equivalent to

class_addfloat(any_class, anyfunction);

which is just a convenience routine.

> By the way : when I'm opening a patch with Audio already ON the
> dsp-engine won't work until I switch Audio OFF and then ON again;
> this is quite annoying if other patches are already running... I
> experienced this on pd024 only and I never tried it on any 0.25 release,
> so maybe you have already fixed it (or maybe this is part of an idea of
> some kind of concept I haven't checked and not a bug so it will never be
> *fixed*)
> hannes

That was a bug which I believe Ive fixed for 0.25.

As to the state of the 0.25 release, I'm hoping to work on the documentation
some (it's a good way for me to find bugs) and put it out.  There's a
problem in 0.25 TEST6 that causes the GUI process to crash sporadically on NT
machines...  I'd like to fix that before making the release.


More information about the Pd-list mailing list