-
auto-saving samples in patch
This post is deleted! -
@reflect_ The -k flag does this for [array] (k is for keep) and the 'Save contents' property for graphical arrays:
-
thanks @ingox would i put the -k flag like this "read -resize $1 -k array1"?
-
@reflect_ I looks as though you are accessing a graphical array...... so there is no -k switch.
As @ingox says, you can set the array to save it's contents by ticking the box in its properties window (as it seems you have already done)....... and then saving the patch.You can send messages to set the properties of a graphical array...... you are doing that with the -resize message...... but you cannot set to save contents in the read message.
When you create a graphical array the save contents is already ticked, so it is not necessary to turn it on.But it will be best to turn it off as your patch will be massive when stored.
You can use a [loadbang] to load the samples when the patch opens, banging a message "like this"....
[open C:/whatever/my_samples/sample_1(.......... (you will need the full path, unless the samples are in the same folder or a sub folder)
feeding into your [read -resize........... message.Beware...... No spaces in any path in Pd...!!!!!
If the samples are in the same folder then just the sample name is enough......... sample_1.wav
If in a subfolder ...... my_samples/sample_1.wav
Although you can set the path to the samples folder so you don't need to set it in every message....... using an object in your patch......... [declare -path my_samples] ...... (for a subfolder or the full path if it is somewhere else)
David.