i have a patch with a sampler (see screenshot) and every time i open the patch i need to manually select the sound samples again for it to work. How can they be saved and stored within the patch so that this doesn't have to be done?
any help is greatly appreciated!
auto-saving samples in patch
@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)