need help with smooth draw for sequencer

For general discussion related FlowStone
Post Reply
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

need help with smooth draw for sequencer

Post by Nubeat7 »

you all know the stock steplfo sequencer and the cool smooth curve..

so i adapted this a while ago into ruby but only with the bars but no smooth curve so i use the old one for this...

but i also want to do the smooth in ruby specially because the original is using a ramp, a float array to poly and an analyzer lot of stuff which is using audiostream cpu power, sadly i couldnt find a solution and i have no idea if it is possible and how..

i just could get a nice curve on the values but got lost on smoothing the spikes...

any help on that would be appreciated

thanks
Attachments
smooth draw.fsm
(46.25 KiB) Downloaded 996 times
User avatar
nix
Posts: 817
Joined: Tue Jul 13, 2010 10:51 am

Re: need help with smooth draw for sequencer

Post by nix »

What about reversing the order on the beziers one?
-looks pretty close, it just smoothing in the wrong direction.
IMO you could keep trying, I think you will get the bezier.

edit-sorry for confusing things,
the behaviour was different from what I remembered.
So- it's very close. Will keep playing.
btw- the curves you have drawn are very cool,
swapping out values makes them do all sorts of interesting things.

edit2- One argument for using the stream to draw,
is that it is the same operation as is applied on the audio.

edit3- Here is a mod on the beziers->
smooth draw_beziers hack.fsm
(46.55 KiB) Downloaded 1011 times

Will try and implement optional 2 point steps now, instead of points.
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: need help with smooth draw for sequencer

Post by Nubeat7 »

thanks nix, brought me a big step further, here is a direct comparsion of the stock and the actual ruby version with better bezierdrawing

it pretty close on smooth factors till 0.8
Attachments
smooth draw_beziers hack1.fsm
(44.9 KiB) Downloaded 1018 times
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: need help with smooth draw for sequencer

Post by Nubeat7 »

nix wrote:edit2- One argument for using the stream to draw,
is that it is the same operation as is applied on the audio.


so i took the smooth methode and used it for the array and look here, it works :D

thanks for putting me in the right direction!
Attachments
smooth_draw_beziers_working.fsm
(45.42 KiB) Downloaded 996 times
User avatar
nix
Posts: 817
Joined: Tue Jul 13, 2010 10:51 am

Re: need help with smooth draw for sequencer

Post by nix »

That's beautiful NB!
Will integrate in Entrancer.
I was applying your optims,
and ran into an issue with envelopes/voice management.
So I have fixed that,
it made the sequencer screwy and wouldn't release one voice.
Back to emplacing the optims,
this one is a gem IMO.
Will send a pm in the next couple of days,
but what I have in mind is ASMing the stock envelope.
I can try learn,
but do yous want one?
That's neat you used the function in Ruby,
that filter works equally well as a Ruby codebox
TY!
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: need help with smooth draw for sequencer

Post by Nubeat7 »

thanks nix,

hope you can fix the envelope issue..

here is the final version of the steplfo including bars and smoothcurve (and fading colors :))
i also filled the smoothed area with color..

the 2 types "positive" and "positive/negativ", like you know it from the stock one, are available too

the only thing missing are the value steps (stepsV)
Attachments
stepseq_with_smooth.fsm
(38.73 KiB) Downloaded 1107 times
User avatar
nix
Posts: 817
Joined: Tue Jul 13, 2010 10:51 am

Re: need help with smooth draw for sequencer

Post by nix »

draw_bezier.fsm
(1.76 KiB) Downloaded 1021 times


Here is just the drawing- without the mouse controls.
This is the component I have replaced in my synth,
I use a method with no loop to draw the bars,
and mouse controls are in there.
The looped bars were crashing frequently,
but I am happy enough with them now.

Thanks very much NB,
The envelopes issue is dealt with but I had to ditch the Assembly version.
Post Reply