> Looking at the spec, it would appear that this parameter can be of any
> rate. So why am I getting an error.
What I believe is going on here is that kline's dur and x parameters
need to be i-rate. However:
eg = kline[stage](1,tableread(rates, stage) * ratescale , 0)
The expression:
tableread(rates, stage) * ratescale
is krate.
Rewriting this to make the expression i-rate is going to be
non-trivial ... perhaps the easiest thing to do is to make
an ivar formal parameter to eg_table, i.e.
kopcode eg_table(ksig release, ksig ratescale, table rates, table
levels, ivar decaylen) {
and then do:
eg = ((kline[stage](1,decaylen,0)) * ...
And compute the value of decaylen from the calling instr, at i-rate.
If it turns out you can't compute the value of decaylen at i-rate,
you could rely on this trick:
instr foo () {
ivar decay[1];
ksig dummy, decval;
decval = // compute value at k-rate
decay[dummy] = decval; // runs at k-rate
eg_table( ..., decay[0]);
> I included the opcode code that I wrote, I indicated where the error is
> in the code. This does not make any sense to me, it worked fine when it
> was using distinct opcode calls instead of the oparray.
Probably an sfront bug, in that it didn't report the error for your original
code. If you still have it, send me along the version sfront was happy
with, and I'll try to track it down (actually, it sounds vaguely like a
bug Richard Dobson just caught in sfront a few days ago, so it might be
already fixed in my internal version ....),
--jl
-------------------------------------------------------------------------
John Lazzaro -- Research Specialist -- CS Division -- EECS -- UC Berkeley
lazzaro [at] cs [dot] berkeley [dot] edu www.cs.berkeley.edu/~lazzaro
-------------------------------------------------------------------------
This archive was generated by hypermail 2b29 : Mon Jan 28 2002 - 12:03:57 EST