Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] csoundRewind() ?

Date2005-05-07 21:54
FromVictor Lazzarini
SubjectRe: [Cs-dev] csoundRewind() ?
I tried using the functions in the order you show, but
with no luck. I lost my patience and implemented the
rewinding using csoundReset() and csoundCompile()
again.

I also could not manage to get the score offset setting
function to work. Otherwise, the API is brilliant.

Victor

>
> I haven't tested score rewinding since Istvan introduced
> many changes, but here's how it's supposed to be used
> (CppSound is a C++ wrapper for the Csound API):
>
> void CsoundVST::synchronizeScore()
> {
>   vstPriorSamplePosition = vstCurrentSamplePosition;
>   VstTimeInfo *vstTimeInfo = getTimeInfo(0);
>   vstSr = double(vstTimeInfo->sampleRate);
>   vstCurrentSamplePosition = (int) vstTimeInfo->samplePos;
>   vstCurrentSampleBlockStart = vstTimeInfo->samplePos /
> vstSr;
>   if((vstCurrentSamplePosition && !vstPriorSamplePosition)
> ||
>      (vstCurrentSamplePosition < vstPriorSamplePosition))
>     {
>       if(getCppSound()->getIsGo())
>     {
>       getCppSound()->setScorePending(1);
>       getCppSound()->rewindScore();
>
> getCppSound()->setScoreOffsetSeconds(vstCurrentSampleBlock
> Start);
>       csound::System::inform("Score synchronized at
> %f...\n", vstCurrentSampleBlockStart);
>     }
>     }
> }
>
>
> -----Original Message-----
> From: Victor Lazzarini 
> Sent: May 7, 2005 9:29 AM
> To: csound-devel@lists.sourceforge.net
> Subject: [Cs-dev] csoundRewind() ?
>
> I'm having trouble with csoundRewind(). I expected that
> it would rewind a compiled score back to the beginning
> and then the next call to csoundPerformKsmps() would start
> playing it.
>
> But after I call it, csoundPerformKsmps() doesn't budge.
> Everything
> else around it seems to be working, because if I send an
> event to csound, then csoundPerformKsmps() plays it.
>
> Is there anything else I should do to start the score
> performance?
> Of course I could call csoundReset() and do
> csoundCompile() again, but that's not very elegant.
>
> Apart from that csoundapi~ is going well; I've just got to
> implement the invalue/outvalue interface before a beta
> release. Compiles and runs with libcsound 5 and 4.23;
> next week at work I'll try it on Linux, which should
> offers the
> best cs5  performance.
>
> Victor
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: NEC IT Guy Games.
> Get your fingers limbered up and give it your best shot. 4
> great events, 4 opportunities to win big! Highest score
> wins.NEC IT Guy Games. Play to win an NEC 61 plasma
> display. Visit http://www.necitguy.com/?r=20
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: NEC IT Guy Games.
> Get your fingers limbered up and give it your best shot. 4
> great events, 4 opportunities to win big! Highest score
> wins.NEC IT Guy Games. Play to win an NEC 61 plasma
> display. Visit http://www.necitguy.com/?r=20
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-05-08 20:33
FromIstvan Varga
SubjectRe: [Cs-dev] csoundRewind() ?
Victor Lazzarini wrote:

> I tried using the functions in the order you show, but
> with no luck. I lost my patience and implemented the
> rewinding using csoundReset() and csoundCompile()
> again.
> 
> I also could not manage to get the score offset setting
> function to work. Otherwise, the API is brilliant.

Rewinding and score offset seem to work now, both for score and
MIDI files (although not extensively tested).
I still do not have any idea about the "score pending" functions.


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net