Lfo in ruby

For general discussion related FlowStone
borodadada
Posts: 47
Joined: Sun Jun 02, 2013 5:58 pm

Re: Lfo in ruby

Post by borodadada »

No stream, Green circle f :) float. Basic speed static.

demo version ^)
http://rghost.ru/46944750/image.png
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: Lfo in ruby

Post by Nubeat7 »

:lol: hopefully you didn`t try my code example, i should try the next time.. here is something which works
Attachments
thru_array.fsm
(427 Bytes) Downloaded 908 times
borodadada
Posts: 47
Joined: Sun Jun 02, 2013 5:58 pm

Re: Lfo in ruby

Post by borodadada »

fantastic, thank you
but how change time ? ^)
speed = 0.1 not work :S
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: Lfo in ruby

Post 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...
borodadada
Posts: 47
Joined: Sun Jun 02, 2013 5:58 pm

Re: Lfo in ruby

Post 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!
Post Reply