If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Ruby Counter
4 posts
• Page 1 of 1
Ruby Counter
Is there some definitive book on Ruby that works wholly with Flowstone?
Where am i going wrong?
- Code: Select all
def event i,v
if !defined? @count
@count = 127
end
if @in0 == True
@count = @count + 1
end
if @in1 == True
@count = @count - 1
end
output @count
end
Where am i going wrong?
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."
Albert Einstein
Albert Einstein
-
JB_AU - Posts: 171
- Joined: Tue May 21, 2013 11:01 pm
Re: Ruby Counter
- Code: Select all
def event i,v
if @count == nil
@count = 127
end
if i==@in0
@count = @count + 1
end
if i==@in1
@count = @count - 1
end
output @count
end
this should work.. you can use triggers for @in0 and @in1
btw after its nothing to do with dsp it should be posted in the general section..
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: Ruby Counter
Trog's Ruby Counter for reference...
http://www.dsprobotics.com/support/viewtopic.php?f=2&t=1378#p5310
http://www.dsprobotics.com/support/viewtopic.php?f=2&t=1378#p5310
BV MUSIC SYDNEY AUSTRALIA..Songwriting and Software development
Headquartershttps://www.bvmusicsydneyaustralia.com/
Spotifyhttps://open.spotify.com/artist/7JO8QM40mVmHb7pAwKPJi0
Donatationhttps://www.paypal.com/donate/?hosted_button_id=HEUR8R7K8GZ4L
Headquartershttps://www.bvmusicsydneyaustralia.com/
Spotifyhttps://open.spotify.com/artist/7JO8QM40mVmHb7pAwKPJi0
Donatationhttps://www.paypal.com/donate/?hosted_button_id=HEUR8R7K8GZ4L
- billv
- Posts: 1157
- Joined: Tue Aug 31, 2010 3:34 pm
- Location: Australia
Re: Ruby Counter
Didn't find a Ruby section, this seemed a logical spot, will do.
Billv, thanks mate! That's infattically & exactly what i wanted to do, cheers mate.
Billv, thanks mate! That's infattically & exactly what i wanted to do, cheers mate.
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."
Albert Einstein
Albert Einstein
-
JB_AU - Posts: 171
- Joined: Tue May 21, 2013 11:01 pm
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 75 guests