Is there anyway to store data separately inside abstractions not using arguments?
For example, say if there's an abstraction that writes a waveform to array from it's input, is there anyway to store the array values in abstractions separately when the parent patch was saved?
-
Anyway to store data separately inside abstractions not using arguments?
-
A possible solution would be to give each instance of the abstraction a unique identifier as an argument and have them save and load the data to disk using a filename based on this identifier. This solution does use arguments but it only uses one.
[table myTable 32] [loadbang] <- auto load table data | [i $1] <-$1 is the unique id | [read tabData-$1.txt( | [s $0.myTable] [bang( <- save table data | [i $1] | [write tabData-$1.txt( | [s $0.myTable]
With an id of 4 this will load the contents of tabData-4.txt into the abstraction's own $0.myTab array. The [bang( will write the contents of the array back out to tabData-4.txt.
-
@portabello That's a very nice solution!
-
Thank you so much!