| 1 |
|
| 2 |
<refentry id="ftom"> |
| 3 |
<indexterm id="IndexFtom"><primary>ftom</primary></indexterm> |
| 4 |
|
| 5 |
<refentryinfo><title>Pitch Converters:Functions</title></refentryinfo> |
| 6 |
<refmeta> |
| 7 |
<refentrytitle>ftom</refentrytitle> |
| 8 |
</refmeta> |
| 9 |
|
| 10 |
<refnamediv> |
| 11 |
<refname>ftom</refname> |
| 12 |
<refpurpose> |
| 13 |
Convert frequency to midi |
| 14 |
</refpurpose> |
| 15 |
</refnamediv> |
| 16 |
|
| 17 |
<refsect1> |
| 18 |
<title>Description</title> |
| 19 |
<para>Plugin opcode in emugens.</para> |
| 20 |
<para> |
| 21 |
Convert frequency to midi note number, taking global value |
| 22 |
of A4 into account. |
| 23 |
</para> |
| 24 |
</refsect1> |
| 25 |
|
| 26 |
<refsect1> |
| 27 |
<title>Syntax</title> |
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
<synopsis>imidi <command>ftom</command> ifreq [,irnd]</synopsis> |
| 32 |
|
| 33 |
<synopsis>kmidi <command>ftom</command> kfreq [,irnd]</synopsis> |
| 34 |
|
| 35 |
<synopsis>imidis[] <command>ftom</command> ifreqs[] [,irnd]</synopsis> |
| 36 |
|
| 37 |
<synopsis>kmidis[] <command>ftom</command> kfreqs[] [,irnd]</synopsis> |
| 38 |
|
| 39 |
</refsect1> |
| 40 |
|
| 41 |
<refsect1> |
| 42 |
|
| 43 |
<title>Performance</title> |
| 44 |
|
| 45 |
<para> |
| 46 |
<emphasis>kfreq</emphasis> / <emphasis>ifreq</emphasis> -- Frequency |
| 47 |
</para> |
| 48 |
<para> |
| 49 |
<emphasis>irnd</emphasis> -- Optional, if non-zero the result is |
| 50 |
rounded to the nearest integer (default zero). |
| 51 |
</para> |
| 52 |
<para> |
| 53 |
<emphasis>kmidi</emphasis> / <emphasis>imidi</emphasis> -- |
| 54 |
Corresponding midi note number |
| 55 |
</para> |
| 56 |
<note> |
| 57 |
<para> |
| 58 |
Set the global <link linkend="A4"><citetitle>A4</citetitle></link> |
| 59 |
value at the header to modify the tuning |
| 60 |
</para> |
| 61 |
</note> |
| 62 |
|
| 63 |
</refsect1> |
| 64 |
<refsect1> |
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
<title>Examples</title> |
| 69 |
<para> |
| 70 |
Here is an example of the ftom opcode. It uses the file <ulink url="examples/mtof-ftom.csd"><citetitle>mtof-ftom.csd</citetitle></ulink>. |
| 71 |
<example> |
| 72 |
<title>Example of the ftom opcode.</title> |
| 73 |
<xi:include href="examples-xml/mtof-ftom.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 74 |
</example> |
| 75 |
</para> |
| 76 |
</refsect1> |
| 77 |
|
| 78 |
<refsect1> |
| 79 |
<title>See also</title> |
| 80 |
<para><link linkend="PitchFuncs"><citetitle>Pitch Converters: Functions</citetitle></link></para> |
| 81 |
<para><link linkend="MidiConvert"><citetitle>Midi Converters</citetitle></link></para> |
| 82 |
</refsect1> |
| 83 |
|
| 84 |
<refsect1> |
| 85 |
|
| 86 |
<title>Credits</title> |
| 87 |
<para>By: &nameeduardo; 2017</para> |
| 88 |
<para>New in version 6.09</para> |
| 89 |
<para>Rounding option new in 6.12</para> |
| 90 |
<para>Array version new in 6.13</para> |
| 91 |
</refsect1> |
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
</refentry> |