[PD] 'save contents' in an array

Jonathan Wilkes jancsika at yahoo.com
Tue Oct 16 09:37:14 CEST 2012


Ah, I see:

When you load a sound using [soundfiler] (which I assume is what you're doing)
Pd is trying to keep you from accidentally saving an enormous array with
the patch.  I suppose the logic it uses is based on the notion that a) a  _default_
"Put" menu array is very small (only 100 elements), b) "save contents
with patch" is checked by default, and c) anyone wanting to actually save
array data with a patch is going to pick an array size and stick with it.  Thus in
d_soundfile.c you get this logic:

* if the soundfile loaded is the exact same size as the array, it won't change the
status of the "save contents" checkbutton.
* if the soundfile is a different size than the array then it resizes the array,
assumes that the "save contents" was checked simply because it's the
default and not because the user wanted it checked, and finally
turns it off and gives you a warning.

It has certainly kept me from saving unwanted array state with
a patch.  But as you've experienced, that behavior doesn't make much
sense if you actually want to save array data and aren't sticking with a
specific size.

-Jonathan


>________________________________
> From: Alexandros Drymonitis <adrcki at gmail.com>
>To: Jonathan Wilkes <jancsika at yahoo.com> 
>Cc: PD-list <pd-list at iem.at> 
>Sent: Tuesday, October 16, 2012 2:55 AM
>Subject: Re: [PD] 'save contents' in an array
> 
>
>Yes, I'm aware of all this saving contents issues. What I did was clicking on 'save contents' and the load some sound and I was getting this message:
>warning: array array1: clearing save-in-patch flag
>
>But loading the sound first and then clicking on 'save contents' and then saving the patch works. I guess I was a bit stressed out when I was trying to do this and couldn't really think properly.
>
>
>On Tue, Oct 16, 2012 at 2:04 AM, Jonathan Wilkes <jancsika at yahoo.com> wrote:
>
>Yes it should save the array contents with the patch.
>>
>>What version of Pd and what operating system?
>>
>>
>>Also-- you can attach small patches to your message
>>so other people can inspect it.  But if you have an array,
>>usually you want to make sure that you _don't_ save
>>
>>save the contents with the patch. Otherwise your patch
>>can become very large.
>>
>>
>>-Jonathan
>>
>>
>>>________________________________
>>> From: Alexandros Drymonitis <adrcki at gmail.com>
>>>To: Jonathan Wilkes <jancsika at yahoo.com>
>>>Cc: PD-list <pd-list at iem.at>
>>>Sent: Monday, October 15, 2012 4:23 PM
>>>Subject: Re: [PD] 'save contents' in an array
>>
>>>
>>>
>>>Ok, but if you save the patch after you've clicked on 'save contents' in your array, shouldn't it save the patch with the contents in the array?
>>>
>>>
>>>On Mon, Oct 15, 2012 at 11:20 PM, Jonathan Wilkes <jancsika at yahoo.com> wrote:
>>>
>>>
>>>>
>>>>Yes but if I recall correctly clicking the checkbox doesn't automatically save the
>>>>patch.
>>>>
>>>>-Jonathan
>>>>
>>>>>________________________________
>>>>> From: Alexandros Drymonitis <adrcki at gmail.com>
>>>>>To: PD-list <pd-list at iem.at>
>>>>>Sent: Monday, October 15, 2012 4:15 PM
>>>>>Subject: [PD] 'save contents' in an array
>>>>
>>>>>
>>>>>
>>>>>Hi all,
>>>>>If you activate the 'save contents' tick in an array, it supposed to save whatever you save in it, so next time you open the patch,  the arryay's contents will be there, right? I've made a patch but this really won't work. Any ideas why?
>>>>>
>>>>>Thanks
>>>>>
>>>>>_______________________________________________
>>>>>Pd-list at iem.at mailing list
>>>>>UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>>
>>
>
>
>



More information about the Pd-list mailing list