Csound Csound-dev Csound-tekno Search About

[Cs-dev] false warnings about x score statement

Date2007-01-15 03:52
FromAnthony Kozar
Subject[Cs-dev] false warnings about x score statement
I am getting the following warnings when using an x statement in the score:

sorting score ...
sort: illegal opcode x(78)
swrite: unexpected opcode, section 1 line 3

Here is the score I am using:

f1 0 8192 10 1    ; sine wave
x
i1 0  9  6.00  0.5 0.1   0.3 0.5   0.5 0.6   0.5 0.1
i1 10 9  6.00  0.01 5.0  0.01 5.0  0.5 0.5   0.5 0.5
i1 20 9  6.00  0.5 0.5   0.5 0.5   0.5 1.0   0.5 0.0
s
i1 0 9   6.00  0.5 0.5   0.5 0.5   0.5 0.0   0.5 0.0
i1 10 9  6.00  0.5 0.5   0.5 0.5   0.5 1.0   0.5 0.0
i1 20 9  6.00  0.5 0.5   0.5 0.5   0.5 1.0   0.5 1.0
i1 30 9  6.00  0.5 0.5   0.5 0.5   0.5 0.0   0.5 1.0


The x statement is working correctly but it seems to cause the warnings
because it is included in the later stages of score sorting when it should
not be.  These warnings are present in 5.00 and later but not in 4.23f12.

The problem seems to be coming from sread() but I cannot fully debug this
because all of the sread globals are now in a struct referenced as void* in
CSOUND (And the debugger doesn't recognize the real type since it is in a
shared library).  Here is the code that I suspect.

      case 'x':                         /* Skip section */
        while (1) {
          switch (ST(op) = getop(csound)) {
          case 's':
          case 'r':
          case 'm':
          case 'e':
            salcblk(csound);            /* place op, blank into text    */
            goto again;
          case EOF:
            goto ending;
          default:
            flushlin(csound);
          }
        }

Before the change to using csound-> everywhere, it used to read:

          switch(op = getop()) {
          case 's':
          case 'r':
          case 'm':
          case 'e':
            *(nxp-2) = op;             /* place op, blank into text    */
            goto again;
          case EOF:
            *(nxp-2) = 'e';
            goto ending;


Sorry that I don't have a fix to commit.  I may need to try linking Csound
as a static library to see if I can overcome the limitations of my debugging
environment.

Anthony Kozar
anthonykozar AT sbcglobal DOT net
http://anthonykozar.net/



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net