Csound Csound-dev Csound-tekno Search About

[Csnd] Re: Re: The event opcode with "e"

Date2008-02-08 00:24
From"Art Hunkins"
Subject[Csnd] Re: Re: The event opcode with "e"
OK, I see. (Things are seldom as they seem ...)

"Time" is clearly "start time" or p2 - which never even occurred to me as it 
has no relevence in live performance. So the optional parameter has no real 
function in live performance.

I also fail to see any real use for "time" as an optional parameter in event 
"e". Given this situation, it is even *more* confusing that the required 
format for event includes the two parameters of 0.

It's "features" like this that can make Csound "opaque" to ordinary mortals. 
I *certainly* suggest that the two 0's be eliminated as requirements for 
event "e" and the event "e" doc clarified to say that no parameters are 
allowed. Could some developer take care of this? (I think this is what Matt 
has been requesting for some time too now.)

Yes, the e statement doc does need clarification. Anthony, I suggest you 
submit a change. I'd only like a "note" to the effect that "the 'time' 
parameter is inapplicable in realtime as part of the event 'e' opcode."

As for me, meanwhile, I'll take exitnow.

Art Hunkins

----- Original Message ----- 
From: "Anthony Kozar" 
To: 
Sent: Thursday, February 07, 2008 5:58 PM
Subject: [Csnd] Re: "Abort" Command?


> Art Hunkins wrote on 2/6/08 6:17 AM:
>
>> Such "extra time before actual abort" is consistent with the performance 
>> of
>> "time" for the e statement:
>> "The first p-field time determines the extra time (in seconds) to be 
>> given
>> to the performance after the actual e statement takes effect."
>
> My point was that the above quotation from the manual is wrong -- that is
> not how the optional "time" parameter works.
>
>> So, IMO, the "time" parameter does make sense with the event opcode 
>> (though
>> not in the context I am working with).
>
> I am not so sure that it does.  Let me explain how the "time" parameter is
> implemented.  When you end your score file with
>
> e 20.0
>
> Csound expands this to
>
> f0 20.0
> e
>
> in the sorted score.  So, this is just a "convenience" feature in the
> unsorted score syntax.  I requested that the feature be added because 
> using
> the "f0" statement to extend a section is unobvious and not as logical as
> simply specifying the end time of the section in the "s" or "e" statement.
> (It works for "s" statements too).
>
> The second important thing to understand here is that Csound has _two_ 
> score
> parsers.  The first one ("sread") reads the unsorted score, expands 
> macros,
> evaluates expressions, carries pfields, sorts the events, tempo warps
> everything, fills in ramps, and finally writes out the sorted score to
> "score.srt" or a temporary file.
>
> The second score parser ("rdscor") reads the sorted score back in for
> performance.  It expects to find only i, f, s, e, t, and "w" statements in
> the score -- because those are the only events that the orchestra actually
> understands -- and it knows nothing about macros, expressions, carry, etc.
> And as far as rdscor is concerned, the "e" and "s" statements have no
> parameters.
>
> The "event" opcode only supports select score statements for much the same
> reason that rdscor does.  And so this is sort of why it does not support 
> the
> "time" parameter for "e".  This is not to say that it could not be
> implemented somehow, but there is a "precedent" for the behavior.
>
> I guess the important question is whether anything is really gained by
> changing how "e" works with "event" or should we just document the
> difference?
>
> Anthony
>
>>> Art Hunkins wrote on 2/5/08 11:19 PM:
>>>
>>>> Developers:
>>>> I'd like to request that someone fix event for the "e" case. The
>>>> parameters
>>>> are different for (score event) e. The single and *optional* parameter
>>>> should be time (as with e). Unfortunately, this parameter (for event 
>>>> "e")
>>>> does not work to delay the "abort", so that currently "abort" is always
>>>> immediate.
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
> csound" 


Date2008-02-08 03:14
FromAnthony Kozar
Subject[Csnd] Re: The event opcode with "e"
Art Hunkins wrote on 2/7/08 7:24 PM:

> "Time" is clearly "start time" or p2 - which never even occurred to me as it
> has no relevence in live performance. So the optional parameter has no real
> function in live performance.

Yes.  And I do sometimes wish that "time" had been p2 instead of p1 to make
that clearer ...

> I also fail to see any real use for "time" as an optional parameter in event
> "e". Given this situation, it is even *more* confusing that the required
> format for event includes the two parameters of 0.

>From what I can tell, the "event" opcode has four required parameters
regardless of what the first parameter is.  This decision was probably made
because "f" and "i" require at least three pfields.  I don't know if "e" was
allowed or not when "event" was first written.  The requirement for "e"
could probably be lifted by making the 2nd-4th parameters optional and
adding init-time code to check that there are enough parameters for "i" and
"f". 

> It's "features" like this that can make Csound "opaque" to ordinary mortals.

A problem of "design by accretion".

> I *certainly* suggest that the two 0's be eliminated as requirements for
> event "e" and the event "e" doc clarified to say that no parameters are
> allowed. Could some developer take care of this? (I think this is what Matt
> has been requesting for some time too now.)

More like "all parameters are ignored" for "e" but this could be done, I
think.
 
> Yes, the e statement doc does need clarification. Anthony, I suggest you
> submit a change. I'd only like a "note" to the effect that "the 'time'
> parameter is inapplicable in realtime as part of the event 'e' opcode."

I will try to take another stab at improving the docs for the next release.

Anthony