Hallo, Kyle Klipowicz hat gesagt: // Kyle Klipowicz wrote:
You know, after a few years of Pd frustration, I'm starting to agree with you! Time to hunker down on data structures.
I attached a little sequencer example (I think, I posted it in the past as well) which just creates some random notes any plays them back according to x-position. y-position is taken as midi note value.
[pd note] contains the structure definition for this, sequence-data.pd is a general purpose struct-player.
In this form it isn't much more than a [qlist], but it's easy to extend the [struct note float x float y] data structure with more fields, for example "float length", "float instrument", "float cc" etc. Then you don't need to juggle with lots of seperate arrays and you can still edit single events.
Live recording is possible as well of course: I'd just use [timer] for this, just reset the timer at the start of recording, then on every incoming event bang the timer to output the current time and use that as x-position when [append]ing a new struct-instance, maybe scaled by a speed-factor.
Frank Barknecht _ ______footils.org_ __goto10.org__