This seems like a thing that should be here but I cant find it...
I need to +/- the volume...
Bi Polar Gain? - Am I missing something?
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.
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.
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?
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
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.
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)