Splicing sections

View: New views
3 Messages — Rating Filter:   Alert me  

Splicing sections

by Ross Mohn-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm trying to do what I think should be a simple task, but I can't seem
to get my head around it. I'm probably missing the obvious.

I have a piece with a couple of introductory sections, then the main
part, and finally the conclusion. Each is defined in a separate function
with its own _process_ statement (Lisp, not SAL). How do I easily splice
these together end-to-end. Does the absolute time parameter to _now_
help me? I'd rather not have to calculate the elapsed score time
manually. Do I have to keep track of it in a global variable?

Thanks -Ross

_______________________________________________
Cmdist mailing list
Cmdist@...
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist

Re: Splicing sections

by Heinrich Taube :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

it sounds like you are using cm2 so ill assume that in this  
answer...first, if you know how long the sections are ahead of time  
then you can simply start them at the appropriate times, say 0 30 90:

(events (list (intro) (main) (conclusion))
        "foo.mid"
         '(0 30 90))

if you dont knwo how long they last you can use the 'finally' statment  
to chain them:

(defun intro ()
   (process ...
            output ...
            finally (sprout (main) :at (now))))

(defun main ()
   (process ...
            output
            finally (sprout (conclusion ) :at (now))))

(events (intro)
         "foo.mid"
         0)


hope this helps!


On Sep 10, 2008, at 2:14 PM, Ross Mohn wrote:

> I'm trying to do what I think should be a simple task, but I can't  
> seem
> to get my head around it. I'm probably missing the obvious.
>
> I have a piece with a couple of introductory sections, then the main
> part, and finally the conclusion. Each is defined in a separate  
> function
> with its own _process_ statement (Lisp, not SAL). How do I easily  
> splice
> these together end-to-end. Does the absolute time parameter to _now_
> help me? I'd rather not have to calculate the elapsed score time
> manually. Do I have to keep track of it in a global variable?
>
> Thanks -Ross
>
> _______________________________________________
> Cmdist mailing list
> Cmdist@...
> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist

_______________________________________________
Cmdist mailing list
Cmdist@...
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist

Re: Splicing sections

by Ross Mohn-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, both answers are exactly what I needed to know! The daisy-chaining
ability of the 'finally' statement is what I need now.

Thanks much!!
-Ross


On Wed, Sep 10, 2008 at 02:43:57PM -0500, Heinrich Taube wrote:

> it sounds like you are using cm2 so ill assume that in this answer...first,
> if you know how long the sections are ahead of time then you can simply
> start them at the appropriate times, say 0 30 90:
>
> (events (list (intro) (main) (conclusion))
> "foo.mid"
>         '(0 30 90))
>
> if you dont knwo how long they last you can use the 'finally' statment to
> chain them:
>
> (defun intro ()
>   (process ...
>            output ...
>            finally (sprout (main) :at (now))))
>
> (defun main ()
>   (process ...
>            output
>            finally (sprout (conclusion ) :at (now))))
>
> (events (intro)
>         "foo.mid"
>         0)
>
>
> hope this helps!
>
>
> On Sep 10, 2008, at 2:14 PM, Ross Mohn wrote:
>
>> I'm trying to do what I think should be a simple task, but I can't seem
>> to get my head around it. I'm probably missing the obvious.
>>
>> I have a piece with a couple of introductory sections, then the main
>> part, and finally the conclusion. Each is defined in a separate function
>> with its own _process_ statement (Lisp, not SAL). How do I easily splice
>> these together end-to-end. Does the absolute time parameter to _now_
>> help me? I'd rather not have to calculate the elapsed score time
>> manually. Do I have to keep track of it in a global variable?
>>
>> Thanks -Ross
>>
>> _______________________________________________
>> Cmdist mailing list
>> Cmdist@...
>> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
>

_______________________________________________
Cmdist mailing list
Cmdist@...
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
LightInTheBox - Buy quality products at wholesale price!