[jmsl] start playback, but not at the "start"

jmsl at music.columbia.edu jmsl at music.columbia.edu
Mon Jul 14 16:38:37 EDT 2008


Okay, I was wondering whether I might need to make a new MusicShape with
only the desired elements. I suppose this actually might be kind of good,
since anything done during playback could be kept separate from the actual
"object" of the original MusicShape. Anyway, this is definitely what I'll
be needing to do. And I guess I would "skip the first accumulated 5
seconds" just by iterating over the elements and summing their durations,
yes? (I've always thought in terms of "ED" and "Duration", from Max-land,
but I'll get used to this...)

I suppose a possible design pattern for this might be to have a Player and
a MusicShape, then to locate the desired start point in the MusicShape,
create a new MusicShape with only objects falling >= the start point, add()
that MusicShape to the Player, then launch. Sound about right? I suppose I
could also calculate the actual offset of the first element beyond the
desired start time, and add that to the playback start - i.e.
Player.launch(JMSL.now() + offset). Yes?

Thanks for your time.

J.



On Mon, 14 Jul 2008 15:04:10 -0400, jmsl at music.columbia.edu wrote:
> Hello J
> 
> Welcome to the JMSL user base.  I am glad to hear you are diving into
> JMSL and coming up with interesting scheduling questions so soon!
> 
> You are right; a good way to schedule a bunch of MusicShapes in various
> sequences is to put them in a SequentialCollection and provide a
> Behavior for it. Behavior returns an index but there is no reasons why
> it could not look up a MusicShape by name for example, find a match and
> then return the index of the matching MusicShape.  But maybe I am
> getting ahead of myself, by what means do you want to choose which one
> executes?
> 
> A MusicShape cannot be launched in the middle of its elements.  You
> could build a nice auxiliary class that did so however, by creating a
> MusicShape on the fly. (ie, if you want it to start 5 seconds into the
> MusicShape, skip the first accumulated 5 seconds' worth of elements and
> copy the rest into the MusicShape you actually launch. Make up for the
> portion of the duration between elements with a startDelay)
> 
> Does this help?
> 
> TimePoint is used by JMSL's transcriber.  It's not relevant to this
> discussion
> 
> Thanks,
> Nick Didkovsky
> 
> jmsl at music.columbia.edu wrote:
>> hmmm... Okay, so I figured out that I could make a Behavior-based
>> object that chooses the desired MusicShape by index. But of course
>> this implies that I know the index of the MusicShape.
>>
>> I'm wondering about TimePoint, but it seems pretty "thin", in terms of
>> methods... By the description it sounds as though it should have some
>> method like getIndexes(), and maybe getMusicShape(), but it only
>> offers toString(). So I'm really not sure how I'd make use of it.
>>
>> I'll keep poking away at the docs, but if anybody can help get me out
>> of the woods - just by pointing me in the right direction - I'd
>> appreciate it.
>>
>> cheers,
>>
>> J.
>>
>>
>> On 14-Jul-08, at 9:06 AM, jmsl at music.columbia.edu wrote:
>>
>>> Hi All,
>>>
>>> I'm new to JMSL and just wondering how to start playback from a given
>>> point in time.
>>> I have a Player with n MusicShapes, but I'd like to be able to start
>>> playback from an arbitrary point along those n sequences - is this
>>> possible? Can I, for example, start from an arbitrary point using a
>>> timestamp? Just like a basic play cursor in a sequencer.
>>>
>>> thanks,
>>>
>>> J.
>>> _______________________________________________
>>> jmsl mailing list
>>> jmsl at music.columbia.edu
>>> http://music.columbia.edu/mailman/listinfo/jmsl
>>
>> _______________________________________________
>> jmsl mailing list
>> jmsl at music.columbia.edu
>> http://music.columbia.edu/mailman/listinfo/jmsl
> _______________________________________________
> jmsl mailing list
> jmsl at music.columbia.edu
> http://music.columbia.edu/mailman/listinfo/jmsl



More information about the jmsl mailing list