Hi Rory, I think there must be an issue when you change your comparison against the 10 (constant) to the khrm (k-rate) that the type of goto must be changing. Could you do a test making khrm as ihrm to see if that works? steven On Mon, Nov 24, 2008 at 8:30 AM, Rory Walsh wrote: > One of my students was asking if there is a version of the the buzz > opcode that has a fade-in for each harmonic so that pops do not occur > in the output. I didn't know if there was and couldn't find on in the > manual so I set about doing a simple UDO for him. Here's what I have, > the problem is explained below: > > opcode testBuzz, a, kikip > kamp, ifreq, khrm, ifn, icnt xin ; read input parameters > if (icnt >= 10) goto skip > kenv linseg 0, 0.1, 1, 1, 1 > a1 testBuzz kamp*kenv, ifreq, khrm, ifn, icnt+1 > skip: > aout oscil kamp/khrm, ifreq*icnt, ifn > xout (aout+a1) ; write output > endop > > The problem is that if I use khrm instead of 10 in my test against > icnt, csound will baulks out at init-time. Any suggestions as how can > I do this? I'm trying to use that hkrm value toset the number of > harmonics. > > Rory. > > > Send bugs reports to this list. > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" >