| 1 | |
| 2 | <refentry id="midictrl"> |
| 3 | <indexterm id="IndexMidictrl"><primary>midictrl</primary></indexterm> |
| 4 | <refentryinfo><title>Real-time MIDI:Input</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>midictrl</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>midictrl</refname> |
| 13 | |
| 14 | <refpurpose> |
| 15 | Get the current value (0-127) of a specified MIDI controller. |
| 16 | </refpurpose> |
| 17 | </refnamediv> |
| 18 | |
| 19 | <refsect1> |
| 20 | <title>Description</title> |
| 21 | <para> |
| 22 | Get the current value (0-127) of a specified MIDI controller. |
| 23 | </para> |
| 24 | </refsect1> |
| 25 | |
| 26 | <refsect1> |
| 27 | <title>Syntax</title> |
| 28 | <synopsis>ival <command>midictrl</command> inum [, imin] [, imax]</synopsis> |
| 29 | |
| 30 | <synopsis>kval <command>midictrl</command> inum [, imin] [, imax]</synopsis> |
| 31 | </refsect1> |
| 32 | |
| 33 | <refsect1> |
| 34 | <title>Initialization</title> |
| 35 | <para> |
| 36 | <emphasis>inum</emphasis> -- MIDI controller number (0-127) |
| 37 | </para> |
| 38 | |
| 39 | <para> |
| 40 | <emphasis>imin, imax</emphasis> -- set minimum and maximum limits on values obtained. |
| 41 | </para> |
| 42 | </refsect1> |
| 43 | |
| 44 | <refsect1> |
| 45 | <title>Performance</title> |
| 46 | <para> |
| 47 | Get the current value (0-127) of a specified MIDI controller. |
| 48 | </para> |
| 49 | </refsect1> |
| 50 | |
| 51 | <refsect1> |
| 52 | <title>Warning</title> |
| 53 | <para> |
| 54 | <emphasis>midictrl</emphasis> should only be used in notes that were triggered from MIDI, so that an associated channel number is available. For notes activated from the score, line events, or orchestra, the <link linkend="ctrl7"><citetitle>ctrl7</citetitle></link> opcode that takes an explicit channel number should be used instead. |
| 55 | </para> |
| 56 | </refsect1> |
| 57 | |
| 58 | <refsect1> |
| 59 | <title>Examples</title> |
| 60 | <para> |
| 61 | Here is an example of the midictrl opcode. It uses the file <ulink url="examples/midictrl.csd"><citetitle>midictrl.csd</citetitle></ulink> |
| 62 | <example> |
| 63 | <title>Example of the midictrl opcode.</title> |
| 64 | <xi:include href="examples-xml/midictrl.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 65 | </example> |
| 66 | </para> |
| 67 | </refsect1> |
| 68 | |
| 69 | <refsect1> |
| 70 | <title>See also</title> |
| 71 | <para><link linkend="MidiInput"><citetitle>MIDI input and Initialization</citetitle></link></para> |
| 72 | </refsect1> |
| 73 | |
| 74 | <refsect1> |
| 75 | <title>Credits</title> |
| 76 | <para> |
| 77 | <simplelist> |
| 78 | <member>Author: &namebarry; - &namemike;</member> |
| 79 | <member>MIT - Mills</member> |
| 80 | <member>May 1997</member> |
| 81 | </simplelist> |
| 82 | </para> |
| 83 | |
| 84 | <para>Thanks goes to &namerasmus; for pointing out the correct controller number range.</para> |
| 85 | </refsect1> |
| 86 | </refentry> |