<?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="mc.sfizz~" module="" category="Multichannel">
	<digest>
		Sfz format sample player (multichannel)
	</digest>
	<description>
		<o>sfizz~</o> is a player for files in the Sfz format. The format uses simple text files that specify how audio sample files are triggered by MIDI notes and controllers. (Information on the format is available at
		<a href="https://sfzformat.com">
			sfzformat.com
		</a>
		.) The object accepts MIDI messages and produces two or more audio outputs. <o>sfizz~</o> makes use of the open source
		<a href="https://sfz.tools/sfizz/">
			Sfizz library project
		</a>
		that supports a
		<a href="https://sfz.tools/sfizz/development/status/opcodes/">
			large subset of standard Sfz opcodes
		</a>
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			MSP
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				Note Number or midievent Message
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Velocity
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Audio Output 1
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				Audio Output 2
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg id="0" name="filename" type="symbol" optional="1">
			<digest>
				Initial Sfz file name
			</digest>
			<description>
				Sets an initial file to load and use.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="ARG_NAME_0" type="int" optional="0" />
			</arglist>
			<digest>
				MIDI note number (left inlet); MIDI velocity (right inlet)
			</digest>
			<description>
				You can trigger samples to play with a MIDI note number in the left inlet preceded by a non-zero MIDI velocity in the right inlet. This allows you to connect a <o>makenote</o> object directly to <o>sfizz~</o> to trigger notes.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="ARG_NAME_0" type="float" optional="0" />
			</arglist>
			<digest>
				Converted to <m>int</m> 
			</digest>
			<description>
				TEXT_HERE
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="ARG_NAME_0" type="list" optional="0" />
			</arglist>
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
		</method>
		<method name="(mouse)">
			<digest>
				View current file
			</digest>
			<description>
				Double-click to open a text editor to display and edit the contents of the currently loaded Sfz file.
			</description>
		</method>
		<method name="dictionary">
			<arglist>
				<arg name="ARG_NAME_0" type="symbol" optional="0" />
			</arglist>
			<digest>
				Specify Sfz data in Max dictionary format
			</digest>
			<description>
				The <o>sfizz~</o> object accepts Max dictionaries to define the current sample mapping. For examples of the dictionary format refer to the <b>dictionaries</b> tab of the <o>sfizz~</o> help file. The location of audio sample files referenced by a dictionary is more flexible than the Sfz file relative paths used by the standard Sfz format. Refer to the description of the
				<a>
					defaultpathmode
				</a>
				and
				<a>
					defaultpathname
				</a>
				attributes for more details.
				<br />
				The ability to generate sample data dynamically with a patch is one use case for the dictionary feature. You can even send dictionaries to <o>sfizz~</o> while it is playing notes; the new data will be utilized once all sounding notes have turned off.
			</description>
		</method>
		<method name="midievent">
			<arglist>
				<arg name="ARG_NAME_0" type="list" optional="0" />
			</arglist>
			<digest>
				Send a MIDI event to the sample player
			</digest>
			<description>
				<m>midievent</m> followed by two or more numbers, sends a MIDI note or control event to the plug-in. The first two to three numbers are bytes of the MIDI message. <o>sfizz~</o> supports an extension to standard MIDI with the third velocity value: if this is a <m>float</m> instead of an <m>int</m>, it will be interpreted as a &quot;high resolution&quot; velocity value between 0 (note-off) and 1 (maximum velocity).
				<br />
				<o>sfizz~</o> supports audio-rate MIDI connections from the <o>mc.midiplayer~</o> object.
			</description>
			<attributelist>
				<attribute name="audiothread" get="1" set="1" type="int" size="1" value="1" />
			</attributelist>
		</method>
		<method name="read">
			<arglist>
				<arg name="filename" type="symbol" optional="1" />
			</arglist>
			<digest>
				read an Sfz format file
			</digest>
			<description>
				When <m>read</m> is followed by a filename, <o>sfizz~</o> will locate the file in the Max search path and load it as the current sample player specification. With no arguments, <m>read</m> will show an open file dialog prompting you to choose an Sfz file.
				<br />
				If there are errors in the file they will be reported in the Max window. A sample file referenced in the Sfz file is not a fatal error; missing samples are displayed as warnings.
			</description>
		</method>
		<method name="readagain">
			<arglist />
			<digest>
				read the previously loaded file again
			</digest>
			<description>
				The <m>readagain</m> message will reload the previously loaded Sfz file (using the <m>read</m> message). <m>readagain</m> is useful after editing Sfz files with an external text editor.
			</description>
		</method>
		<method name="signal">
			<arglist />
			<digest>
				Connection to <o>mc.midiplayer~</o> 
			</digest>
			<description>
				The <o>sfizz~</o> object accepts a signal connection to <o>mc.midiplayer~</o> for sending audio-rate sample-accurate MIDI events. Connections from other signal objects to <o>sfizz~</o> are ignored.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="base" get="1" set="1" type="float" size="1">
			<digest>
				Base Frequency
			</digest>
			<description>
				Sets the &quot;base frequency&quot; used when calculating frequency values (e.g., A = 440.) from MIDI notes. The default base frequency is 440 Hz.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Base Frequency" />
			</attributelist>
		</attribute>
		<attribute name="defaultpathname" get="1" set="1" type="symbol" size="1">
			<digest>
				Dictionary Sample Pathname
			</digest>
			<description>
				Note:
				<a>
					defaultpathname
				</a>
				applies exclusively to dictionaries not standard Sfz format files.
				<br />
				When the
				<a>
					pathmode
				</a>
				attribute is set to 1, the value of the
				<a>
					defaultpathname
				</a>
				is used as the base path for sample references in a dictionary.
			</description>
			<attributelist>
				<attribute name="default" get="1" set="1" type="symbol" size="1" value="" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Dictionary Sample Pathname" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="filefolder" />
			</attributelist>
		</attribute>
		<attribute name="map" get="1" set="1" type="atom" size="1">
			<digest>
				Keyboard Map
			</digest>
			<description>
				TEXT_HERE
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Keyboard Map" />
			</attributelist>
		</attribute>
		<attribute name="mapname" get="1" set="1" type="symbol" size="1">
			<digest>
				Keyboard Map File
			</digest>
			<description>
				A set of values, given as a list, for a keyboard map in Scala format:
				<ul>
					<li>
						Size of map; the pattern repeats every so many keys (example: 12)
					</li>
					<li>
						First MIDI note number to retune (example: 0)
					</li>
					<li>
						Last MIDI note number to retune (example: 127)
					</li>
					<li>
						Middle note where the first entry of the mapping is mapped to (example: 60)
					</li>
					<li>
						Reference note for which frequency is given (example: 69)
					</li>
					<li>
						Frequency for reference note, as a float (example: 440.0)
					</li>
					<li>
						Frequency for reference note, as a float (example: 440.0)
					</li>
					<li>
						Scale degree to consider as formal octave, determines difference in pitch between adjacent mapping patterns (example: 12)
					</li>
					<li>
						Mapping (example: 0 1 2 3 4 5 6 7 8 9 10 11)
					</li>
				</ul>
				Note: to indicate an unmapped key, you can use either an &quot;x&quot; or &quot;-1&quot;. At the end of the list, unmapped keys may be left out. For more information about keyboard mappings, visit
				<a href="https://www.huygens-fokker.org/scala/help.htm#mappings">
					the Scala documentation.
				</a>
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Keyboard Map File" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="filename" />
			</attributelist>
		</attribute>
		<attribute name="mid" get="1" set="1" type="int" size="1">
			<digest>
				Middle Note Number
			</digest>
			<description>
				The note number where a Scala scale begins (default 60).
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Middle Note Number" />
			</attributelist>
		</attribute>
		<attribute name="outputs" get="1" set="1" type="int" size="1">
			<digest>
				Output Count
			</digest>
			<description>
				Sets the number of audio output channels. The minimum is 2 and the maximum is 1024. If you want more than the default stereo outputs, the Sfz file can specify a stereo output pair for a sample or region of samples using the <b>output</b> opcode. A value of 0 for the <b>output</b> opcode means output channels 1 and 2 in the <o>sfizz~</o> object. <b>output</b> 1 uses channels 3 and 4. If you created an object with 1024 audio output channels, the highest allowable value of the <b>output</b> opcode would be 511 (for channels 1023 and 1024). With any larger value of the
				<a>
					outputs
				</a>
				attribute you'll want to use the <o>mcs.sfizz~</o> object that combines all outputs into a single multi-channel patch cord.
			</description>
			<attributelist>
				<attribute name="default" get="1" set="1" type="int" size="1" value="2" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Output Count" />
			</attributelist>
		</attribute>
		<attribute name="pathmode" get="1" set="1" type="int" size="1">
			<digest>
				Path Mode
			</digest>
			<description>
				Determines how <o>sfizz~</o> locates sample files when using a dictionary. Note that
				<a>
					defaultpath
				</a>
				does not apply when reading in Sfz format files. For Sfz files, all samples must be specified as paths relative to the location of the Sfz file.
			</description>
			<attributelist>
				<attribute name="default" get="1" set="1" type="int" size="1" value="0" />
				<attribute name="enumvals" get="1" set="1" type="atom" size="5">
					<enumlist>
						<enum name="Default">
							<digest>
								Use Search Path
							</digest>
							<description>
								In this mode, <o>sfizz~</o> locates sample files in the Max search path.
							</description>
						</enum>
						<enum name="Max Library">
							<digest>
								Use Max Library folder
							</digest>
							<description>
								In this mode <o>sfizz~</o> prepends the full pathname of the Max library folder to any sample filename.
							</description>
						</enum>
						<enum name="Last Opened Sfz File">
							<digest>
								Use the location of the most recently opened Sfz file
							</digest>
							<description>
								In this mode <o>sfizz~</o> prepends the full pathname of the most recently opened Sfz file to any sample filename.
							</description>
						</enum>
						<enum name="Patcher File">
							<digest>
								Use the location of the patcher file containing the <o>sfizz~</o> object.
							</digest>
							<description>
								In this mode <o>sfizz~</o> prepends the full pathname of the patcher containing the object to any sample filename.
							</description>
						</enum>
						<enum name="default_path Opcode">
							<digest>
								Use a <b>default_path</b> opcode in the dictionary
							</digest>
							<description>
								In this mode <o>sfizz~</o> prepends the pathname of any <b>default_path</b> opcode contained in the dictionary to any sample filename.
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Path Mode" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enumindex" />
			</attributelist>
		</attribute>
		<attribute name="ref" get="1" set="1" type="int" size="1">
			<digest>
				Reference Note Number
			</digest>
			<description>
				The MIDI note number assigned to the base frequency (default 69).
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Reference Note Number" />
			</attributelist>
		</attribute>
		<attribute name="scale" get="1" set="1" type="atom" size="1">
			<digest>
				Scale Data
			</digest>
			<description>
				A set of values, given as a list, for a scale described using the Scala format. The first value is the count of notes, followed either by floats defining a value in cents (example: 579.47057) or a ratio of two ints (example: 5/4). For more information, see the
				<a href="https://www.huygens-fokker.org/scala/scl_format.html">
					the Scala documentation.
				</a>
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Scale Data" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="text_large" />
			</attributelist>
		</attribute>
		<attribute name="scalename" get="1" set="1" type="symbol" size="1">
			<digest>
				Scale Name
			</digest>
			<description>
				A valid scale name from the
				<a href="https://www.huygens-fokker.org/docs/scalesdir.txt">
					Scala archive
				</a>
				, will cause <o>sfizz~</o> to use the tuning described in that scale for its MIDI to frequency conversion. For this purposes of this attribute, the file extension (.scl) can be omitted.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Scale Name" />
			</attributelist>
		</attribute>
		<attribute name="voices" get="1" set="1" type="int" size="1">
			<digest>
				Maximum Polyphony
			</digest>
			<description>
				Sets the maximum number of simultaneously sounding voices. The default is 64.
			</description>
			<attributelist>
				<attribute name="default" get="1" set="1" type="int" size="1" value="64" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Maximum Polyphony" />
			</attributelist>
		</attribute>
		<attribute name="volume" get="1" set="1" type="float" size="1">
			<digest>
				Volume (dB)
			</digest>
			<description>
				Sets the global output volume in dB; 0 is the default while -70 is close to silence.
			</description>
			<attributelist>
				<attribute name="default" get="1" set="1" type="float" size="1" value="0." />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Volume (dB)" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example caption="" img="" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="makenote" />
		<seealso name="midiformat" />
		<seealso name="mc.midiplayer~" />
		<seealso name="mtof~" />
	</seealsolist>
	<mcwrapper>
		<mcwrappermethod name="applymessages" />
		<mcwrappermethod name="applynvalues" />
		<mcwrappermethod name="applyvalues" />
		<mcwrappermethod name="decide" />
		<mcwrappermethod name="deviate" />
		<mcwrappermethod name="ease.in_back" />
		<mcwrappermethod name="ease.in_bounce" />
		<mcwrappermethod name="ease.in_circular" />
		<mcwrappermethod name="ease.in_cubic" />
		<mcwrappermethod name="ease.in_elastic" />
		<mcwrappermethod name="ease.in_exponential" />
		<mcwrappermethod name="ease.in_out_back" />
		<mcwrappermethod name="ease.in_out_bounce" />
		<mcwrappermethod name="ease.in_out_circular" />
		<mcwrappermethod name="ease.in_out_cubic" />
		<mcwrappermethod name="ease.in_out_elastic" />
		<mcwrappermethod name="ease.in_out_exponential" />
		<mcwrappermethod name="ease.in_out_quadratic" />
		<mcwrappermethod name="ease.in_out_quartic" />
		<mcwrappermethod name="ease.in_out_quintic" />
		<mcwrappermethod name="ease.in_out_sine" />
		<mcwrappermethod name="ease.in_quadratic" />
		<mcwrappermethod name="ease.in_quartic" />
		<mcwrappermethod name="ease.in_quintic" />
		<mcwrappermethod name="ease.in_sine" />
		<mcwrappermethod name="ease.linear" />
		<mcwrappermethod name="ease.out_back" />
		<mcwrappermethod name="ease.out_bounce" />
		<mcwrappermethod name="ease.out_circular" />
		<mcwrappermethod name="ease.out_cubic" />
		<mcwrappermethod name="ease.out_elastic" />
		<mcwrappermethod name="ease.out_quadratic" />
		<mcwrappermethod name="ease.out_quartic" />
		<mcwrappermethod name="ease.out_quintic" />
		<mcwrappermethod name="ease.out_sine" />
		<mcwrappermethod name="exponential" />
		<mcwrappermethod name="generate" />
		<mcwrappermethod name="harmonic" />
		<mcwrappermethod name="increment" />
		<mcwrappermethod name="randomrange" />
		<mcwrappermethod name="replicatenvalues" />
		<mcwrappermethod name="replicatevalues" />
		<mcwrappermethod name="scaledexponential" />
		<mcwrappermethod name="setvalue" />
		<mcwrappermethod name="setvaluerange" />
		<mcwrappermethod name="smoothstep" />
		<mcwrappermethod name="spread" />
		<mcwrappermethod name="spreadexclusive" />
		<mcwrappermethod name="spreadincludefirst" />
		<mcwrappermethod name="spreadincludesecond" />
		<mcwrappermethod name="spreadinclusive" />
		<mcwrappermethod name="subharmonic" />
		<mcwrapperattr name="busymapname" />
		<mcwrapperattr name="bz" />
		<mcwrapperattr name="bzname" />
		<mcwrapperattr name="chans" />
		<mcwrapperattr name="fun" />
		<mcwrapperattr name="initialvalues" />
		<mcwrapperattr name="op" />
		<mcwrapperattr name="replicate" />
		<mcwrapperattr name="target" />
		<mcwrapperattr name="usebusymap" />
		<mcwrapperattr name="values" />
		<mcwrapperattr name="voiceprob" />
		<mcwrapperattr name="zero" />
	</mcwrapper>
</c74object>
