Delete objects when closing the patch

amietbeach's icon

Hi,

I have a patch that creates objects (buffers etc...) during its execution.

I'd like all these dynamically created objects to be deleted when I close the patch. Is that possible???

Gary Lee Nelson's icon

If you are creating them by scripting with thispatcher you can delete them
in the same way using closebang. Examples are in the tutorials.

On 7/12/07 12:10 PM, "amietbeach" wrote:

>
> Hi,
>
> I have a patch that creates objects (buffers etc...) during its execution.
>
> I'd like all these dynamically created objects to be deleted when I close the
> patch. Is that possible???

Cheers
Gary Lee Nelson
Oberlin College
www.timara.oberlin.edu/GaryLeeNelson

amietbeach's icon

Closebang it is!

Danke!

JC

Stefan Tiedje's icon

amietbeach schrieb:
> I have a patch that creates objects (buffers etc...) during its
> execution.

Simply don't save... Then there is no need to delete them... ;-)

Stefan

--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com

f.e's icon
amietbeach's icon

Hey guys,

I've been trying to sort thid thing out for a good while now but I'm not quite there...

This project is for a thesis so I really need to get this deletion thing to work (not to loose marks...).

I actually create buffers and groove objects dynamically by browsing a directory full of .wav files and don't know how to delete them all automaticaly when I close the patch because I don't know how to store the script fo the deketion.

Of course even a list of the objects to be deleted would be sufficient but again, I couldn't figure it out.

Here the code, well a simplified version anyway:

Max Patch
Copy patch and select New From Clipboard in Max.

Thanks for your help guys.

JC

Stefan Tiedje's icon

amietbeach schrieb:
> I actually create buffers and groove objects dynamically by browsing
> a directory full of .wav files and don't know how to delete them all
> automaticaly when I close the patch because I don't know how to store
> the script fo the deketion.
>
> Of course even a list of the objects to be deleted would be
> sufficient but again, I couldn't figure it out.

Something like that?...

Max Patch
Copy patch and select New From Clipboard in Max.

--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com

amietbeach's icon

Hey there thanks a lot.

This is exactly what I was looking for.

My problem is I'd like to use closebang to delete them when closing the patch but the patch won't be saved after the deletion, reulting in the objects to be still there when the patch is relaunched...

Any suggestion?

Max Patch
Copy patch and select New From Clipboard in Max.


Emmanuel Jourdan's icon

On 27 juil. 07, at 14:05, amietbeach wrote:

> My problem is I'd like to use closebang to delete them when closing
> the patch but the patch won't be saved after the deletion, reulting
> in the objects to be still there when the patch is relaunched...
>
> Any suggestion?

You need to the write message to thispatcher.

ej

Max Patch
Copy patch and select New From Clipboard in Max.