Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] Score Rewinding

Date2005-05-12 03:22
From"Michael Gogins"
SubjectRe: [Cs-dev] Score Rewinding
I have updated the comments in csound.h to clarify the original and intended 
behavior of csoundSetScoreOffsetSeconds and csoundSetScorePending.

I have tested the latest code, and I found that the "a" event implementation 
now works better, at least in Cubase. However, it is still not quite 
correct. The problem is as follows:

I set up a Csound score to perform in Cubase, with a loop from 5 through 10 
seconds.

Performing from 0, to the end of the loop, and looping any number of times 
between 5 and 10 worked correctly.

However, first pausing the performance, then restarting it, caused the 
performance to begin at time 0 in the host with the score advanced to time 
5, but when the loop jumps back to the time 5, the time is correct again.

Also, I found that my score pending update was removed, so I put it back, 
with a change to not mute score events that are realtime events. This seems 
to work in Cubase. Istvan, do you think this will work in other contexts?

I am quite willing to rename these API functions to make their intended 
function clearer. How about:

csoundSetScoreStartTime instead of csoundSetScoreOffsetSeconds,

and

csoundMuteScore instead of csoundSetScorePending?

Regards,
Mike

----- Original Message ----- 
From: "Istvan Varga" 
To: 
Sent: Wednesday, May 11, 2005 11:04 AM
Subject: Re: [Cs-dev] Score Rewinding


> Michael Gogins wrote:
>
>> What was wrong with the 'a' event is that it did not produce
> > the proper behavior when I tested it. If you can get it to produce
> > the proper behavior, I'll be happy to put the 'a' event back, since
> > I do understand what you are saying about MIDI files.
>
> You still did not describe what the expected "proper behavior" is in the
> context of the API (and not Cubase and CsoundVST of which I use neither).
> However, I guess that while skipping time you do not want the perform
> functions to return for every single skipped frame. So, I reverted to the
> old code, but changed csoundPerformKsmps and related functions to not 
> return
> until the advance is complete and the requested time is reached.
>
>> As for pause or mute, in this context they are functionally equivalent,
>
> No, an API call should do what it is documented and expected to do,
> and not just what is functionally equivalent for a single specific host
> application. It may very well make sense to have a function that mutes
> notes in this particular way, but then it would better be named something
> like csoundMuteNonMIDINotes().
>
>> Of course, my approach has the advantage of being brain-dead simple and
> > apparently lackiing side effects.
>
> It also mutes all non-MIDI real time events (line events, event, 
> schedkwhen, etc.).
> Does that count as a side effect ?
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by Oracle Space Sweepstakes
> Want to be the first software developer in space?
> Enter now for the Oracle Space Sweepstakes!
> http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 




-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-05-12 11:41
FromIstvan Varga
SubjectRe: [Cs-dev] Score Rewinding
Michael Gogins wrote:

> I have updated the comments in csound.h to clarify the original and 
> intended behavior of csoundSetScoreOffsetSeconds and csoundSetScorePending.

I cannot see any changes, and SF is down for at least 13 hours now.

> However, first pausing the performance, then restarting it, caused the 
> performance to begin at time 0 in the host with the score advanced to 
> time 5, but when the loop jumps back to the time 5, the time is correct 
> again.

This coule be explained better. I do not use Cubase or CsoundVST, nor do I
have any idea about how pausing and restarting the performance is implemented
by CsoundVST.

> Also, I found that my score pending update was removed, so I put it 
> back, with a change to not mute score events that are realtime events. 
> This seems to work in Cubase. Istvan, do you think this will work in 
> other contexts?
> 
> I am quite willing to rename these API functions to make their intended 
> function clearer. How about:
> 
> csoundSetScoreStartTime instead of csoundSetScoreOffsetSeconds,
> 
> and
> 
> csoundMuteScore instead of csoundSetScorePending?

I removed the change exactly because its purpose is not sufficiently well
defined yet. Issues like this should be discussed first rather than trying
to hack a quick solution. The event system in Csound is much too crippled
already with arcane, vaguely defined, and partly or not at all working
"features" (one example is "beat mode" which would better be removed), and
adding more without making all details clear first is not a good thing.


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net