How to scale oscillator signal to control amp via float values 0 to 1

    Apr 30 2012 | 5:09 pm
    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.

    • Apr 30 2012 | 5:16 pm
    • Apr 30 2012 | 5:21 pm
      I require the final output to be between 0 and 1 - as I am planning on controlling an [*~]
    • Apr 30 2012 | 5:39 pm
      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,
      edit: just looked at this again and, given the stated problem, it ain't that bad you know :)
    • Apr 30 2012 | 6:37 pm
      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.
    • Apr 30 2012 | 6:39 pm
      Here's a screenshot. djf_sliderscope] takes a signal and outputs 0 to 127 for its waveform.