<?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.-->
<c74object module="rnbo" kind="rnboobject" name="data" category="Sampling">
<!--METADATA-->
<metadatalist>
<metadata name="author">Cycling '74</metadata>
<metadata name="tag">RNBO</metadata>
<metadata name="tag">RNBO Sampling</metadata>
<metadata name="tag">RNBO Synthesis</metadata>
<metadata name="alias">buffer~</metadata>
<metadata name="alias">buffer</metadata>
</metadatalist>
<digest>A data buffer for holding audio (or potentially some other) data.</digest>
<description><p>
A data buffer. Two variations on this object can be used and are for the most part interchangeable. The 
<o objname="rnbo_buffer~">buffer~</o>
 object creates a shared memory space between rnbo~ and Max, allowing rnbo~ buffers to be filled from the Max side and also for waveform previewing. The 
<o objname="rnbo_data">data</o>
 object, which does not share memory with Max, supports the "@external 0" mode, which hides the buffer from the external world in the exported code.
</p></description>
<!--ARGUMENTS-->
<objarglist>
<objarg name="name" optional="0" type="symbol">
<digest>Name of the data buffer</digest>
<description><p>
The first argument of buffer~ (and data) is required and is the name that other objects use to access the stored buffer data. A buffer~ with the same name in a rnbo~ object and a parent Max patcher can share data in either direction, whereas a data object cannot.
</p></description>
</objarg>
<objarg name="samples" optional="1" type="number">
<digest>Size in Samples. Take care when setting, allocation might block audio processing.</digest>
<description><p>
Set the size of the buffer in samples.The actual duration of the buffer is determined by the number of samples and the sample rate.
(cr)
It is important to note that large buffers can take time to allocate and may interrupt audio processing, so it is best not to use arbitrarily large buffers.
</p></description>
</objarg>
<objarg name="size" optional="1" type="number">
<digest>Size in Samples. Take care when setting, allocation might block audio processing.</digest>
<description><p>
Set the size of the buffer in samples.The actual duration of the buffer is determined by the number of samples and the sample rate.
(cr)
It is important to note that large buffers can take time to allocate and may interrupt audio processing, so it is best not to use arbitrarily large buffers.
</p></description>
</objarg>
<objarg name="channels" optional="1" type="number">
<digest>Change channel count. Take care when setting, allocation might block audio processing.</digest>
<description><p>
Set the number of channels for the data buffer. Requires that the 
<a href="attribute">size</a>
 be set. If buffer is referencing an external source using the 
<a href="attribute">file</a>
 attribute, the number of channels is automatically determined by the source file."
</p></description>
</objarg>
<objarg name="samplerate" optional="1" type="number">
<digest>Sample rate</digest>
<description><p>
Sets the sample rate for the buffer object (default = 44100). This can be set independently from the sample rate of the audio driver and other buffer objects.
</p></description>
</objarg>
</objarglist>
<!--OPTIONS-->
<rnbooptionlist>
<option name="external" size="1" type="bool">
<digest>Await data from the outside world.</digest>
<description><p>
A buffer set to external (default = 1) will be addressable/fillable from outside the rnbo code. A buffer~ is always set to external. The data object supports @external 0, which hides the buffer from the external world. Note that any data object that uses the @file or @url attribute will automatically be set to @external 1.
</p></description>
</option>
<option name="file" size="1" type="symbol">
<digest>File name/path or URL to load into buffer.</digest>
<description><p>
A valid URL of an audio file to load into the buffer. Loading a file will automatically set the size, channel count and sample rate based on the values of the associated file.
</p></description>
</option>
<option name="fill" size="1" type="symbol">
<digest>Fill expression, this could be a value, or a simple function like sin(x), where x will run from 0 to 1 to fill the buffer.</digest>
<description><p>
Allows you to fill a buffer using a constant or a simple function of x, where x is a value ranging from 0 to 1 over the length of the buffer. i.e., 
<m>@fill .5</m>
 will set all values to .5; 
<m>@fill sin(x*2*pi-1)</m>
 creates a sin wave that goes between -1 and 1. Requires a fixed 
<a href="attribute">size</a>
.
</p></description>
</option>
<option name="name" size="1" type="symbol">
<digest>Name of the data buffer</digest>
<description><p>
The first argument of buffer~ (and data) is required and is the name that other objects use to access the stored buffer data. A buffer~ with the same name in a rnbo~ object and a parent Max patcher can share data in either direction, whereas a data object cannot.
</p></description>
</option>
<option name="samplerate" size="1" type="number">
<digest>Sample rate</digest>
<attributelist>
<attribute name="default" type="number" value="0"></attribute>
</attributelist>
<description><p>
Sets the sample rate for the buffer object (default = 44100). This can be set independently from the sample rate of the audio driver and other buffer objects.
</p></description>
</option>
<option name="type" size="1" type="symbol">
<digest>Type of Data (float32, float64)</digest>
<description><p>
Sets the data type of the buffer to float32 (default for buffer~) or float64 (default for data).
</p></description>
</option>
<option name="url" size="1" type="symbol">
<digest>The name of an audio file to load</digest>
<attributelist>
<attribute name="alias" value="file"></attribute>
</attributelist>
<description><p>
A valid URL of an audio file to load into the buffer. Loading a file will automatically set the size, channel count and sample rate based on the values of the associated file.
</p></description>
</option>
</rnbooptionlist>
<!--ATTRIBUTES-->
<rnboattributelist>
<attribute name="channels" size="1" type="number">
<digest>Change channel count. Take care when setting, allocation might block audio processing.</digest>
<attributelist>
<attribute name="default" type="number" value="1"></attribute>
</attributelist>
<description><p>
Set the number of channels for the data buffer. Requires that the 
<a href="attribute">size</a>
 be set. If buffer is referencing an external source using the 
