Page 2 of 2

Re: Lfo in ruby

Posted: Sat Jun 22, 2013 6:08 pm
by borodadada
No stream, Green circle f :) float. Basic speed static.

demo version ^)
http://rghost.ru/46944750/image.png

Re: Lfo in ruby

Posted: Sat Jun 22, 2013 7:51 pm
by Nubeat7
:lol: hopefully you didn`t try my code example, i should try the next time.. here is something which works

Re: Lfo in ruby

Posted: Sat Jun 22, 2013 8:38 pm
by borodadada
fantastic, thank you
but how change time ? ^)
speed = 0.1 not work :S

Re: Lfo in ruby

Posted: Sat Jun 22, 2013 10:52 pm
by Nubeat7
itsbecause time % size is the index for the array and this counts only the full numbers - with a speed of 0.1 it is counting 1,1.. 1.2... 1.3... and so on so it counts every 10 steps... just multiply the time with 10 before you do the modulo... or 100 when speed is hundreth...

Re: Lfo in ruby

Posted: Sun Jun 23, 2013 6:27 am
by borodadada
def event i,v,t
v=*(1..1000)
a=*(2..999)
a.reverse!
va = v+a

size = 1998 #arraysize
speed = 0.0101
c = time * 1000

if @on
output 0, va[c%size]
input 100, nil, t + speed
end
end

Okey.... modify, work.

Thanks!