| 1 | |
| 2 | <refentry id="ctrlpreset"> |
| 3 | <indexterm id="IndexCtrlpreset"><primary>ctrlpreset</primary></indexterm> |
| 4 | <refentryinfo><title>Real-time MIDI:Input</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>ctrlpreset</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>ctrlpreset</refname> |
| 11 | <refpurpose> |
| 12 | Defines a preset for MIDI controllers. |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para> |
| 19 | Defines a preset like a ctrlinit for MIDI controllers. |
| 20 | </para> |
| 21 | </refsect1> |
| 22 | |
| 23 | <refsect1> |
| 24 | <title>Syntax</title> |
| 25 | <synopsis>kpreset <command>ctrlpreset</command> ktag, kchnl, kctlno1, [kctlno2] [, kctlno3] ...</synopsis> |
| 26 | </refsect1> |
| 27 | |
| 28 | <refsect1> |
| 29 | <title>Initialization</title> |
| 30 | <para> |
| 31 | At initialisation time an internal data structure is created to |
| 32 | save the preset, ensuring it is sufficiently large. |
| 33 | </para> |
| 34 | |
| 35 | </refsect1> |
| 36 | |
| 37 | <refsect1> |
| 38 | <title>Performance</title> |
| 39 | <para> |
| 40 | <emphasis>kpreset</emphasis> -- the numeric tag for where the |
| 41 | preset it stored. If ktag is not zero kpreset will be the same |
| 42 | as ktag. |
| 43 | </para> |
| 44 | <para> |
| 45 | <emphasis>ktag</emphasis> -- the tag for this preset; either a |
| 46 | strictly positive integer or zero if the system is to allocate |
| 47 | an unused preset. |
| 48 | </para> |
| 49 | <para> |
| 50 | <emphasis>kchanl</emphasis> -- the MIDI channel to which te |
| 51 | preset refers. |
| 52 | </para> |
| 53 | <para> |
| 54 | <emphasis>kctlno1</emphasis>, <emphasis>kctlno1</emphasis>, |
| 55 | etc. -- MIDI controller numbers and values (0-127). up to 16 |
| 56 | initialisation values are permitted. |
| 57 | </para> |
| 58 | </refsect1> |
| 59 | |
| 60 | <refsect1> |
| 61 | <title>Examples</title> |
| 62 | <para> |
| 63 | Here is an example of the ctrlpreset opcode. It uses the file <ulink url="examples/ctrls.csd"><citetitle>ctrls.csd</citetitle></ulink>. |
| 64 | <example> |
| 65 | <title>Example of the ctrlpreset opcode.</title> |
| 66 | <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> |
| 67 | <xi:include href="examples-xml/ctrls.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 68 | </example> |
| 69 | </para> |
| 70 | </refsect1> |
| 71 | |
| 72 | <refsect1> |
| 73 | <title>See also</title> |
| 74 | <para><link linkend="MidiInput"><citetitle>MIDI input and Initialization</citetitle></link></para> |
| 75 | </refsect1> |
| 76 | |
| 77 | <refsect1> |
| 78 | <title>Credits</title> |
| 79 | <para> |
| 80 | <simplelist> |
| 81 | <member>Authors: &namejohn; and Richard Boulanger</member> |
| 82 | </simplelist> |
| 83 | </para> |
| 84 | |
| 85 | <para>New in Csound version 6.16</para> |
| 86 | </refsect1> |
| 87 | </refentry> |