| 1 | |
| 2 | <refentry id="initc14"> |
| 3 | <indexterm id="IndexInitc14"><primary>initc14</primary></indexterm> |
| 4 | <refentryinfo><title>Real-time MIDI:Input</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>initc14</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>initc14</refname> |
| 13 | |
| 14 | <refpurpose> |
| 15 | Initializes the controllers used to create a 14-bit MIDI value. |
| 16 | </refpurpose> |
| 17 | </refnamediv> |
| 18 | |
| 19 | <refsect1> |
| 20 | <title>Description</title> |
| 21 | <para> |
| 22 | Initializes the controllers used to create a 14-bit MIDI value. |
| 23 | </para> |
| 24 | </refsect1> |
| 25 | |
| 26 | <refsect1> |
| 27 | <title>Syntax</title> |
| 28 | <synopsis><command>initc14</command> ichan, ictlno1, ictlno2, ivalue</synopsis> |
| 29 | </refsect1> |
| 30 | |
| 31 | <refsect1> |
| 32 | <title>Initialization</title> |
| 33 | <para> |
| 34 | <emphasis>ichan</emphasis> -- MIDI channel (1-16) |
| 35 | </para> |
| 36 | |
| 37 | <para> |
| 38 | <emphasis>ictlno1</emphasis> -- most significant byte controller number (0-127) |
| 39 | </para> |
| 40 | |
| 41 | <para> |
| 42 | <emphasis>ictlno2</emphasis> -- least significant byte controller number (0-127) |
| 43 | </para> |
| 44 | |
| 45 | <para> |
| 46 | <emphasis>ivalue</emphasis> -- floating point value (must be within 0 to 1) |
| 47 | </para> |
| 48 | </refsect1> |
| 49 | |
| 50 | <refsect1> |
| 51 | <title>Performance</title> |
| 52 | <para> |
| 53 | <emphasis>initc14</emphasis> can be used together with both <link linkend="midic14"><citetitle>midic14</citetitle></link> and <link linkend="ctrl14"><citetitle>ctrl14</citetitle></link> opcodes for initializing the first controller's value. <emphasis>ivalue</emphasis> argument must be set with a number within 0 to 1. An error occurs if it is not. Use the following formula to set <emphasis>ivalue</emphasis> according with <emphasis>midic14</emphasis> and <emphasis>ctrl14</emphasis> min and max range: |
| 54 | |
| 55 | <literallayout> |
| 56 | ivalue = (initial_value - min) / (max - min) |
| 57 | </literallayout> |
| 58 | </para> |
| 59 | </refsect1> |
| 60 | |
| 61 | <refsect1> |
| 62 | <title>See also</title> |
| 63 | <para><link linkend="MidiInput"><citetitle>MIDI input and Initialization</citetitle></link></para> |
| 64 | </refsect1> |
| 65 | |
| 66 | <refsect1> |
| 67 | <title>Credits</title> |
| 68 | <para> |
| 69 | <simplelist> |
| 70 | <member>Author: &namegabriel;</member> |
| 71 | <member>Italy</member> |
| 72 | </simplelist> |
| 73 | </para> |
| 74 | |
| 75 | <para>New in Csound version 3.47</para> |
| 76 | <para>Thanks goes to &namerasmus; for pointing out the correct MIDI channel and controller number ranges.</para> |
| 77 | </refsect1> |
| 78 | </refentry> |