Support

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

Line Editor

Post any examples or modules that you want to share here

Line Editor

Postby TheOm » Sat Aug 23, 2014 12:40 pm

Capture.png
Capture.png (9.27 KiB) Viewed 24626 times

A multi-purpose line-editor inspired by the ones in FL-Studio, made in Ruby.

-Right click on empty space to add a point.
-Right click on a point to change curve-type.
-Right click on tension handle to reset tension.
-Left click dragging of Points and tension-handles
-Double click to reset to Default (you can change the default state in the init function).

Outputs the y values defined by the lines.

Easy color customization via the properties.

Note: In order for the preset system to work, you must have an "After Preset Change" Wireless link coming from your Preset Manager primitive. The standard Preset Manager Module already has this.

Please let me know if you find this useful.

Line Editor 26_10_2014.fsm
(8.91 KiB) Downloaded 644 times

Line Editor 26_10_2014 with selector.fsm
(10.51 KiB) Downloaded 667 times
Last edited by TheOm on Sun Oct 26, 2014 7:56 pm, edited 22 times in total.
TheOm
 
Posts: 127
Joined: Tue Jan 28, 2014 7:35 pm
Location: Germany

Re: Line Editor

Postby tester » Sat Aug 23, 2014 1:22 pm

Usefuld it is indeed, but where is the schematic?
Need to take a break? Looking for relaxing sounds? I have something right for you.
(by purchasing, you are also supporting further development of related projects).
Thank you for your contribution.
tester
 
Posts: 1796
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: Line Editor

Postby TheOm » Sat Aug 23, 2014 1:31 pm

Forgot it, sorry.
TheOm
 
Posts: 127
Joined: Tue Jan 28, 2014 7:35 pm
Location: Germany

Re: Line Editor

Postby Nubeat7 » Sat Aug 23, 2014 1:50 pm

great one OM, thanks a lot for this, good to see another skilled rubyprogrammer around here!
User avatar
Nubeat7
 
Posts: 1388
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: Line Editor

Postby tester » Sat Aug 23, 2014 4:01 pm

...and with good ideas. Thanks.
Need to take a break? Looking for relaxing sounds? I have something right for you.
(by purchasing, you are also supporting further development of related projects).
Thank you for your contribution.
tester
 
Posts: 1796
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: Line Editor

Postby tulamide » Sat Aug 23, 2014 6:27 pm

Brilliant! Thank you very much for sharing. That wasn't a one day work for sure!

Is there an option somewhere to set the number of steps on the x-axis (like 512, 1024, 2048, etc, or even fully free)?
tulamide
 
Posts: 1931
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Line Editor

Postby TheOm » Sat Aug 23, 2014 6:51 pm

tulamide wrote:Brilliant! Thank you very much for sharing. That wasn't a one day work for sure!

Thank you. Indeed it took me quite some time.
tulamide wrote:Is there an option somewhere to set the number of steps on the x-axis (like 512, 1024, 2048, etc, or even fully free)?

I'm working on it. Fully free will not be possible though. Right now it snaps to the Flowstone grid.
TheOm
 
Posts: 127
Joined: Tue Jan 28, 2014 7:35 pm
Location: Germany

Re: Line Editor

Postby Perfect Human Interface » Sun Aug 24, 2014 3:41 am

This is phenomenal! However, it causes FL to freeze up after a bit for me. All I can tell you is that I had text boxes connected to the outputs, and after a while it would just freeze. Maybe there's a leak or something? Indeed it happened 3 times, and the third I didn't have to force quit FL because the Ruby component killed itself, saying "excessive processing detected."

So (without messing with it further since it keeps freezing), is the resolution of the output connected directly to the resolution of the grid/snap? Or is there some way to adjust that independently? I'm just thinking in case you wanted tighter timing but not smaller snap.

Also, how does the size of the window effect the resolution? It looked like it stayed within 0-1 range even after making the widow larger.
Perfect Human Interface
 
Posts: 663
Joined: Sun Mar 10, 2013 7:32 pm

Re: Line Editor

Postby MyCo » Sun Aug 24, 2014 7:05 am

Nice Project, wanted to do something similar for a long time with Ruby. Just had a brief look through the code, and discovered an obvious mistake in the "Preset" module's method "float_to_array":

Code: Select all
...
(0...format.length).each do |i|
if format[i]=='i'
...


This loop goes from 0 to length of format, so if format has 5 items, it goes from 0 to 5 (6 iterations)
User avatar
MyCo
 
Posts: 764
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany

Re: Line Editor

Postby TheOm » Sun Aug 24, 2014 12:44 pm

Perfect Human Interface wrote:This is phenomenal! However, it causes FL to freeze up after a bit for me. All I can tell you is that I had text boxes connected to the outputs, and after a while it would just freeze. Maybe there's a leak or something? Indeed it happened 3 times, and the third I didn't have to force quit FL because the Ruby component killed itself, saying "excessive processing detected."

I don't know what the cause of this is.
I can only advise you to not connect any text boxes to large arrays in general. It seems to make things very slow.
My FL crashes too, when I connect a text box to the output, however other kinds of array processing work just fine.
Perfect Human Interface wrote:is the resolution of the output connected directly to the resolution of the grid/snap? Or is there some way to adjust that independently? I'm just thinking in case you wanted tighter timing but not smaller snap.

Right now you can't adjust the snap at all. The resolution property sets how many "samples" of the curves there are in one Flowstone-gridstep.
Perfect Human Interface wrote:Also, how does the size of the window effect the resolution? It looked like it stayed within 0-1 range even after making the widow larger.

The range of values on the outputs is normalised to be between 0 and 1. The resolution(size of output arrays) will vary with the view width and can be calculated with view-width(in grid steps) * Resolution + 1

MyCo wrote:
Code: Select all
...
(0...format.length).each do |i|
if format[i]=='i'
...


This loop goes from 0 to length of format, so if format has 5 items, it goes from 0 to 5 (6 iterations)

That is incorrect. When you write (0..5) with two dots, five will be included in the range.
But when you specify a range with 3 dots between the numbers like (0...5) the target number will be excluded from the range.
TheOm
 
Posts: 127
Joined: Tue Jan 28, 2014 7:35 pm
Location: Germany

Next

Return to User Examples

Who is online

Users browsing this forum: No registered users and 6 guests