Debian Codegraph @

opcodes/midion.xml

raw symbols SCIP
1
2 <refentry id="midion">
3 <indexterm id="IndexMidion"><primary>midion</primary></indexterm>
4 <refentryinfo><title>Real-time MIDI:Note Output</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>midion</refentrytitle>
7 </refmeta>
8
9
10
11 <refnamediv>
12 <refname>midion</refname>
13
14 <refpurpose>
15 Generates MIDI note messages at k-rate.
16 </refpurpose>
17 </refnamediv>
18
19 <refsect1>
20 <title>Description</title>
21 <para>
22 Generates MIDI note messages at k-rate.
23 </para>
24 </refsect1>
25
26 <refsect1>
27 <title>Syntax</title>
28 <synopsis><command>midion</command> kchn, knum, kvel</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>knum</emphasis> -- note number (0-127)
39 </para>
40
41 <para>
42 <emphasis>kvel</emphasis> -- velocity (0-127)
43 </para>
44
45 <para>
46 <emphasis>midion</emphasis> (k-rate note on) plays MIDI notes with current <emphasis>kchn</emphasis>, <emphasis>knum</emphasis> and <emphasis>kvel</emphasis>. These arguments can be varied at k-rate. Each time the MIDI converted value of any of these arguments changes, last MIDI note played by current instance of <emphasis>midion</emphasis> is immediately turned off and a new note with the new argument values is activated. This opcode, as well as <emphasis>moscil</emphasis>, can generate very complex melodic textures if controlled by complex k-rate signals.
47 </para>
48
49 <para>
50 Any number of <emphasis>midion</emphasis> opcodes can appear in the same Csound instrument, allowing a counterpoint-style polyphony within a single instrument.
51 </para>
52 </refsect1>
53
54 <refsect1>
55 <title>Examples</title>
56 <para>
57 Here is a simple example of the midion opcode. It uses the file <ulink url="examples/midion_simple.csd"><citetitle>midion_simple.csd</citetitle></ulink>.
58 <example>
59 <title>Simple Example of the midion opcode.</title>
60 <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>
61 <para>This example generates a minor chord over every note received on the MIDI input. It generates MIDI notes on csound's MIDI output, so be sure to connect something.</para>
62 <xi:include href="examples-xml/midion_simple.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
63 </example>
64 Here is another example of the midion opcode. It uses the file <ulink url="examples/midion_scale.csd"><citetitle>midion_scale.csd</citetitle></ulink>.
65 <example>
66 <title>Example of the midion opcode to generate random notes from a scale.</title>
67 <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>
68 <para>This example generates random notes from a given scale for every note received on the MIDI input. It generates MIDI notes on csound's MIDI output, so be sure to connect something.</para>
69 <xi:include href="examples-xml/midion_scale.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
70 </example>
71 </para>
72 </refsect1>
73
74 <refsect1>
75 <title>See also</title>
76 <para><link linkend="MidiOnoff"><citetitle>Note-on/Note-off Output</citetitle></link></para>
77 </refsect1>
78
79 <refsect1>
80 <title>Credits</title>
81 <para>
82 <simplelist>
83 <member>Author: &namegabriel;</member>
84 <member>Italy</member>
85 <member>May 1997</member>
86 </simplelist>
87 </para>
88
89 <para>Thanks goes to &namerasmus; for pointing out the correct MIDI channel and controller number ranges.</para>
90 </refsect1>
91 </refentry>