[CSOUND-DEV:4859] m and n score statements broken
Date | 2004-07-01 01:11 |
From | Anthony Kozar |
Subject | [CSOUND-DEV:4859] m and n score statements broken |
I have confirmed that the m and n score statements (mark and repeat marked section) are not working in the latest canonical (4.23f11). As far as I can tell, typical usage of these statements will cause Csound to go into a loop of reopening the score file at the marked position. It no longer returns to after the n-statement when the marked section is finished. (see example from Csound book below which causes an infinite loop on my machine). These changes from the Change Log seems to be responsible: 2003-02-16 * version.h (VERSION): 4.23f01 * sread.c (sread_init): new function to separate include files from sections (sread): Removed resetting of str and the unwinding after section ends * scsort.c (scsort): Call sread-init Of course, reversing these changes solves the problem, but there must be some reason that these changes were made. I don't yet understand how we can fix m and n while preserving the intention of this change. One possibility might be to read in the marked section to a string and to revisit it that way instead of reopening the file (like I think macros are done). Does anyone else understand how to fix this? Anthony Kozar anthony.kozar@utoledo.edu http://akozar.spymac.net/ ; 511.sco from "The Csound Book" ; example by John ffitch f1 0 4096 10 1 f2 0 4096 10 10 0 5 0 1 ;1st Verse i511 0 .3 15000 8.00 i511 + . 9000 8.02 i511 + . 12000 8.04 i511 + . 9000 8.00 s m Chorus i512 0 .3 20000 8.07 i512 + . 12000 8.09 i512 + . 18000 8.07 i512 + . 11000 8.05 s ;2nd Verse i511 0 .3 15000 8.04 i511 + . 9000 8.00 i511 + . 12000 8.02 i511 + . 9000 8.00 s n Chorus s ;3rd Verse i511 0 .3 15000 8.04 i511 + . 9000 8.00 i511 + . 12000 8.04 i511 + . 9000 8.05 s n Chorus s ;4th Verse i511 0 .3 15000 8.04 i511 + . 9000 8.04 i511 + . 12000 8.02 i511 + . 9000 8.02 s i511 0 4 15000 8.00 i512 .05 4 10000 7.001 |
Date | 2004-07-01 07:02 |
From | jpff@codemist.co.uk |
Subject | [CSOUND-DEV:4863] Re: m and n score statements broken |
The bug that was fixed was that repeating section involving #include'd code was completely broken, looping in very odd ways. The code was changed in order to overcome this. This rather fills me with terror at the prospect of fixing n/m without reintroducing that bug. ==John ff |
Date | 2004-07-01 08:45 |
From | Anthony Kozar |
Subject | [CSOUND-DEV:4865] Re: m and n score statements broken |
OK. I will continue to ponder how it might be solved without recreating the include problem. Anthony On 7/1/04 2:02 AM, jpff@codemist.co.uk |
Date | 2008-02-21 08:25 |
From | Anthony Kozar |
Subject | Re: [Cs-dev] m and n score statements broken |
Earlier tonight, I committed code that fixes m and n (in ordinary usage -- there are still problems with catching bad input that does bad things). However, looking back through emails from nearly four years ago and re-examining the code from 4.23 and 4.23f01, my "fix" looks very similar to some of the code that was removed to fix the problem cited by John below. I do not understand what the original problem was and I am now afraid of re-introducing it. John, I know it was years ago, but do you happen to still have an example of the input that showed the bug that you fixed as described below. Or can you describe the problem in more detail, please? Thanks. Anthony jpff@codemist.co.uk wrote on 7/1/04 2:02 AM: > The bug that was fixed was that repeating section involving #include'd > code was completely broken, looping in very odd ways. The code was > changed in order to overcome this. This rather fills me with terror > at the prospect of fixing n/m without reintroducing that bug. > ==John ff > Anthony Kozar wrote on 6/30/04 8:11 PM: >> I have confirmed that the m and n score statements (mark and repeat marked >> section) are not working in the latest canonical (4.23f11). >> 2003-02-16 >> * version.h (VERSION): 4.23f01 >> >> * sread.c (sread_init): new function to separate include files >> from sections >> (sread): Removed resetting of str and the unwinding after section >> ends >> >> * scsort.c (scsort): Call sread-init ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |