dear list,
i'm saving different parameters in an array to load them later again. when i close the patch and open it again later sometimes the values stay in the array, sometimes not. so i did try to save the array in an "audio" file with [soundfiler], but this will "normalize" my values.
do you have a workaround or maybe a completely other solution for this problem? thank you
best richard
On 10/01/2017 08:25 PM, richard millig @ selma wrote:
dear list,
i'm saving different parameters in an array to load them later again. when i close the patch and open it again later sometimes the values stay in the array, sometimes not. so i did try to save the array in an "audio" file with [soundfiler], but this will "normalize" my values.
that's because you are using a soundfile format that uses fixed-point values (e.g. 16bit WAV or AIFF), and cannot hold values with a magnitude >1. so either store your values in a "normalized" fashion (so they don't exceed -1..+1) and rescale them to their actual values on use; or use floating-point for storing the values ("-bytes 4")
gfmasdr IOhannes
arrays have methods for reading and writing to textfiles:
e.g. [; myarray write foo.txt( and [; myarray read foo.txt(
no need to abuse poor [soundfiler] :-)
Christof
Gesendet: Sonntag, 01. Oktober 2017 um 20:25 Uhr Von: "richard millig @ selma" richard.millig@selma.hfmdk-frankfurt.de An: Pd-List pd-list@lists.iem.at Betreff: [PD] saving parameters in "audio" file
dear list,
i'm saving different parameters in an array to load them later again. when i close the patch and open it again later sometimes the values stay in the array, sometimes not. so i did try to save the array in an "audio" file with [soundfiler], but this will "normalize" my values.
do you have a workaround or maybe a completely other solution for this problem? thank you
best richard _______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
You can also use [text] to save presets.
Mensaje telepatico asistido por maquinas.
On 10/1/2017 4:59 PM, Christof Ressi wrote:
arrays have methods for reading and writing to textfiles:
e.g. [; myarray write foo.txt( and [; myarray read foo.txt(
no need to abuse poor [soundfiler] :-)
Christof
Gesendet: Sonntag, 01. Oktober 2017 um 20:25 Uhr Von: "richard millig @ selma" richard.millig@selma.hfmdk-frankfurt.de An: Pd-List pd-list@lists.iem.at Betreff: [PD] saving parameters in "audio" file
dear list,
i'm saving different parameters in an array to load them later again. when i close the patch and open it again later sometimes the values stay in the array, sometimes not. so i did try to save the array in an "audio" file with [soundfiler], but this will "normalize" my values.
do you have a workaround or maybe a completely other solution for this problem? thank you
best richard _______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
thank you all for these solutions, they're perfect, i'm just wondering, where such things are documented.. richard
On 10/01/2017 09:59 PM, Christof Ressi wrote:
arrays have methods for reading and writing to textfiles:
e.g. [; myarray write foo.txt( and [; myarray read foo.txt(
no need to abuse poor [soundfiler] :-)
Christof
Gesendet: Sonntag, 01. Oktober 2017 um 20:25 Uhr Von: "richard millig @ selma" richard.millig@selma.hfmdk-frankfurt.de An: Pd-List pd-list@lists.iem.at Betreff: [PD] saving parameters in "audio" file
dear list,
i'm saving different parameters in an array to load them later again. when i close the patch and open it again later sometimes the values stay in the array, sometimes not. so i did try to save the array in an "audio" file with [soundfiler], but this will "normalize" my values.
do you have a workaround or maybe a completely other solution for this problem? thank you
best richard _______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
On Son, 2017-10-01 at 20:25 +0200, richard millig @ selma wrote:
dear list,
i'm saving different parameters in an array to load them later again. when i close the patch and open it again later sometimes the values stay in the array, sometimes not.
There is a checkbox in the properties dialog of the array that says 'Save contents'. If checked, the values will be saved together with the patch, if not, the array content is not saved.
Roman
Well, both [array] and [text] have the “-k” flag, for “keeping” text, which writes down the data stored in them inside the pd patch. This is in their help files. It is the same as the “save contents” Roman mentioned.
On Oct 1, 2017, at 2:25 PM, richard millig @ selma richard.millig@selma.hfmdk-frankfurt.de wrote:
sometimes the values stay in the array, sometimes not
The “sometimes” here will depend on the -k flag. If you are still loosing info with the -k flag, then i guess it depends on how you quit the patch: if you didn’t hit save the data probably didn't get saved. If you did hit save, then perhaps this might be a bug.
(With the -k flag you can even cut and paste [text define] and [array define], so you can move the objects freely without loosing any data.)
Also, as Christof pointed out, writing/reading to text file works on both [array] and [text] objects, as well as “data structures”, which would be yet another way to handle preset info (and much more). There is a tutorial if you go to the pd-browser (help>browser) and look for pure data/data structures
Cheers!!
fd