Page 1 of 1

Mix

Posted: Sun Apr 06, 2014 1:40 am
by mit2
work

Re: Mix

Posted: Sun Apr 06, 2014 8:26 am
by Nubeat7
hello mit2

not sure what you want -
a switch: would be your described if else scenario
a crossfade: fades from A to B mixing the signals

here are the 2 modules (for stream as code)

Re: Mix

Posted: Sun Apr 06, 2014 1:21 pm
by mit2
work

Re: Mix

Posted: Sun Apr 06, 2014 1:50 pm
by Nubeat7
you mean

if mix == 0 then dry input
if mix > 0 then wet *mix

would be like this then

Code: Select all

streamin a; //dry in
streamin b; //wet in
streamin mix;
streamout out;

out = (a&(mix<=0))|((b*mix)&(mix>0));


you just need to change 'b' to '(b*mix)' in the switch module

btw are you sure you didn`t confuse > (greater then) and < (less then)
also where is the double stream?

if this doesn`t help,you better post a schematic..

Re: Mix

Posted: Sun Apr 06, 2014 7:35 pm
by mit2
work

Re: Mix

Posted: Sun Apr 06, 2014 7:58 pm
by KG_is_back

Code: Select all

streamin dry;
streamin wet;
streamout out;
streamin mix;
out=wet*mix+dry*(1-mix);

Re: Mix

Posted: Sun Apr 06, 2014 11:17 pm
by Nubeat7
KG_is_back wrote:

Code: Select all

streamin dry;
streamin wet;
streamout out;
streamin mix;
out=wet*mix+dry*(1-mix);

this is also a crossfade...
i just use this instead:

Code: Select all

out = a - (a - b) * fade;

because of less multiplication - it should be with better performance if i`m right and it has no extra float value for 1, but KG`s is easier to understand?


so you want:
if mix == 0 then dry input
and if mix < 0 (less then zero) it mixes the wet signal(with the filters) without input signal

so 0..-1 should mix the wet signal?

then just xchange the > and < signs in the code above

Code: Select all

streamin a;
streamin b;
streamin mix;
streamout out;

out = (a&(mix==0))|((b*mix)&(mix<0));


note that the mix signal then needs to be 0..-1 and not like you wrote before 0..1
if mix range would be 0..1 in your scenario:

mit2 wrote:i want doit this if mix = 0

http://i61.tinypic.com/286toa8.jpg

and if mix < 0

http://i62.tinypic.com/1zovvde.jpg

this is schematic how has a look


it never can get the second signalway because mix is never < 0

work

Posted: Mon Apr 07, 2014 9:17 am
by mit2
work

Re: Mix

Posted: Mon Apr 07, 2014 10:43 am
by Nubeat7
its because the range of your mix slider is set to min = 0, max = 0 so the output of your fader is always 0, just set the max to 1 .....

Re: Mix

Posted: Mon Apr 07, 2014 10:57 am
by mit2
thaks. I thought that I mix 0-1