Try using two arrays, one for the data, one for a timestamp. The two pieces of data would be associated based on a common array index. Then you can use the [textfile] object to store the data, in a form like "$data $timestamp;" on each line. Thus, each line of the textfile corresponds to an index of the array. There are some timer objects in PD to get a timestamp - you may or may not want to quantize this. If you wish to capture note events, you may need a more complicated scheme, such as: array 1: velocity, array 2: note#, array 3: timestamp.
In this scheme, you are limited in the number of total events, but not in the length of time a loop can be.
Note that PD doesn't know where a "1" is, so you will have to develop a custom timing scheme to represent loops and metred time. The standard 96 ppq timing is fairly simple to implement, depending on what resolution you need.
~David
On 9/11/06, greg gkjoyce@gmail.com wrote:
Hello I have two questions: what are some strategies for capturing specific live pd data into pd to reuse it later? I'm sort of visualizing something like a buffer of some arbitrary length of time provided by the user, then perhaps "on the one" you could re-trigger and / or save this loop. also: What are ways to load store and play non-audio loop data? ideally this could work from small one-off files similar to audio loops. Sorry if this is an RTFM question, but the pd universe is vast and maybe someone has done this before.
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list