Linear Slide Selector for VCAs

Post any examples or modules that you want to share here
Post Reply
glitchcpt
Posts: 54
Joined: Wed Oct 01, 2014 3:42 pm

Linear Slide Selector for VCAs

Post 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!
Attachments
Linear Slide Selector.fsm
(4.03 KiB) Downloaded 1141 times
KG_is_back
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Linear Slide Selector for VCAs

Post by KG_is_back »

Do you mean something like this?

ruby, green and stream versions are included.
Attachments
linear slide selector KG.fsm
(120.76 KiB) Downloaded 1199 times
glitchcpt
Posts: 54
Joined: Wed Oct 01, 2014 3:42 pm

Re: Linear Slide Selector for VCAs

Post by glitchcpt »

Oh my!

That is exactly what I was looking for :D :D :D

Thanks a million!!
KG_is_back
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Linear Slide Selector for VCAs

Post 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.
glitchcpt
Posts: 54
Joined: Wed Oct 01, 2014 3:42 pm

Re: Linear Slide Selector for VCAs

Post 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 :lol:
Perfect Human Interface
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: Linear Slide Selector for VCAs

Post 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.
Attachments
3-Way XFade.fsm
(12.87 KiB) Downloaded 1115 times
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Linear Slide Selector for VCAs

Post 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.
"There lies the dog buried" (German saying translated literally)
Post Reply