Csound Csound-dev Csound-tekno Search About

[Cs-dev] loop syntax

Date2011-06-13 17:28
FromJohn ff
Subject[Cs-dev] loop syntax
Having a few minutes idle I started thinking about a loop construct.
Use of the keyword "while" is not on as it clashes with w-signals
(unfortunately) so I was suggesting

until ka<0 do
  ....
endloop

That also has the advantage for me of avoiding the ambiguity in my
native dialect between while and until (!).  So if one does that what
should be semantics be?  Loop body at k-rate?  What about i-rate
loops?  Should it depend on conditional?

==John ffitch

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2011-06-13 19:29
FromSteven Yi
SubjectRe: [Cs-dev] loop syntax
Hi John,

I don't see a problem with using "while" as it should take precedence
over w.* no in the parser?  We do have if's and i-vars without
problems. I think it'd be better to use while if possible, and rate
should be determined by the conditional to match if- behavior.

steven



On Mon, Jun 13, 2011 at 12:28 PM, John ff  wrote:
> Having a few minutes idle I started thinking about a loop construct.
> Use of the keyword "while" is not on as it clashes with w-signals
> (unfortunately) so I was suggesting
>
> until ka<0 do
>  ....
> endloop
>
> That also has the advantage for me of avoiding the ambiguity in my
> native dialect between while and until (!).  So if one does that what
> should be semantics be?  Loop body at k-rate?  What about i-rate
> loops?  Should it depend on conditional?
>
> ==John ffitch
>
> ------------------------------------------------------------------------------
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2011-06-13 22:20
Fromjoachim heintz
SubjectRe: [Cs-dev] loop syntax
what about "enduntil" instead of "endloop" (similar to endif)? perhaps
there will be other loop constructions in the future like for-endfor.
i-rate loops depending on the conditional makes sense for me and is
consistent with the behaviour in the if...endif or the loop_lt etc
constructions.

	joachim


Am 13.06.2011 18:28, schrieb John ff:
> Having a few minutes idle I started thinking about a loop construct.
> Use of the keyword "while" is not on as it clashes with w-signals
> (unfortunately) so I was suggesting
> 
> until ka<0 do
>   ....
> endloop
> 
> That also has the advantage for me of avoiding the ambiguity in my
> native dialect between while and until (!).  So if one does that what
> should be semantics be?  Loop body at k-rate?  What about i-rate
> loops?  Should it depend on conditional?
> 
> ==John ffitch
> 
> ------------------------------------------------------------------------------
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2011-06-14 11:03
Fromjohn ffitch
SubjectRe: [Cs-dev] loop syntax
>>>>> "Steven" == Steven Yi  writes:

 Steven> Hi John,
 Steven> I don't see a problem with using "while" as it should take precedence
 Steven> over w.* no in the parser?  We do have if's and i-vars without
 Steven> problems. I think it'd be better to use while if possible, and rate
 Steven> should be determined by the conditional to match if- behavior.

It is not the precedence, but the backward compatability.  I guess
that most people have never used a w-variable so it is unlikely to
cause problems at that level.  I still have trouble with the word
"while" which is ambiguous in the dialect of my grandparents, as in
"Wait here while I get back".  For that reason I prefer until, and
also due to the sense of the jump, until is more efficient.

Anyway I will continue with the framework for my education.  btw how
does it fare against the loop opcodes?

==John ffitch

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net