saolc problem

From: Koen Dejonghe (koen_dejonghe@yahoo.com)
Date: Tue Sep 29 1998 - 02:41:22 EDT


Hi,

I downloaded the sources and built saolc in Visual C++ 5.0 on NT 4.0,
and it looked ok at first sight.

When I run saolc on the attached orc&sco I get the following output:

Read global block.
Read opcode linen.
Read instr toot4.
Read opcode my_chorus.
Read 3 score events.

Unhandled Exception in saolc.exe: Access violation

When debugging the application I find that the error is generated by

int get_table_size(table_storage *t) {
   return(t->size);
}

in saol_tables.c. The value of t appears to be 0.

Now I first would like to know how I should write my orc&sco's before
making changes to the source of saolc.

Thanks.

//Score
   0.0 toot4 1 75 8.04 0.1
         10 end

//Orchestra

global {
  srate 16000;
  krate 1000;
  outchannels 1;

  table ftSine(harm,4096,1);
}

kopcode linen(ivar fMax, ivar fAtt, ivar fDur, ivar fRel) {
  return(kline(0, fAtt, fMax, fDur - fAtt - fRel, fMax, fRel, 0));
}

instr toot4(fStart,
            fDur,
            fAmp,
            fFreq,
            fAtt,
            fRel)
{
  ivar fDb, fScale;
  ksig cEnv;
  
  fDb = ampdb(fAmp);
  fScale = fDb * 0.333; // could just be fScale = ampdb(fAmp) * 0.333;

  cEnv = linen(fScale, fAtt, fDur, fRel);
  
  output(my_chorus(cEnv,fFreq));
}

aopcode my_chorus(ksig cSig, ivar fFreq) {
  ivar fNote;
  asig a1, a2, a3;
  imports table ftSine;

  fNote = cpspch(fFreq);
  a1 = oscil(ftSine, fNote) * cSig;
  a2 = oscil(ftSine, fNote * 0.996) * cSig;
  a3 = oscil(ftSine, fNote * 1.004) * cSig;

  return(a1 + a2 + a3);
}

==
Koen Dejonghe
QAD Service Line
Origin International Competences & Alliances
http://www.origin-it.com
+32 2 712 3668

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com



This archive was generated by hypermail 2b29 : Mon Jan 28 2002 - 11:46:33 EST