| 1 | |
| 2 | <refentry id="outkc14"> |
| 3 | <indexterm id="IndexOutkc14"><primary>outkc14</primary></indexterm> |
| 4 | <refentryinfo><title>Real-time MIDI:Output</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>outkc14</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>outkc14</refname> |
| 13 | |
| 14 | <refpurpose> |
| 15 | Sends 14-bit MIDI controller output at k-rate. |
| 16 | </refpurpose> |
| 17 | </refnamediv> |
| 18 | |
| 19 | <refsect1> |
| 20 | <title>Description</title> |
| 21 | <para> |
| 22 | Sends 14-bit MIDI controller output at k-rate. |
| 23 | </para> |
| 24 | </refsect1> |
| 25 | |
| 26 | <refsect1> |
| 27 | <title>Syntax</title> |
| 28 | <synopsis><command>outkc14</command> kchn, kmsb, klsb, kvalue, kmin, kmax</synopsis> |
| 29 | </refsect1> |
| 30 | |
| 31 | <refsect1> |
| 32 | <title>Performance</title> |
| 33 | <para> |
| 34 | <emphasis>kchn</emphasis> -- MIDI channel number (1-16) |
| 35 | </para> |
| 36 | |
| 37 | <para> |
| 38 | <emphasis>kmsb</emphasis> -- most significant byte controller number when using 14-bit parameters (0-127) |
| 39 | </para> |
| 40 | |
| 41 | <para> |
| 42 | <emphasis>klsb</emphasis> -- least significant byte controller number when using 14-bit parameters (0-127) |
| 43 | </para> |
| 44 | |
| 45 | <para> |
| 46 | <emphasis>kvalue</emphasis> -- floating point value |
| 47 | </para> |
| 48 | |
| 49 | <para> |
| 50 | <emphasis>kmin</emphasis> -- minimum floating point value (converted in MIDI integer value 0) |
| 51 | </para> |
| 52 | |
| 53 | <para> |
| 54 | <emphasis>kmax</emphasis> -- maximum floating point value (converted in MIDI integer value 16383 (14-bit)) |
| 55 | </para> |
| 56 | |
| 57 | <para> |
| 58 | <emphasis>outkc14</emphasis> (k-rate MIDI 14-bit controller output) sends a pair of controller messages. It works only with MIDI instruments which recognize them. These opcodes can drive 14-bit parameters on MIDI instruments that recognize them. The first control message contains the most significant byte of <emphasis>kvalue</emphasis> argument while the second message contains the less significant byte. <emphasis>kmsb</emphasis> and <emphasis>klsb</emphasis> are the number of the most and less significant controller. |
| 59 | </para> |
| 60 | |
| 61 | <para> |
| 62 | It can drive a different value of a parameter for each note currently active. |
| 63 | </para> |
| 64 | |
| 65 | <para> |
| 66 | It can scale the k-value floating-point argument according to the <emphasis>kmin</emphasis> and <emphasis>kmax</emphasis> values. For example: set <emphasis>kmin</emphasis> = 1.0 and <emphasis>kmax</emphasis> = 2.0. |
| 67 | When the <emphasis>kvalue</emphasis> argument receives a 2.0 value, the opcode will send a 127 value to the MIDI OUT device. When the <emphasis>kvalue</emphasis> argument receives a 1.0 value, it will send a 0 value. k-rate opcodes send a message each time the MIDI converted value of argument <emphasis>kvalue</emphasis> changes. |
| 68 | </para> |
| 69 | </refsect1> |
| 70 | |
| 71 | <refsect1> |
| 72 | <title>See also</title> |
| 73 | <para><link linkend="MidiOutput"><citetitle>MIDI Message Output</citetitle></link></para> |
| 74 | </refsect1> |
| 75 | |
| 76 | <refsect1> |
| 77 | <title>Credits</title> |
| 78 | <para> |
| 79 | <simplelist> |
| 80 | <member>Author: &namegabriel;</member> |
| 81 | <member>Italy</member> |
| 82 | </simplelist> |
| 83 | </para> |
| 84 | |
| 85 | <para>New in Csound version 3.47</para> |
| 86 | <para>Thanks goes to &namerasmus; for pointing out the correct MIDI channel and controller number ranges.</para> |
| 87 | </refsect1> |
| 88 | </refentry> |