[jmsl] absolute scheduling
jmsl at music.columbia.edu
jmsl at music.columbia.edu
Sat Sep 20 15:24:12 EDT 2008
Hi J
You are right. MusicShapes do not use absolute timestamps for
scheduling. If you remove one element, the MusicShape's remaining
elements jump forward in time. You might rewrite your "delete" to set
the amp or the picth to 0 to maintain duration but keep it silent.
But cooler might be to redesign your model of a Track as a
ParallelCollection of MusicJobs, each responsible for a single "note".
Each MusicJob's startDelay would correspond to the absolute time since
the beginning of the Track. Then you could add and delete MusicJobs
without changing the overall sequence. You'd have to override repeat()
to do something like:
getInstrument().play(playTime, 1, myData);
How's that sound?
Thanks
Nick Didkovsky
jmsl at music.columbia.edu wrote:
> I'm trying to use jmsl to build a sequencing back-end for a
> composition app, but I'm having some real problems. I've based my
> design around ParallelCollection and MusicShape objects, but I'm
> having some troubles with the "duration" paradigm for scheduling
> events in MusicShape. Specifically, I want to have "tracks" with
> "events" at absolute, locked, locations in time. The problem I'm
> having is that, in a track with 4 events (for example), when I delete
> event 2, the MusicShape moves events 3 and 4 back in time, by virtue
> of the way the duration parameter works. I don't want that... If I
> remove an event, I just want to remove that event itself, without
> affecting any of the surrounding events. I could recalculate the
> durations, but that seems way over the top, to me...
> It seems like this should be easy, but for some reason I can't wrap my
> head around how this would best be done.
>
> I would be enormously appreciative if somebody could just quickly
> describe the kind of data/object structure I'd best use for this sort
> of sequencer design. I feel like it must still be a
> ParallelCollection, but I'm really not clear about how to populate
> it... At this point, my design uses a set of double[] arrays that
> represent my discrete events, and these events have a dimension for
> "metricPosition", which is an absolute location, in beats, for the event.
>
> Any help very much appreciated.
>
> J.
>
> _______________________________________________
> jmsl mailing list
> jmsl at music.columbia.edu
> http://music.columbia.edu/mailman/listinfo/jmsl
More information about the jmsl
mailing list