Bi Polar Gain? - Am I missing something?


#1

This seems like a thing that should be here but I cant find it...
I need to +/- the volume...


#2

you will have to elaborate on where you need the volume to change.

there is a gain object which can amplify 16times (saturated)

normally though you have maximum volume and you attenuate that with a simple math/* object or with a vca. see, the concept of +/- volume is very relative, where is your middle? so it is better to think of it as zero to max.


#3

Right, so lets say I want to use a bipolar control on volume...
How do I do that?


#4

add a bipolar2unipolar after your dial and feed that to the vca, gain, whatever.


#5

I am really struggling here... I want to use this device and code for it but the lack of documentation is seriously killing me.
Im trying to edit the patcher object but its just not doing what I tell it to.



Gives me this:

and the XML looks like:

<axoObjectPatcherObject id="patch/object" uuid="91f79d20-3a9e-4f69-8b4b-609b87da667d">
   <author>damonp</author>
   <inlets>
      <frac32buffer name="Lin" description="Left In"/>
      <frac32buffer name="R in" description="Right in"/>
      <frac32.bipolar name="C" description="Volume control"/>
   </inlets>
   <outlets>
      <frac32buffer name="LOut" description="Left Out"/>
      <frac32buffer name="ROut" description="Right Out"/>
   </outlets>
   <displays/>
   <params>
      <frac32.u.map name="V" description="Volume">
         <DefaultValue v="32.0"/>
      </frac32.u.map>
   </params>
   <attribs/>
   <includes/>
   <code.srate><![CDATA[outlet_LOut = param_V + inlet_C;
outlet_ROut = param_V + inlet_C;]]></code.srate>
</axoObjectPatcherObject>

But I get no sound thru... The volume doesnt default to 32 and the inlet does nothing.

:frowning:


#6

ok, there is some confusion here.

first of all the code is doing exactly what you tell it to, though it is not what you would want.¨

my first question would be, why do you want to program objects when you can use the prebuilt objects that do exactly the same stuff? and if they don't do exactly what you want, then look at the code of those objects and take it from there.

to your example:

you are in fact outputting the value of the param_V added to the value of inlet_C to the outlets, so the incoming signal is not present in the output. you don't set the position of the dial with the inlet, they are separate controls. (you can of course add them to each other or subtract or whatever) look at the math/gain object on how a simple gain can be implemented. again, i am not sure, why you want to code your own object for such a basic task?


#7

well, Im just trying to learn how to use this...
I did look at other objects, I dont want a gain I want to control the volume.
I want the volume knob to rest at 32 and then attach a bipolar knob to it to raise or lower its value.
I based that off of jaffa/mix2/mx4e


#8

you cannot change the value of the knob with an inlet! you control the volume with a gain or a math/*c object.

i think the confusion comes from the fact, that most modules output at maximum volume by default, so in most cases you want to control volume from zero to that maximum value. look at the math/*c object. that is basically a volume control with a knob. you can replace that knob with an inlet in the code and use a bipolar dial (attached to a bipolar2unipolar object) to control volume with a bipolar dial where the middle position represents "32" or half of the volume "0.5".

or you look at the vca object and simply add a bipolar dial (again via a bipolar2unipolar object) to the control inlet. this is more robust since the control values are interpolated to samplerate.

but again, why do you want a bipolar control for "volume"?

i still would consider first learning about axoloti in general (look at the help patches of many objects) and patch stuff up before attempting to code objects.


#9


#10

Thanks, I get it now...
I just made this: its pretty dope... I need to mess with the math a bit but its closer to being a doppler pan...


I think I need to use a ratio instead of dividing
doppler pan.axp (3.4 KB)