csoundRewindScore does: fseek(((ENVIRON *)csound)->scfp_, 0, SEEK_SET); but I guess performance is done after parsing and loading the score so perhaps this should be called before that. Am I wrong? Also, csoundScoreOffsetSeconds only affects a static variable in csound.c static MYFLT csoundScoreOffsetSeconds_ = (MYFLT) 0.0; PUBLIC void csoundReset(void *csound) { .... csoundScoreOffsetSeconds_ = (MYFLT) 0.0; } PUBLIC void csoundSetScoreOffsetSeconds(void *csound, MYFLT offset) { csoundScoreOffsetSeconds_ = offset; } PUBLIC MYFLT csoundGetScoreOffsetSeconds(void *csound) { return csoundScoreOffsetSeconds_; } so it's not a suprise that it wasn't forwarding my score. Are there another ways to achieve the same? Is this planned for the future? My goal is to synchronize a timeline in a UI with csound performance, allowing rewind, forwarding, etc. Thank you in advance, Carlos > It may be that these functions only work for VST hosts. I'll look into it and change it if possible. > > -----Original Message----- > From: Carlos Pita > Sent: Mar 11, 2005 5:32 AM > To: csound-devel@lists.sourceforge.net > Subject: [Cs-dev] Can't rewind the score > > Hi! > > I can neither advance nor rewind the score from the csound API. > In the following example, soundSetScoreOffsetSeconds > and csoundRewindScore do nothing, I mean the score is > performed from beginning to end just one time. I've also > tried setting csoundSetScorePending to 1 although I don't > understand very well which is the point of this function. > Anyway, the results are the same. What am I doing wrong? > > Thank you in advance, > Carlos > > test.c ----------------------------------------------------------------------------------- > > #include > > int main() > { > char *argv[] = { "csound", "-d", "-o", "dac", "test.orc", "test.sco" }; > int argc = 6; > > void *csound = csoundCreate(0); > csoundCompile(csound, argc, argv); > > csoundSetScoreOffsetSeconds(csound, 1); > while(!csoundPerformKsmps(csound)) { > if(csoundGetScoreTime(csound) > 6) break; > } > csoundRewindScore(csound); > while(!csoundPerformKsmps(csound)); > > csoundDestroy(csound); > > return 0; > } > > > test.orc -------------------------------------------------------------------------------- > > sr = 44100 > kr = 4410 > ksmps = 10 > nchnls = 1 > > instr 1 > > a1 oscil 10000, p4, 1 > out a1 > > endin > > test.sco ------------------------------------------------------------------------------ > > f 1 0 4096 10 1 > > i1 0 1 440 > i1 2 1 660 > i1 4 1 880 > > e > > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Csound-devel mailing list > Csound-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/csound-devel > > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Csound-devel mailing list > Csound-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/csound-devel > ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net