<a href="attribute">file</a>
 attribute, the number of channels is automatically determined by the source file."
</p></description>
</attribute>
<attribute name="clear" size="1" type="bang">
<digest>Clear the contents of the buffer</digest>

</attribute>
<attribute name="info" size="1" type="bang">
<digest>Bang to report buffer information.</digest>
<description><p>
Sending a bang into the object's inlet will output the buffer data to the corresponding outlets. The reported data is the size of the buffer in samples, the number of channels, and the sample rate of the currently loaded buffer.
</p></description>
</attribute>
<attribute name="ms" size="1" type="number">
<digest>Size in Milliseconds. Take care when setting, allocation might block audio processing.</digest>
<attributelist>
<attribute name="default" type="number" value="0"></attribute>
<attribute name="alias" value="sizems"></attribute>
</attributelist>
<description><p>
Set the size of the data buffer in milliseconds. The total number of samples is determined by the samplerate. It is important to note that large buffers can take time to allocate and may interrupt audio processing, so it is best not to use arbitrarily large buffers.
</p></description>
</attribute>
<attribute name="normalize" size="1" type="number">
<digest>Find Maximum and normalize to the value given.</digest>
<attributelist>
<attribute name="default" type="number" value="0.995"></attribute>
</attributelist>
<description><p>
Set the desired peak value, then find the maximum value in the buffer and normalize to that value.
</p></description>
</attribute>
<attribute name="samples" size="1" type="number">
<digest>Size in Samples. Take care when setting, allocation might block audio processing.</digest>
<attributelist>
<attribute name="default" type="number" value="0"></attribute>
<attribute name="alias" value="size"></attribute>
</attributelist>
<description><p>
Set the size of the buffer in samples.The actual duration of the buffer is determined by the number of samples and the sample rate.
(cr)
It is important to note that large buffers can take time to allocate and may interrupt audio processing, so it is best not to use arbitrarily large buffers.
</p></description>
</attribute>
<attribute name="size" size="1" type="number">
<digest>Size in Samples. Take care when setting, allocation might block audio processing.</digest>
<attributelist>
<attribute name="default" type="number" value="0"></attribute>
</attributelist>
<description><p>
Set the size of the buffer in samples.The actual duration of the buffer is determined by the number of samples and the sample rate.
(cr)
It is important to note that large buffers can take time to allocate and may interrupt audio processing, so it is best not to use arbitrarily large buffers.
</p></description>
</attribute>
<attribute name="sizems" size="1" type="number">
<digest>Size in Milliseconds. Take care when setting, allocation might block audio processing.</digest>
<attributelist>
<attribute name="default" type="number" value="0"></attribute>
</attributelist>
<description><p>
Set the size of the data buffer in milliseconds. The total number of samples is determined by the samplerate. It is important to note that large buffers can take time to allocate and may interrupt audio processing, so it is best not to use arbitrarily large buffers.
</p></description>
</attribute>
</rnboattributelist>
<!--INLETS-->
<rnboinletlist>
<inlet id="inlet_info" name="info" type="bang">
<digest>Bang to report buffer information.</digest>
<description><p>
Sending a bang into the object's inlet will output the buffer data to the corresponding outlets. The reported data is the size of the buffer in samples, the number of channels, and the sample rate of the currently loaded buffer.
</p></description>
</inlet>
</rnboinletlist>
<!--OUTLETS-->
<rnbooutletlist>
<outlet id="outlet_sizeout" name="sizeout" type="number">
<digest>Size in Samples</digest>
<description><p>
The left outlet reports the total size of the buffer in samples whenever the buffer is instantiated, modified, or receives a bang. The actual duration of the buffer is determined by the number of samples and the sample rate.
</p></description>
</outlet>
<outlet id="outlet_chanout" name="chanout" type="number">
<digest>Number of Channels</digest>
<description><p>
The middle outlet reports the current number of channels of the buffer whenever the buffer is instantiated, modified, or receives a 
<a href="bang">bang</a>
*.
_Needs a way to jump to the bang entry of the ref doc.
</p></description>
</outlet>
<outlet id="outlet_srout" name="srout" type="number">
<digest>Sample rate</digest>
<description><p>
The right outlet reports the sample size of the buffer whenever the buffer is instantiated, modified, or receives a bang.
</p></description>
</outlet>
</rnbooutletlist>
<!--SEE ALSO-->
<seealsolist>
<seealso name="buffer~" type="refpage" module="MSP"></seealso>
<seealso name="groove~" type="refpage" module="MSP"></seealso>
<seealso name="gen_dsp_buffer" type="genrefpage" module="Gen" display="buffer"></seealso>
<seealso name="rnbo_groove~" type="rnborefpage" module="RNBO" display="groove~"></seealso>
<seealso name="rnbo_peek" type="rnborefpage" module="RNBO" display="peek"></seealso>
<seealso name="rnbo_poke" type="rnborefpage" module="RNBO" display="poke"></seealso>
</seealsolist>
</c74object>