[PD] Dynamic patching with audio - review

Olivier B lamouraupeuple at gmail.com
Thu Aug 18 13:49:48 CEST 2011


Well...

Thanks a lot to Jérôme for this long review... (by the way, what about the
game you've talked about ?)

So... does anyone has find a proper solution to this ? :

#########
10 - PURE DATA - CREATE AUDIO ABSTRACTIONS
------------------------------
------------
There is a problem when I create an audio abstraction. The sound of the
abstraction is not working while other previous audio objects are working.
We have to send a mouseup and cut message to simulate mouse activity !
http://abel.jerome.free.fr/newatlantis/AudioDynamicPatching/images/dyn-audio-paths-abstraction-problem-2.png
#########

For info :

With dsp on, I've tried to :

[dsp 1(
|
[pd-subpatch]     // the one containing the audio abstractions dynamically
created

The last created abstraction produce sound as wanted.
But the previous ones seems to be in a double sample rate or something like
that...
If I put and cut a box, everything becomes fine...

For now, I use the Jérôme's trick of dynamically put an cut a box.
And it works fine in my case.

Cheers.

01ivier



2011/3/22 Mathieu Bouchard <matju at artengine.ca>

> On Tue, 22 Mar 2011, Rich E wrote:
>
>  Thanks for the insight into more pd internals, although I think I prefer
>> an approach that does not heavily rely on public pointers floating around,
>> like pd_newest
>>
>
> pd_newest is a function returning a pointer, not a pointer itself. that's
> an easy mistake to do, especially as the return value of it gets almost
> always cast to a more specific type such as :
>
>  t_my_something_tilde *stuff = (t_my_something_tilde *)pd_newest();
>
>
>  (it is funny that it is declared in m_pd.h, but then there is a comment
>> above its implementation that it is a hack, maybe be removed or redesigned).
>>
>
> No, it's not funny. Miller will call "hacks" things that are quite normal
> to be doing, and then forget about them entirely, and 15 years later, people
> like you still assume that the comments mean something, even though in the
> meantime 13 or 42 developers had to call pd_newest() somewhere because it's
> the only way to do a rather basic thing.
>
>
>   By the way, if I call pd_newest after glob_evalfile(), will it give me
>> a reference to the patch?
>>
>
> From what I know and from what I can read quickly, you wouldn't get it,
> you'd get the last object created in the patch, but I didn't try it.
>
> However, canvas_popabstraction does set pd_newest, so you can already use
> pd_newest() if you pretend that the patch is an abstraction.
>
>
>  About namecanvas, there were two issues that I found when I had a system
>> for dynamically loading/unloading and linking together patches that
>> contained audio: 1) DSP had to be shut off and then turned back on once the
>> linking was done.  Sometimes I wouldn't even get audio out of an object
>> until this happened.
>>
>
> Ah ok, this is not the responsibility of [namecanvas], but I know what you
> mean.
>
>
>  2) closing a patch that had audio receivers containing $ variables via the
>> menuclose message was unstable, and would sometimes crash pd.
>>
>
> I don't see how this could ever happen. Is there a way to make a very small
> patch that causes that crash to happen ?
>
>
>  I didn't ever get to the bottom of these issues, but from what I
>> understand, [namecanvas] doesn't handle deallocation too well.  I lost all
>> this code anyway,
>>
>
> What do you mean you "lost" it ?
>
>
>  so the new approach I am using for patch maintainence is through libpd and
>> an object oriented language (objective C at the moment, although I think I
>> would prefer python for running pd on a laptop/desktop).
>>
>
> So why don't you use libpd's python bindings ?
>
>
>  ______________________________**______________________________**
> ___________
> | Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list
>
>


-- 
Envie de tisser ?
http://yamatierea.org/papatchs/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20110818/1809de8f/attachment.htm>


More information about the Pd-list mailing list