Page 1 of 1
Linear Slide Selector for VCAs
Posted: Wed Oct 15, 2014 9:29 am
by glitchcpt
Hey guys,
So I have been here for a while now, reading all the useful tips you guys have, never posted anything until now,
I am wanting to achieve a linear selector using a knob, that can basically mix between multiple sources, be it filter types or different oscillators, I think my problem is with the math in my noob brain, I cant seem to get output B and C in my module to mix naturally, if that explanation even makes sense?
Hopefully you guys can help with my design,
Thanks in advance!!
BOOM!
Re: Linear Slide Selector for VCAs
Posted: Wed Oct 15, 2014 10:05 am
by KG_is_back
Do you mean something like this?
ruby, green and stream versions are included.
Re: Linear Slide Selector for VCAs
Posted: Wed Oct 15, 2014 10:10 am
by glitchcpt
Oh my!
That is exactly what I was looking for
Thanks a million!!
Re: Linear Slide Selector for VCAs
Posted: Wed Oct 15, 2014 10:56 am
by KG_is_back
Here's how I thought about it:
0. take a paper and draw the graphs of functions you want to achieve.
1. the function for all outputs is the same - only offset on x axis - that can be easily archived by subtracting the offset from input.
2.In the range around peak the function in V shaped. abs(x) provides such V shaped function, only flipped vertically.To archive the desired shape we must flip the abs function (by abs(x)*-1) and add y offset of one -> y=1-abs(x)
3. Further from the peak the function is zero both in negative and positive direction - in fact it is not allowed to become negative in value. That can be achieved using max()function -> y=max(0,1-abs(x))
4. Finally we may add the horizontal shifting mentioned in point 1. y=max(0,1-abs(x-offset))
This is how I think when preparing such functions and I believe many people do too. It's a very useful skill to learn, especially for DSP and programming in general.
Re: Linear Slide Selector for VCAs
Posted: Wed Oct 15, 2014 12:07 pm
by glitchcpt
Thanks for the valued input!
Not sure if you saw my abomination, but now that I look at your simple approach it seems my example is more likely to blow up a cpu before anything constructive happens

Re: Linear Slide Selector for VCAs
Posted: Thu Oct 16, 2014 11:27 am
by Perfect Human Interface
Interesting KG; I like your approach because it allows you to add as many different sources to fade between as you need.
I made this 3-way crossfade a while back.
Re: Linear Slide Selector for VCAs
Posted: Thu Oct 16, 2014 6:59 pm
by tulamide
Perfect Human Interface wrote:Interesting KG; I like your approach because it allows you to add as many different sources to fade between as you need.
I made this 3-way crossfade a while back.
That's where the interpolation modules come in handy. See
here for an evenly distributed 4 stream fader.