Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] Beat mode (-t flag)

Date2005-06-12 17:44
FromMichael Gogins
SubjectRe: [Cs-dev] Beat mode (-t flag)
I don't think it would be impossible to implement beat mode with changing tempos in real time. 

No doubt the existing implementation would need to be changed, but difference equations of the right kind ought to do it. Assuming that we are concerned only with the first and second derivatives of time, a delta-time and a delta-delta time can be used to increment the score pointer. Change in tempo would change delta-time, and change in rate of change of tempo would change delta delta-time.

The implementation changes would require comparing the elapsed times of each running instance to the beat time at each kperiod, and updating the elapsed times with the deltas.
 
Probably I am missing some difficulty because I haven't examined or worked with the code in detail -- but what is it?

Regards,
Mike

-----Original Message-----
From: Istvan Varga 
Sent: Jun 12, 2005 5:04 AM
To: csound-devel@lists.sourceforge.net
Subject: Re: [Cs-dev] Beat mode (-t flag)

vanDongen/Gilcher wrote:

> For complete flexibility I guess the design would be to only time-order the 
> score at the beginningof the performance , and do the time-warping during 
> performance.

Note that a note is expected to know its duration in seconds (p3) at
initialization time. This is not possible if the time warping is only
done at performance time (as the duration of the note may very well
change with the tempo while it is already playing); one of the reasons
I wanted to remove "beat mode" is that it is impossible to implement
correctly, for - among others - the above problem.


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: 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.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-06-12 18:39
FromIstvan Varga
SubjectRe: [Cs-dev] Beat mode (-t flag)
Michael Gogins wrote:

> I don't think it would be impossible to implement beat mode
 > with changing tempos in real time.
> 
> No doubt the existing implementation would need to be changed,
 > but difference equations of the right kind ought to do it.
 > Assuming that we are concerned only with the first and second
 > derivatives of time, a delta-time and a delta-delta time can be
 > used to increment the score pointer. Change in tempo would change
 > delta-time, and change in rate of change of tempo would change
 > delta delta-time.
> 
> The implementation changes would require comparing the elapsed times
 > of each running instance to the beat time at each kperiod, and updating
 > the elapsed times with the deltas.

Instruments are expected to know the note duration in seconds (p3)
already at initialization time. If the tempo can be changed with
real time events at a later point in time, it is not possible to
calculate the duration that depends on events in the future.


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-06-12 23:28
FromIain Duncan
SubjectRe: [Cs-dev] Beat mode (-t flag)
 From my experience with tempo stuff in a live situation, I'd like to 
say that I think this really would be worth figuring out how to 
implement properly.

Thanks
Iain

Michael Gogins wrote:
> I don't think it would be impossible to implement beat mode with changing tempos in real time. 
> 
> No doubt the existing implementation would need to be changed, but difference equations of the right kind ought to do it. Assuming that we are concerned only with the first and second derivatives of time, a delta-time and a delta-delta time can be used to increment the score pointer. Change in tempo would change delta-time, and change in rate of change of tempo would change delta delta-time.
> 
> The implementation changes would require comparing the elapsed times of each running instance to the beat time at each kperiod, and updating the elapsed times with the deltas.
>  
> Probably I am missing some difficulty because I haven't examined or worked with the code in detail -- but what is it?
> 
> Regards,
> Mike
> 
> -----Original Message-----
> From: Istvan Varga 
> Sent: Jun 12, 2005 5:04 AM
> To: csound-devel@lists.sourceforge.net
> Subject: Re: [Cs-dev] Beat mode (-t flag)
> 
> vanDongen/Gilcher wrote:
> 
> 
>>For complete flexibility I guess the design would be to only time-order the 
>>score at the beginningof the performance , and do the time-warping during 
>>performance.
> 
> 
> Note that a note is expected to know its duration in seconds (p3) at
> initialization time. This is not possible if the time warping is only
> done at performance time (as the duration of the note may very well
> change with the tempo while it is already playing); one of the reasons
> I wanted to remove "beat mode" is that it is impossible to implement
> correctly, for - among others - the above problem.
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
> a projector? How fast can you ride your desk chair down the office luge track?
> If you want to score the big prize, get to know the little guy.  
> Play to win an NEC 61" plasma display: 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.  How far can you shotput
> a projector? How fast can you ride your desk chair down the office luge track?
> If you want to score the big prize, get to know the little guy.  
> Play to win an NEC 61" plasma display: 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.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-06-13 08:59
From"gerard van dongen"
SubjectRe: [Cs-dev] Beat mode (-t flag)
On Sun, 12 Jun 2005 19:39:12 +0200, Istvan Varga   
wrote:

> Instruments are expected to know the note duration in seconds (p3)
> already at initialization time. If the tempo can be changed with
> real time events at a later point in time, it is not possible to
> calculate the duration that depends on events in the future.

My understanding was always that p3 is the score time in beats. Defaulting  
to 1 beat == 1 second.
At least for the unsorted input score.

G


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-06-13 11:59
FromIstvan Varga
SubjectRe: [Cs-dev] Beat mode (-t flag)
gerard van dongen wrote:

> My understanding was always that p3 is the score time in beats. 
> Defaulting  to 1 beat == 1 second.
> At least for the unsorted input score.

No, for the orchestra, p3 is always in seconds. In "beat mode" there
is some code that attempts to convert the beat value using the current
tempo, both in Csound 4 and 5, making the naive assumption that the tempo
will not change in the future. Of course when it does, the calculated
time value will be wrong.
Note also that "beat mode" can fail and cause weird errors, when used
in combination with multiple sections or real time events (including MIDI).


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-06-13 13:15
From"gerard van dongen"
SubjectRe: [Cs-dev] Beat mode (-t flag)
On Mon, 13 Jun 2005 12:59:29 +0200, Istvan Varga   
wrote:

> gerard van dongen wrote:
>
>> My understanding was always that p3 is the score time in beats.  
>> Defaulting  to 1 beat == 1 second.
>> At least for the unsorted input score.
>
> No, for the orchestra, p3 is always in seconds.


But is in the score file p3 in beats?

If I understand this correctly, fixing the -t flag would require a  
complete reworking of the performance engine and probably all opcodes to  
work with a beat mode instead of (or as well as)  an absolute time mode.
So that :
asig line 0,10,1 would last 10 beats if the -t flag is set.


Now I can see where that is a problem :)

G


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net