<?xml version='1.0' encoding='utf-8' standalone='yes'?>


<!-- DO NOT EDIT THIS FILE ... YOU WILL LOSE YOUR WORK -->


<c74object name="live.adsr~" module="m4l" category="Live MSP Objects">

	<digest>ADSR envelope generator</digest>
	<description>Use the live.adsr~ object to create sample-accurate Attack-Decay-Sustain-Release signal envelopes. Pair live.adsr~ with the live.adsrui object for graphical control over each of its stages. </description>


	<!--METADATA-->

	<metadatalist>
		<metadata name='author'>Cycling '74 </metadata>
		<metadata name='tag'>Live</metadata>
	</metadatalist>


	<!--ARGUMENTS-->

	<objarglist>

		<objarg name='attack time' optional='1' type='number'>
			<digest>Attack time in ms</digest>
			<description>The initial attack time of the envelope in milliseconds.</description>
		</objarg>

		<objarg name='decay time' optional='1' type='number'>
			<digest>Decay time in ms</digest>
			<description>The initial decay time of the envelope in milliseconds.</description>
		</objarg>

		<objarg name='sustain' optional='1' type='number'>
			<digest>Sustain value</digest>
			<description>The sustain of the envelope, as a factor of the amplitude. For example, a value of 0.5 means the sustain level will be half of the amplitude height. </description>
		</objarg>

		<objarg name='release time' optional='1' type='number'>
			<digest>Release time in ms</digest>
			<description>The initial release time of the envelope in milliseconds.</description>
		</objarg>

	</objarglist>


	<!--MESSAGES-->

	<methodlist>

		<method name='list'>
			<digest>Set all ADSR values simultaneously</digest>
			<description>Sending a list to the leftmost inlet sets all ADSR envelope values simultaneously.</description>
		</method>

		<method name='float'>
			<digest>Set value of an attribute</digest>
				<description>A number sets the attribute associated with the inlet.</description>
		</method>

	</methodlist>


	<!--ATTRIBUTES-->

	<attributelist>

		<attribute name='decay_slope' get='1' set='1' type='float64' size='1' >
			<digest>Shape of decay envelope segment</digest>
			<description>The shape of the <at>decay</at> envelope segment. Ranging from -1 to 1., positive and negative values create curves. A value of 0 is linear. </description>
		</attribute>

		<attribute name='release_time' get='1' set='1' type='float64' size='1' >
			<digest>Release time in milliseconds</digest>
			<description>The length of time taken to arrive at the final value after the trigger is turned off (e.g. a MIDI noteoff message is received). </description>
		</attribute>

		<attribute name='decay_time' get='1' set='1' type='float64' size='1' >
			<digest>Decay time in milliseconds</digest>
			<description>The length of time taken between the peak value and the sustain level. </description>
		</attribute>

		<attribute name='attack_slope' get='1' set='1' type='float64' size='1' >
			<digest>Shape of attack envelope segment</digest>
			<description>The shape of the <at>attack</at> envelope segment. Ranging from -1 to 1., positive and negative values create curves. A value of 0 is linear. </description>
		</attribute>

		<attribute name='attack_time' get='1' set='1' type='float64' size='1' >
			<digest>Attack time in milliseconds</digest>
			<description>The initial attack time of the envelope in milliseconds.</description>
		</attribute>

		<attribute name='sustain' get='1' set='1' type='float64' size='1' >
			<digest>Sustain value</digest>
			<description>The level reached at the end of the <at>decay</at> stage, as a factor of the amplitude. For example, a value of 0.5 means the sustain level will be half of the amplitude height. The value will remain at this level until triggered off (e.g. by a MIDI noteoff) unless it is in loop, sync, or beat <at>mode</at>. </description>
		</attribute>

		<attribute name='release_slope' get='1' set='1' type='float64' size='1' >
			<digest>Shape of release envelope segment</digest>
			<description>The shape of the <at>release</at> envelope segment. Ranging from -1 to 1., positive and negative values create curves. A value of 0 is linear. </description>
		</attribute>

		<attribute name='final' get='1' set='1' type='float64' size='1' >
			<digest>Final value</digest>
			<description>The value of the envelope at the end of the <at>release</at> stage. </description>
		</attribute>

		<attribute name='peak' get='1' set='1' type='float64' size='1' >
			<digest>Peak value</digest>
			<description>The value at end of the <at>attack</at> stage, and the beginning of the <at>decay</at> stage. </description>
		</attribute>

		<attribute name='initial' get='1' set='1' type='float64' size='1' >
			<digest>Initial value</digest>
			<description>The value the ADSR starts at.</description>
		</attribute>

		<attribute name='loop_mode' get='1' set='1' type='long' size='1' >
			<digest>Envelope loop behavior</digest>
			<description>The envelope loop behavior. Modes include:<ul><li>none: No looping, just attack, decay, sustain, and release </li> <li>trigger: No looping and skip the sustain - a one-shot trigger. Trigger mode cannot be released early, i.e. releasing during attack will have no effect - the envelope will continue to play the decay and release. </li> <li>loop: Loop through attack, decay, and release - a looping trigger. Releases like a normal envelope, i.e. releasing during an attack will start the release stage before finishing. </li> </ul> </description>
		</attribute>

	</attributelist>


	<!--RELATED-->

	<seealsolist>
		<seealso name='live.adsrui' />
		<seealso name='adsr~' />
	</seealsolist>


</c74object>
