| 1 | |
| 2 | <refentry id="dumpk4"> |
| 3 | <indexterm id="IndexDumpk4"><primary>dumpk4</primary></indexterm> |
| 4 | <refentryinfo><title>Signal I/O:File I/O</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>dumpk4</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>dumpk4</refname> |
| 11 | <refpurpose> |
| 12 | Periodically writes four orchestra control-signal values to an external file. |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para> |
| 19 | Periodically writes four orchestra control-signal values to a named external file in a specific format. |
| 20 | </para> |
| 21 | </refsect1> |
| 22 | |
| 23 | <refsect1> |
| 24 | <title>Syntax</title> |
| 25 | <synopsis><command>dumpk4</command> ksig1, ksig2, ksig3, ksig4, ifilname, iformat, iprd</synopsis> |
| 26 | </refsect1> |
| 27 | |
| 28 | <refsect1> |
| 29 | <title>Initialization</title> |
| 30 | <para> |
| 31 | <emphasis>ifilname</emphasis> -- character string (in double quotes, spaces permitted) denoting the external file name. May either be a full path name with target directory specified or a simple filename to be created within the current directory |
| 32 | </para> |
| 33 | |
| 34 | <para> |
| 35 | <emphasis>iformat</emphasis> -- specifies the output data format: |
| 36 | <itemizedlist> |
| 37 | <listitem> |
| 38 | <para>1 = 8-bit signed char(high order 8 bits of a 16-bit integer</para> |
| 39 | </listitem> |
| 40 | |
| 41 | <listitem> |
| 42 | <para>4 = 16-bit short integers</para> |
| 43 | </listitem> |
| 44 | |
| 45 | <listitem> |
| 46 | <para>5 = 32-bit long integers</para> |
| 47 | </listitem> |
| 48 | |
| 49 | <listitem> |
| 50 | <para>6 = 32-bit floats</para> |
| 51 | </listitem> |
| 52 | |
| 53 | <listitem> |
| 54 | <para>7 = ASCII long integers</para> |
| 55 | </listitem> |
| 56 | |
| 57 | <listitem> |
| 58 | <para>8 = ASCII floats (2 decimal places)</para> |
| 59 | </listitem> |
| 60 | </itemizedlist> |
| 61 | </para> |
| 62 | |
| 63 | <para> |
| 64 | Note that A-law and U-law output are not available, and that all formats except the last two are binary. The output file contains no header information. |
| 65 | </para> |
| 66 | |
| 67 | <para> |
| 68 | <emphasis>iprd</emphasis> -- the period of <emphasis>ksig</emphasis> output in seconds, rounded to the nearest orchestra control period. A value of 0 implies one control period (the enforced minimum), which will create an output file sampled at the orchestra control rate. |
| 69 | </para> |
| 70 | </refsect1> |
| 71 | |
| 72 | <refsect1> |
| 73 | <title>Performance</title> |
| 74 | <para> |
| 75 | <emphasis>ksig1, ksig2, ksig3, ksig4</emphasis> -- control-rate signals |
| 76 | </para> |
| 77 | |
| 78 | <para> |
| 79 | This opcode allows four generated control signal values to be saved in a named external file. The file contains no self-defining header information. But it contains a regularly sampled time series, suitable for later input or analysis. There may be any number of <emphasis>dumpk4</emphasis> opcodes in an instrument or orchestra but each must write to a different file. |
| 80 | </para> |
| 81 | </refsect1> |
| 82 | |
| 83 | <refsect1> |
| 84 | <title>Examples</title> |
| 85 | <para> |
| 86 | Here is an example of the dumpk4 opcode. It uses the file <ulink |
| 87 | url="examples/dumpk4.csd"><citetitle>dumpk4.csd</citetitle></ulink>. |
| 88 | Note that the example must be run from a directory for which the |
| 89 | user has write access. |
| 90 | |
| 91 | <example> |
| 92 | <title>Example of the dumpk4 opcode.</title> |
| 93 | |
| 94 | |
| 95 | |
| 96 | <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> |
| 97 | <xi:include href="examples-xml/dumpk4.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 98 | </example> |
| 99 | |
| 100 | The output should include lines like these: |
| 101 | <screen> |
| 102 | WRITING: |
| 103 | kcf = 1122.469723, kq = 11.762839, kdb = -14.313445, kpan = 0.538142 |
| 104 | kcf = 1122.469723, kq = 11.762839, kdb = -14.313445, kpan = 0.538142 |
| 105 | kcf = 1148.638412, kq = 12.040490, kdb = -14.061868, kpan = 0.552205 |
| 106 | kcf = 165.796855, kq = 18.523179, kdb = -15.816977, kpan = 0.901528 |
| 107 | kcf = 147.729960, kq = 13.071911, kdb = -11.924531, kpan = 0.982518 |
| 108 | kcf = 497.430113, kq = 13.605512, kdb = -21.586611, kpan = 0.179229 |
| 109 | |
| 110 | READING: |
| 111 | WARNING: Seeding from current time 3308160476 |
| 112 | |
| 113 | kcf = 1122.469700, kq = 11.762800, kdb = -14.313400, kpan = 0.538100 |
| 114 | kcf = 1122.469700, kq = 11.762800, kdb = -14.313400, kpan = 0.538100 |
| 115 | kcf = 1148.638400, kq = 12.040500, kdb = -14.061900, kpan = 0.552200 |
| 116 | kcf = 165.796900, kq = 18.523200, kdb = -15.817000, kpan = 0.901500 |
| 117 | kcf = 147.730000, kq = 13.071900, kdb = -11.924500, kpan = 0.982500 |
| 118 | kcf = 497.430100, kq = 13.605500, kdb = -21.586600, kpan = 0.179200 |
| 119 | </screen> |
| 120 | </para> |
| 121 | </refsect1> |
| 122 | |
| 123 | <refsect1> |
| 124 | <title>See also</title> |
| 125 | <para><link linkend="SigioFileIO"><citetitle>File Input and Output</citetitle></link></para> |
| 126 | </refsect1> |
| 127 | |
| 128 | <refsect1> |
| 129 | <title>Credits</title> |
| 130 | <para>By: &namejohn; and &namebarry;</para> |
| 131 | <para>1999 or earlier</para> |
| 132 | </refsect1> |
| 133 | </refentry> |