Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Spreading from single value to a range

For general discussion related FlowStone

Spreading from single value to a range

Postby tulamide » Sun Nov 08, 2015 4:09 pm

I almost feel like flooding the website, but before I need a week just to recognize that I won't find an answer, I better ask you guys.

An LFO spits out values in the range [-1, +1]
A second LFO does the same.

The second one shall be multiplied with the first one, but following a knob that spits out [0, 1].

If the knob is at zero, the first LFO runs according to its settings, not influenced at all by the second.
If the knob is at one, the first LFO's output is multiplied by the second LFO's output.
If the knob is somewhere in between, the first LFO is only to a part influenced by the second LFO. (for example, at 0.5 only 50% of the second LFO's strength is applied)

It seems to me that the multiplier must be 1, if the first LFO isn't influenced by the second. And the same multiplier would be non-constant anymore, but from the range of the second LFO, when it influences the first LFO fully.

Help me avoiding a headache! :D
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Spreading from single value to a range

Postby KG_is_back » Sun Nov 08, 2015 4:15 pm

I think the best thing to do (and probably what you mean) is to use the knob to mix "dry" LFO1 and LFO1*LFO2

Code: Select all
streamin knob;
streamin LFO1;
streamin LFO2;
streamout out;

out=LFO1*(1-knob)+LFO1*LFO2*knob;

KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Spreading from single value to a range

Postby tulamide » Sun Nov 08, 2015 4:24 pm

KG_is_back wrote:I think the best thing to do (and probably what you mean) is to use the knob to mix "dry" LFO1 and LFO1*LFO2

Code: Select all
streamin knob;
streamin LFO1;
streamin LFO2;
streamout out;

out=LFO1*(1-knob)+LFO1*LFO2*knob;


Thanks once again. I'm not sure if this has the effect I had in mind, but I tested it and it resulted in quite some interesting patterns, so I will stick to it!
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Spreading from single value to a range

Postby KG_is_back » Sun Nov 08, 2015 6:30 pm

With knob at 0 you only get signal from LFO1. With knob at 1 you get signal from LFO1*LFO2. With knob at 0.5 you get LFO1*LFO2*0.5+LFO1*0.5 = LFO1*(LFO2*0.5*+(1-0.5) ).
Off course, the intermediate states may be implemented in different way. This is basically weighted arithmetic average (with weight being the knob).
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Spreading from single value to a range

Postby tulamide » Sun Nov 08, 2015 7:23 pm

KG_is_back wrote:With knob at 0 you only get signal from LFO1. With knob at 1 you get signal from LFO1*LFO2. With knob at 0.5 you get LFO1*LFO2*0.5+LFO1*0.5 = LFO1*(LFO2*0.5*+(1-0.5) ).
Off course, the intermediate states may be implemented in different way. This is basically weighted arithmetic average (with weight being the knob).

Yes, that's how I understood it as well. What I was trying to do was more like this (but still not 100% correct):

Code: Select all
for knob = 1.0
LFO1*LFO2*1.0+LFO1*0

for knob = 0.5
LFO1*LFO2*0.5+LFO1*0

for knob = 0.0
LFO1*LFO2*0.0+LFO1*1.0


The knob was supposed to add the amount at which LFO1 is modulated by LFO2. At knob 0, LFO2 doesn't modulate, at knob 0.1 LFO2 kicks in with 10% modulation (of LFO1's signal), etc. up to knob 1, where it is modulating 100%

Maybe LFO2's range has to be 0-1 rather than -1 to +1? At least it would be easy then to map knob to it (LFO2 * KNOB)

But if I multiply LFO2 and LFO1 then I need the value 1 to not modulate LFO1. And if I add them (LFO2*KNOB + LFO1) the range gets out of bounds or reverses, etc.

It's ok though. Your solution is musically interesting, so I don't miss anything :)
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany


Return to General

Who is online

Users browsing this forum: No registered users and 74 guests