<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<!--This is an automatically generated file. DO NOT EDIT THIS FILE DIRECTLY. Rather, use the _ref.xml files found in the 'edits' folder.-->
<c74object name="gain~" module="msp" category="MSP U/I">
	<digest>
		Gain control
	</digest>
	<description>
		<o>gain~</o> is a slider that scales signals. It can also make a smooth transition as you move from one value of the slider to the next.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			MSP
		</metadata>
		<metadata name="tag">
			MSP U/I
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="signal">
			<digest>
				Input to Scale, int Sets Value
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="signal">
			<digest>
				Scaled Output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="signal">
			<digest>
				Slider Value
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<palette action="gain~" category="Sliders, Audio" pic="gain~.svg" />
	<!--ARGUMENTS-->
	<objarglist>
		<objarg id="0" name="OBJARG_NAME" type="OBJARG_TYPE" optional="0">
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
		</objarg>
	</objarglist>
	<!--parameter-->
	<parameter />
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Send current slider value out right outlet
			</digest>
			<description>
				Sends current slider value out right outlet.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="slider-value" optional="0" type="int" />
			</arglist>
			<digest>
				Set a new audio gain/output value
			</digest>
			<description>
				In left inlet: Sets the value of the slider, ramps the output signal to the level corresponding to the new value over the specified ramp time, and outputs the slider's value out the right outlet.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="slider-value" optional="0" type="float" />
			</arglist>
			<digest>
				Set a new audio gain/output value
			</digest>
			<description>
				In left inlet: Converted to <m>int</m>. Sets the value of the slider, ramps the output signal to the level corresponding to the new value over the specified ramp time, and outputs the slider's value out the right outlet.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="slider-value" optional="0" type="list" />
			</arglist>
			<digest>
				Receive messages from <o>pattr</o> objects.
			</digest>
			<description>
				The object takes <m>list</m> messages in conjunction with <o>pattr</o> objects.
			</description>
		</method>
		<method name="color">
			<arglist>
				<arg name="ARG_NAME_0" type="int" optional="0" />
			</arglist>
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
			<attributelist>
				<attribute name="introduced" get="1" set="1" type="symbol" size="1" value="7.0.0" />
			</attributelist>
		</method>
		<method name="ft1">
			<arglist>
				<arg name="ramp-time" optional="0" type="float" units="ms" />
			</arglist>
			<digest>
				Set the ramp time
			</digest>
			<description>
				In right inlet: Sets the ramp time in milliseconds. The default is 10 milliseconds.
			</description>
		</method>
		<method name="(mouse)">
			<digest>
				Click and drag to set the slider outlet
			</digest>
			<description>
				Clicking and dragging with the mouse sets the value of the slider, ramps the output signal to the level corresponding to the new value over the specified ramp time, and outputs the slider’s value out the right outlet.
			</description>
		</method>
		<method name="set">
			<arglist>
				<arg name="set-slider-value" optional="0" type="int" />
			</arglist>
			<digest>
				Set a new gain/output audio without outputting slider value
			</digest>
			<description>
				In left inlet: The word <m>set</m>, followed by a number, sets the value of the slider, ramps the output signal to the level corresponding to the new value over the specified ramp time, but does not output the slider's value out the right outlet.
			</description>
		</method>
		<method name="signal">
			<arglist />
			<digest>
				Input signal to be scaled by the slider
			</digest>
			<description>
				In left inlet: The input signal to be scaled by the slider.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="bgcolor" get="1" set="1" type="float" size="4">
			<digest>
				Background Color
			</digest>
			<description>
				Sets the first interior color (background) of the <o>gain~</o> object in RGBA format.
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Color" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Background Color" />
				<attribute name="legacydefault" get="1" set="1" type="float" size="4" value="0.666 0.666 0.666 1." />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="preview" get="1" set="1" type="symbol" size="1" value="rect_fill" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="set" get="1" set="1" type="pointer" size="1" value="pointer" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="rgba" />
			</attributelist>
		</attribute>
		<attribute name="bordercolor" get="1" set="1" type="atom" size="1">
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
			<attributelist>
				<attribute name="invisible" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="obsolete" get="1" set="1" type="int" size="1" value="1" />
			</attributelist>
		</attribute>
		<attribute name="inc" get="1" set="1" type="float" size="1">
			<digest>
				Set the increment value used to calculate the output scale factor based on the input value
			</digest>
			<description>
				Sets the increment value used to calculate the output scale factor based on the input value. The default value is 1.071519.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Value" />
				<attribute name="default" get="1" set="1" type="float" size="1" value="1.071519" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Log Increment" />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
			</attributelist>
		</attribute>
		<attribute name="interp" get="1" set="1" type="float" size="1">
			<digest>
				Set the interpolation ramp time in milliseconds for the <o>gain~</o> object
			</digest>
			<description>
				Sets the interpolation ramp time in milliseconds for the <o>gain~</o> object. The default is 10.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Value" />
				<attribute name="default" get="1" set="1" type="float" size="1" value="10." />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Ramp Time (ms)" />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
			</attributelist>
		</attribute>
		<attribute name="interpinlet" get="1" set="1" type="int" size="1">
			<digest>
				Display Interpolation Inlet
			</digest>
			<description>
				Toggles the display of the interpolation inlet.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="symbol" size="1" value="Appearance" />
				<attribute name="default" get="1" set="1" type="int" size="1" value="0" />
				<attribute name="introduced" get="1" set="1" type="symbol" size="1" value="7.0.0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Display Interpolation Inlet" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="knobcolor" get="1" set="1" type="float" size="4">
			<digest>
				Value Color
			</digest>
			<description>
				Sets the color of the knob and the stripes of the value color in RGBA format. The <m>knobcolor</m> attribute is mapped to the <m>color</m>  <link module="core" name="maxcolor" type="vignette">style color</link>.
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Color" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Value Color" />
				<attribute name="legacydefault" get="1" set="1" type="float" size="4" value="0.86 0.86 0.86 1." />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="set" get="1" set="1" type="pointer" size="1" value="pointer" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="rgba" />
				<attribute name="stylemap" get="1" set="1" type="symbol" size="1" value="color" />
			</attributelist>
		</attribute>
		<attribute name="orientation" get="1" set="1" type="int" size="1">
			<digest>
				Set the <o>gain~</o> object to a horizontal or vertical data display.
				<br />
				<m>Automatic</m>: (the default)
			</digest>
			<description>
				Sets the <o>gain~</o> object to a horizontal or vertical data display.
				<br />
				<m>Automatic</m>: (the default) sets the display dependent on the size of the slider - longest side of the rectangle that describes the slider sets the orientation.
				<br />
				<m>Horizontal</m> 				<br />
				<m>Vertical</m> 
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="symbol" size="1" value="Appearance" />
				<attribute name="default" get="1" set="1" type="int" size="1" value="0" />
				<attribute name="enumvals" get="1" set="1" type="atom" size="3">
					<enumlist>
						<enum name="Automatic">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="Horizontal">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="Vertical">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Orientation" />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enumindex" />
			</attributelist>
		</attribute>
		<attribute name="parameter_enable" get="1" set="1" type="int" size="1">
			<digest>
				Enable parameter mode handling
			</digest>
			<description>
				Enables use of this object with <link module="core" name="live_parameters" type="vignette">Max for Live Parameters</link> and allows for <link module="core" name="parameter_enable" type="vignette">setting initial parameter values</link> in the Max environment.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Parameter" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Parameter Mode Enable" />
				<attribute name="order" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="relative" get="1" set="1" type="int" size="1">
			<digest>
				Mouse click response mode
			</digest>
			<description>
				Sets way that the <o>gain~</o> object responds to mouse clicks.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Value" />
				<attribute name="default" get="1" set="1" type="int" size="1" value="0" />
				<attribute name="enumvals" get="1" set="1" type="atom" size="2">
					<enumlist>
						<enum name="Absolute">
							<digest>
								Absolute mode
							</digest>
							<description>
								In absolute mode, the <o>gain~</o> will automatically jump directly to the clicked location.
							</description>
						</enum>
						<enum name="Relative">
							<digest>
								Relative mode
							</digest>
							<description>
								In relative mode (the default) the <o>gain~</o> keeps its relative position when you click - Moving the mouse outputs higher or lower values in relation to that relative position.
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Mousing Mode" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enumindex" />
			</attributelist>
		</attribute>
		<attribute name="scale" get="1" set="1" type="float" size="1">
			<digest>
				Base output value used to calculate the output scale factor
			</digest>
			<description>
				Sets the base output value used to calculate the output scale factor based on the input value. The default value is 7.94231. See the &quot;Inspector&quot; section for an explanation of the calculation. The word <m>size</m>, followed by a number, sets the range of <o>gain~</o> to the number. The values of the slider will then be 0 to the range value minus 1. The default value is 158.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Value" />
				<attribute name="default" get="1" set="1" type="float" size="1" value="7.94321" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Log Scale Value" />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
			</attributelist>
		</attribute>
		<attribute name="size" get="1" set="1" type="int" size="1">
			<digest>
				Number of steps (range)
			</digest>
			<description>
				Sets the number of steps (range) of the <o>gain~</o> object. The default value is 158.
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Value" />
				<attribute name="default" get="1" set="1" type="int" size="1" value="158" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Number of Steps" />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
			</attributelist>
		</attribute>
		<attribute name="stripecolor" get="1" set="1" type="float" size="4">
			<digest>
				Off Color
			</digest>
			<description>
				Sets the &quot;off&quot; color for the slider in RGBA format. The <m>stripecolor</m> attribute is mapped to the <m>elementcolor</m>  <link module="core" name="maxcolor" type="vignette">style color</link>.
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="category" get="1" set="1" type="atom" size="1" value="Color" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Off Color" />
				<attribute name="legacydefault" get="1" set="1" type="float" size="4" value="0.858 0.898 0.678 0.7" />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="set" get="1" set="1" type="pointer" size="1" value="pointer" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="rgba" />
				<attribute name="stylemap" get="1" set="1" type="symbol" size="1" value="elementcolor" />
			</attributelist>
		</attribute>
		<attribute name="style" get="1" set="1" type="symbol" size="1">
			<digest>
				Style
			</digest>
			<description>
				Sets the <link type="vignette" module="core" name="styles">style</link> to be applied to the object. Styles can be set using the <link type="vignette" module="core" name="format_palette">Format palette</link>.
			</description>
			<attributelist>
				<attribute name="category" get="1" set="1" type="symbol" size="1" value="Appearance" />
				<attribute name="introduced" get="1" set="1" type="symbol" size="1" value="7.0.0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Style" />
				<attribute name="paint" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="style" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="gain~.png" caption="Specialized fader to scale a signal exponentially or logarithmically" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="linedrive" />
		<seealso module="msp" name="15_delaychapter06" type="tutorial" />
	</seealsolist>
	<discussion>
		Parameters of line's formula that translates between slider values and the signal scalar can be changed via messages or by selecting the object and choosing <m>Get Info...</m> from the Max menu. The formula values are the same as for the <o>linedrive</o> object.
		<br />
		The default values of range (158), base value (7.94231), and increment (1.071519) provide for a slider where 128 is full scale (multiplying by 1.0), 0 produces a zero signal, and 1 is 75.6 dB below the value at 127. A change of 10 in the slider produces a 6 dB change in the output. In addition, since the range is 158, slider values from 129 to 157 provide 17.4 dB of headroom. When the slider is at 157, the output signal is 17.4 dB louder than the input signal.
		<br />
	</discussion>
	<misc name="Output">
		<entry name="signal">
			<description>
				Out left outlet: The input signal, scaled by the current slider value as x in the equation shown above.
			</description>
		</entry>
		<entry name="int">
			<description>
				Out right outlet: The current slider value, when dragging on the slider with the mouse or when <o>gain~</o> receives an <m>int</m> or <m>float</m> in its left inlet.
			</description>
		</entry>
	</misc>
</c74object>
