How to scale oscillator signal to control amp via float values 0 to 1
I have scaled a [phasor~] to output float values between -1 and 1, to control an amplifier, depending on waveform cycles. I have used the following abstraction to do this.
[phasor~ 0.5]
[cos~]
[*~]
[snapshot~ 10]
[+ 1.]
[/2.]
If the amplifier between [phasor~] and [snapshot] is turned down it is represented in the float output, however, when it is turned down completely it always outputs [05] - as 0 + 1 /2 = 0.5. I would like to determine a way whereby when the [*~] is turned down to zero it outputs a float value of 1.
I have included a patch where this is outlined more clearly.
edit
laters
I require the final output to be between 0 and 1 - as I am planning on controlling an [*~]
The problem lies in the fact you are scaling a sinusoid, whose minimum amplitude will always lie in the centre of any range......the best I could manage was this "cheat", which isn't ideal, as any offset will mess up the desired output range; these are just facts sadly,
Brendan
edit: just looked at this again and, given the stated problem, it ain't that bad you know :)
Thanks for the help! I just solved the issue myself after getting some inspiration from your patch I made it so that 0.5 is added to the float outputting the phasor cycle - as the float controlling the phasor's amplitude is increased the amount added is gradually decreased to 0. Totally avoided anything to do with the signal. I sear I don't fully understand what is going on, partly because the patch I am working on is quite messy, but it seems to work fine.