| 1 | |
| 2 | <refentry id="midic7"> |
| 3 | <indexterm id="IndexMidic7"><primary>midic7</primary></indexterm> |
| 4 | <refentryinfo><title>Real-time MIDI:Input</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>midic7</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>midic7</refname> |
| 13 | |
| 14 | <refpurpose> |
| 15 | Allows a floating-point 7-bit MIDI signal scaled with a minimum and a maximum range. |
| 16 | </refpurpose> |
| 17 | </refnamediv> |
| 18 | |
| 19 | <refsect1> |
| 20 | <title>Description</title> |
| 21 | <para> |
| 22 | Allows a floating-point 7-bit MIDI signal scaled with a minimum and a maximum range. |
| 23 | </para> |
| 24 | </refsect1> |
| 25 | |
| 26 | <refsect1> |
| 27 | <title>Syntax</title> |
| 28 | <synopsis>idest <command>midic7</command> ictlno, imin, imax [, ifn]</synopsis> |
| 29 | |
| 30 | <synopsis>kdest <command>midic7</command> ictlno, kmin, kmax [, ifn]</synopsis> |
| 31 | </refsect1> |
| 32 | |
| 33 | <refsect1> |
| 34 | <title>Initialization</title> |
| 35 | <para> |
| 36 | <emphasis>idest</emphasis> -- output signal |
| 37 | </para> |
| 38 | |
| 39 | <para> |
| 40 | <emphasis>ictlno</emphasis> -- MIDI controller number (0-127) |
| 41 | </para> |
| 42 | |
| 43 | <para> |
| 44 | <emphasis>imin</emphasis> -- user-defined minimum floating-point value of output |
| 45 | </para> |
| 46 | |
| 47 | <para> |
| 48 | <emphasis>imax</emphasis> -- user-defined maximum floating-point value of output |
| 49 | </para> |
| 50 | |
| 51 | <para> |
| 52 | <emphasis>ifn</emphasis> (optional) -- table to be read when indexing is required. Table must be normalized. Output is scaled according to the <emphasis>imin</emphasis> and <emphasis>imax</emphasis> values. |
| 53 | </para> |
| 54 | </refsect1> |
| 55 | |
| 56 | <refsect1> |
| 57 | <title>Performance</title> |
| 58 | <para> |
| 59 | <emphasis>kdest</emphasis> -- output signal |
| 60 | </para> |
| 61 | |
| 62 | <para> |
| 63 | <emphasis>kmin</emphasis> -- user-defined minimum floating-point value of output |
| 64 | </para> |
| 65 | |
| 66 | <para> |
| 67 | <emphasis>kmax</emphasis> -- user-defined maximum floating-point value of output |
| 68 | </para> |
| 69 | |
| 70 | <para> |
| 71 | <emphasis>midic7</emphasis> (i- and k-rate 7 bit MIDI control) allows a floating-point 7-bit MIDI signal scaled with a minimum and a maximum range. It also allows optional non-interpolated table indexing. In <emphasis>midic7</emphasis> minimum and maximum values can be varied at k-rate. |
| 72 | </para> |
| 73 | <note> |
| 74 | <para>Please note that the <emphasis>midic</emphasis> family of |
| 75 | opcodes are designed for MIDI triggered events, and do not require a channel number since they will respond to the same channel as the one that triggered the instrument (see <link linkend="massign"><citetitle>massign</citetitle></link>). However they will crash if called from a score driven event.</para> |
| 76 | </note> |
| 77 | </refsect1> |
| 78 | |
| 79 | <refsect1> |
| 80 | <title>Examples</title> |
| 81 | <para> |
| 82 | Here is an example of the midic7 opcode. It uses the file <ulink url="examples/midic7.csd"><citetitle>midic7.csd</citetitle></ulink> |
| 83 | <example> |
| 84 | <title>Example of the midic7 opcode.</title> |
| 85 | <xi:include href="examples-xml/midic7.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 86 | </example> |
| 87 | </para> |
| 88 | </refsect1> |
| 89 | |
| 90 | <refsect1> |
| 91 | <title>See also</title> |
| 92 | <para><link linkend="MidiInput"><citetitle>MIDI input and Initialization</citetitle></link></para> |
| 93 | </refsect1> |
| 94 | |
| 95 | <refsect1> |
| 96 | <title>Credits</title> |
| 97 | <para> |
| 98 | <simplelist> |
| 99 | <member>Author: &namegabriel;</member> |
| 100 | <member>Italy</member> |
| 101 | </simplelist> |
| 102 | </para> |
| 103 | |
| 104 | <para>New in Csound version 3.47</para> |
| 105 | <para>Thanks goes to &namerasmus; for pointing out the correct controller number range.</para> |
| 106 | </refsect1> |
| 107 | </refentry> |