I wonder if the problem is that you are getting random numbers that are close together and then truncated to the same integer. like 7.11. 7.89, 7.23 or something like that. maybe you could try making the range 0 - 1 and then multiplying by 100 before you force it to an integer. Aidan On Fri, Mar 7, 2008 at 12:08 PM, Cortaigne wrote: > Heyas. I'm really new to Csound, so most of it's way over my head. > I've got this little experiment going, though, and I'm trying to > figure out how to get it to work properly. Essentially, I'd like to > have an instrument select notes at random -- ideally, diatonically, > but for right now I'm just trying to get it to work chromatically. > The problem is, with the current revision, it seems to repeat notes > four or five times before selecting a different note. I suspect I'm > using the wrong randomizing opcode, but when I've tried others, I get > conflicts (like it produces a k-rate variable and I need it to make > an i-rate variable, or whatever; remember, I'm very new at this, so > what I'm saying might be gibberish). Anyway, here's what I've got -- > I hope someone can make sense of it and tell me what I'm doing wrong: > > > > > sr = 44100 > kr = 4410 > ksmps = 10 > nchnls = 1 > > instr 1 > > ; Random Note Selector > seed 0 > iBase linrand 25 > iNum = int(iBase) > iNote = (iNum/100) + 7 > > ; Envelope > aEnv linen db(p4), (p3 / 3), p3, (p3 / 3) > > ; Output > aSig oscil aEnv, cpspch(iNote), 1 > print iBase > print iNote > out aSig > > endin > > > > > f1 0 16384 10 1 0.618 0.382 0.236 0.146 0.090 0.056 0.034 0.021 0.013 > 0.008 0.005 0.003 0.002 0.001 > > t 0 260 > > i1 0 1 85 > i. + . . > i. . . . > i. . . . > i. . . . > i. . . . > i. . . . > i. . . . > i. . . . > i. . . . > i. . . . > i. . . . > i. . . . > i. . . . > i. . . . > i. . . . > > > > > > Send bugs reports to this list. > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" >