<?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.ftom~" module="msp" category="MSP Operators, Multichannel">
	<digest>
		Convert frequency to MIDI note numbers at signal-rate (multichannel)
	</digest>
	<description>
		Use <o>ftom~</o> to convert frequency to MIDI note numbers at signal rate
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			MSP
		</metadata>
		<metadata name="tag">
			MSP Operators
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="signal">
			<digest>
				Frequency in Hz
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="signal">
			<digest>
				Frequency in Hz
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="signal">
			<digest>
				Floating-point MIDI Note Number
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg id="0" name="OBJARG_NAME" type="OBJARG_TYPE" optional="0">
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="signal">
			<arglist />
			<digest>
				Convert frequency to MIDI note number
			</digest>
			<description>
				Outputs the MIDI note number (from 0 to 127) corresponding to the input frequency
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="base" get="1" set="1" type="float" size="1">
			<digest>
				Base frequency for conversion
			</digest>
			<description>
				Sets the &quot;base frequency&quot; used when converting frequency values (e.g., A = 440.). The default is 440.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Base Frequency" />
			</attributelist>
		</attribute>
		<attribute name="map" get="1" set="1" type="atom" size="1">
			<digest>
				Keyboard Map
			</digest>
			<description>
				A set of values 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 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" />
			</attributelist>
		</attribute>
		<attribute name="mapname" get="1" set="1" type="symbol" size="1">
			<digest>
				Keyboard Map File
			</digest>
			<description>
				The name of a valid keyboard map file in Scala format that has been saved in Max's search path will cause <o>ftom~</o> to use that mapping. The file extension (.kbm) can be omitted. 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="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>ftom~</o> to use the tuning described in that scale for its frequency to MIDI 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>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="ftom~.png" caption="Convert from Frequency in Hz to MIDI" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="expr" />
		<seealso name="ftom" />
		<seealso name="mtof" />
		<seealso name="mtof~" />
	</seealsolist>
	<misc name="Output">
		<entry name="signal">
			<description>
				The MIDI note number that corresponds to the input frequency is output as a signal. When an input frequency falls between two pitches, the fractional part of the MIDI value is included.
			</description>
		</entry>
	</misc>
	<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="target" />
		<mcwrapperattr name="usebusymap" />
		<mcwrapperattr name="values" />
		<mcwrapperattr name="voiceprob" />
		<mcwrapperattr name="zero" />
	</mcwrapper>
</c74object>
