| 1 | |
| 2 | <refentry id="octmidi"> |
| 3 | <indexterm id="IndexOctmidi"><primary>octmidi</primary></indexterm> |
| 4 | <refentryinfo><title>Real-time MIDI:Converters</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>octmidi</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>octmidi</refname> |
| 13 | |
| 14 | <refpurpose> |
| 15 | Get the note number, in octave-point-decimal units, of the current MIDI event. |
| 16 | </refpurpose> |
| 17 | </refnamediv> |
| 18 | |
| 19 | <refsect1> |
| 20 | <title>Description</title> |
| 21 | <para> |
| 22 | Get the note number, in octave-point-decimal units, of the current MIDI event. |
| 23 | </para> |
| 24 | </refsect1> |
| 25 | |
| 26 | <refsect1> |
| 27 | <title>Syntax</title> |
| 28 | <synopsis>ioct <command>octmidi</command></synopsis> |
| 29 | </refsect1> |
| 30 | |
| 31 | <refsect1> |
| 32 | <title>Performance</title> |
| 33 | <para> |
| 34 | Get the note number of the current MIDI event, expressed in octave-point-decimal units, for local processing. |
| 35 | </para> |
| 36 | |
| 37 | <note> |
| 38 | <title>octmidi vs. octmidinn</title> |
| 39 | <para> |
| 40 | The <emphasis>octmidi</emphasis> opcode only produces meaningful results in a Midi-activated note (either real-time or from a Midi score with the -F flag). With <emphasis>octmidi</emphasis>, the Midi note number value is taken from the Midi event that is internally associated with the instrument instance. On the other hand, the <emphasis>octmidinn</emphasis> opcode may be used in any Csound instrument instance whether it is activated from a Midi event, score event, line event, or from another instrument. The input value for <emphasis>octmidinn</emphasis> might for example come from a p-field in a textual score or it may have been retrieved from the real-time Midi event that activated the current note using the <emphasis>notnum</emphasis> opcode. |
| 41 | </para> |
| 42 | </note> |
| 43 | </refsect1> |
| 44 | |
| 45 | <refsect1> |
| 46 | <title>Examples</title> |
| 47 | <para> |
| 48 | Here is an example of the octmidi opcode. It uses the file <ulink url="examples/octmidi.csd"><citetitle>octmidi.csd</citetitle></ulink>. |
| 49 | |
| 50 | <example> |
| 51 | <title>Example of the octmidi opcode.</title> |
| 52 | |
| 53 | |
| 54 | |
| 55 | <para>See the sections <link linkend="UsingRealTime"><citetitle>Real-time Audio</citetitle></link> and <link linkend="CommandFlags"><citetitle>Command Line Flags</citetitle></link> for more information on using command line flags.</para> |
| 56 | <xi:include href="examples-xml/octmidi.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 57 | </example> |
| 58 | </para> |
| 59 | </refsect1> |
| 60 | |
| 61 | <refsect1> |
| 62 | <title>See also</title> |
| 63 | <para><link linkend="MidiConvert"><citetitle>Midi Converters</citetitle></link></para> |
| 64 | </refsect1> |
| 65 | |
| 66 | <refsect1> |
| 67 | <title>Credits</title> |
| 68 | <para> |
| 69 | <simplelist> |
| 70 | <member>Author: &namebarry; - &namemike;</member> |
| 71 | <member>MIT - Mills</member> |
| 72 | <member>May 1997</member> |
| 73 | </simplelist> |
| 74 | </para> |
| 75 | <para>Example written by &namekevin;.</para> |
| 76 | </refsect1> |
| 77 | </refentry> |