| 1 | |
| 2 | <refentry id="event_i"> |
| 3 | <indexterm id="IndexEventi"><primary>event_i</primary></indexterm> |
| 4 | <refentryinfo><title>Instrument Control:Invocation</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>event_i</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>event_i</refname> |
| 11 | <refpurpose> |
| 12 | Generates a score event from an instrument. |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para> |
| 19 | Generates a score event from an instrument. |
| 20 | </para> |
| 21 | </refsect1> |
| 22 | |
| 23 | <refsect1> |
| 24 | <title>Syntax</title> |
| 25 | <synopsis><command>event_i</command> "scorechar", iinsnum, idelay, idur, [, ip4] [, ip5] [, ...]</synopsis> |
| 26 | <synopsis><command>event_i</command> "scorechar", "insname", idelay, idur, [, ip4] [, ip5] [, ...]</synopsis> |
| 27 | </refsect1> |
| 28 | |
| 29 | <refsect1> |
| 30 | <title>Initialization</title> |
| 31 | <para> |
| 32 | <emphasis><quote>scorechar</quote></emphasis> -- A string (in double-quotes) representing the first p-field in a score statement. This is usually <link linkend="e"><citetitle><quote>e</quote></citetitle></link>, <link linkend="f"><citetitle><quote>f</quote></citetitle></link>, or <link linkend="i"><citetitle><quote>i</quote></citetitle></link>. |
| 33 | </para> |
| 34 | |
| 35 | <para> |
| 36 | <emphasis><quote>insname</quote></emphasis> -- A string (in double-quotes) representing a named instrument. |
| 37 | </para> |
| 38 | <para> |
| 39 | <emphasis>iinsnum</emphasis> -- The instrument to use for the event. This corresponds to the first p-field, p1, in a score statement. |
| 40 | </para> |
| 41 | |
| 42 | <para> |
| 43 | <emphasis>idelay</emphasis> -- When (in seconds) the event will occur from the current performance time. This corresponds to the second p-field, p2, in a score statement. |
| 44 | </para> |
| 45 | |
| 46 | <para> |
| 47 | <emphasis>idur</emphasis> -- How long (in seconds) the event will happen. This corresponds to the third p-field, p3, in a score statement. |
| 48 | </para> |
| 49 | |
| 50 | <para> |
| 51 | <emphasis>ip4, ip5, ...</emphasis> (optional) -- Parameters representing additional p-field in a score statement. It starts with the fourth p-field, p4. |
| 52 | </para> |
| 53 | </refsect1> |
| 54 | |
| 55 | <refsect1> |
| 56 | <title>Performance</title> |
| 57 | <para> The event is added to the queue at initialisation time.</para> |
| 58 | <note> |
| 59 | <para> Note that the <emphasis>event_i</emphasis> opcode cannot accept string p-fields. If you need to pass strings when instantiating an instrument, use the <link linkend="scoreline"><citetitle>scoreline</citetitle></link> or <link linkend="scoreline_i"><citetitle>scoreline_i</citetitle></link> opcode.</para> |
| 60 | </note> |
| 61 | </refsect1> |
| 62 | |
| 63 | <refsect1> |
| 64 | <title>Examples</title> |
| 65 | <para> |
| 66 | Here is an example of the event_i opcode. It uses the file <ulink url="examples/event_i.csd"><citetitle>event_i.csd</citetitle></ulink>. |
| 67 | <example> |
| 68 | <title>Example of the event_i opcode.</title> |
| 69 | <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> |
| 70 | <xi:include href="examples-xml/event_i.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 71 | </example> |
| 72 | </para> |
| 73 | </refsect1> |
| 74 | |
| 75 | <refsect1> |
| 76 | <title>See also</title> |
| 77 | <para><link linkend="ControlInvocat"><citetitle>Instrument Invocation</citetitle></link></para> |
| 78 | </refsect1> |
| 79 | |
| 80 | <refsect1> |
| 81 | <title>Credits</title> |
| 82 | <para>Written by &nameistvan;.</para> |
| 83 | <para>New in Csound5</para> |
| 84 | </refsect1> |
| 85 | </refentry> |