controller lines

From: Steven Curtin (sdcurtin@lucent.com)
Date: Tue Jun 09 1998 - 16:46:55 EDT


Hello again-

I've been trying out controller lines in the following orc/score:

global {
  srate 8000;
  krate 200;
  outchannels 2;

  table t(harm,2048,1.0);
  table pan(harm,2048,1.0);
  ksig sinefreq;

}

instr tone(cfreq,amp,porttime,panpos) {
  asig vibfreq,a,b,aleft,aright,seqcv,seqcv2;
  ksig env,locsig,kfreq,kpfreq,portpos,cpanpos;
  imports table t, pan;
  imports ksig sinefreq;
  portpos = port(panpos,0.01);
  kfreq = sinefreq + cfreq;
  kpfreq = port(kfreq,porttime);
  a = oscil(t,kpfreq) * amp;
  // scan first quarter of sine table for pan
  aleft = tableread(pan,portpos * 512) * a;
  aright = tableread(pan,(1-portpos) * 512) * a;
  output(aleft,aright);
  }

instr freq_control(cfreq,amp) {
  exports ksig sinefreq;
  
  sinefreq = cfreq;
  }

n1: 0.0 tone 5.0 100 0.25 0.01 0.25
n2: 1.0 tone 5.0 200 0.25 0.02 0.75
n3: 3.0 tone 5.0 300 0.25 0.03 0.1
n4: 5.5 tone 2.5 400 0.25 0.04 1.0
0.0 freq_control 0.1 300 0.5
2.0 freq_control 0.1 400 0.5
3.0 freq_control 0.1 200 0.5
5.0 freq_control 0.1 500 0.5
10.0 freq_control 0.1 200 0.5
 1.0 n1 control cpanpos 0.5
 3.0 n1 control cpanpos 0.7
10.0 end

For some reason I get the message

Warning: no such control 'cpanpos', or unused in instrument.

or

Warning: no such control 'panpos', or unused in instrument.

if I just use 1.0 n1 control panpos 0.5.

Why doesn't this work? Is there some special declaration of a variable
needed? The documentation implies that any variable or initializer is
fair game. Also what type are the implicit variables at the top of an
instrument such as cfreq in the tone() instrument? I assume they're I or
maybe K values. Thanks!

Steve C

--------------------------------------------------------------
Steven Curtin
http://www.emf.org/people_curtin.html
Lucent Technologies - Bell Labs Innovations
rm. 3C-208, 200 Laurel Ave S
Middletown, NJ 07748-4801 U S A
ph: (732)957-2996 fax: (732)957-6878
--------------------------------------------------------------



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