Page 1 of 1
need help with smooth draw for sequencer
Posted: Sat Nov 30, 2013 1:33 am
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
Re: need help with smooth draw for sequencer
Posted: Sat Nov 30, 2013 2:30 am
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->
Will try and implement optional 2 point steps now, instead of points.
Re: need help with smooth draw for sequencer
Posted: Sat Nov 30, 2013 1:52 pm
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
Re: need help with smooth draw for sequencer
Posted: Sat Nov 30, 2013 9:38 pm
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

thanks for putting me in the right direction!
Re: need help with smooth draw for sequencer
Posted: Sun Dec 01, 2013 3:46 am
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!
Re: need help with smooth draw for sequencer
Posted: Sun Dec 01, 2013 5:22 pm
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)
Re: need help with smooth draw for sequencer
Posted: Sun Dec 01, 2013 11:58 pm
by nix
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.