Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > 5fcfcb7517038d1f44ab4e478e6e61fa > files > 1992

csound-doc-6.10.0-1.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>hdf5write</title>
    <link rel="stylesheet" type="text/css" href="csound.css" />
    <link rel="stylesheet" type="text/css" href="syntax-highlighting.css" />
    <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" />
    <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" />
    <link rel="up" href="OpcodesTop.html" title="Orchestra Opcodes and Operators" />
    <link rel="prev" href="hdf5read.html" title="hdf5read" />
    <link rel="next" href="hilbert.html" title="hilbert" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">hdf5write</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="hdf5read.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="hilbert.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry">
      <a id="hdf5write"></a>
      <div class="titlepage"></div>
      <a id="IndexHdf5write" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">hdf5write</span>
        </h2>
        <p>hdf5write — 
      Write signals and arrays to an hdf5 file.
    </p>
      </div>
      <div class="refsect1">
        <a id="idm281472925976808"></a>
        <h2>Description</h2>
        <p>
      <span class="emphasis"><em>hdf5write</em></span> writes <span class="emphasis"><em>N</em></span> signals and arrays to a specified hdf5 file.
    </p>
      </div>
      <div class="refsect1">
        <a id="idm281472925905192"></a>
        <h2>Syntax</h2>
        <pre class="synopsis"><span class="command"><strong>hdf5write</strong></span> ifilename, xout1[, xout2, xout3, ..., xoutN]</pre>
      </div>
      <div class="refsect1">
        <a id="idm281472925903112"></a>
        <h2>Initialization</h2>
        <p>
      <span class="emphasis"><em>ifilename</em></span> -- the hdf5 file's name (in double-quotes). If the file does not exist it will be created.
    </p>
      </div>
      <div class="refsect1">
        <a id="idm281472925901400"></a>
        <h2>Performance</h2>
        <p>
      <span class="emphasis"><em>xout1,... xoutN</em></span> -- signals or arrays to be written to the hdf5 file. This opcode accepts i-rate, k-rate, a-rate signals or i-rate, k-rate, a-rate arrays of any dimension. These signals or arrays are written to a dataset within the hdf5 file using the same variable name as in Csound. For example, if the Csound variable is called 'ksignal', then the name of the hdf5 dataset is 'ksignal'. Any number and multiple types of datasets may be written at a time.
    </p>
      </div>
      <div class="refsect1">
        <a id="idm281472925899336"></a>
        <h2>Examples</h2>
        <p>
      Here is a simple example of the hdf5write opcode. It uses the file <a class="ulink" href="examples/hdf5write.csd" target="_top"><em class="citetitle">hdf5write.csd</em></a>.

      </p>
        <div class="example">
          <a id="idm281472925897560"></a>
          <p class="title">
            <strong>Example 398. Example of the hdf5write opcode.</strong>
          </p>
          <div class="example-contents">
            <p>See the sections <a class="link" href="UsingRealTime.html" title="Real-Time Audio"><em class="citetitle">Real-time Audio</em></a> and <a class="link" href="CommandFlags.html" title="Csound command line"><em class="citetitle">Command Line Flags</em></a> for more information on using command line flags.</p>
            <div class="refsect1">
              <a id="idm281472755264744"></a>
              <pre class="programlisting">
<span class="nt">&lt;CsoundSynthesizer&gt;</span>
<span class="nt">&lt;CsOptions&gt;</span>
-odac
<span class="nt">&lt;/CsOptions&gt;</span>
<span class="nt">&lt;CsInstruments&gt;</span>
<span class="vg">nchnls</span> <span class="o">=</span> <span class="mi">2</span>
<span class="vg">0dbfs</span> <span class="o">=</span> <span class="mi">1</span>
<span class="vg">ksmps</span> <span class="o">=</span> <span class="mi">8</span>
<span class="vg">sr</span> <span class="o">=</span> <span class="mi">44100</span>

<span class="kd">instr</span> <span class="nf">hdf5write</span>

    a<span class="n">Array</span><span class="p">[]</span> <span class="nb">init</span> <span class="mi">2</span><span class="p">,</span><span class="mi">2</span> <span class="c1">; Initialise a 2 X 2 a-rate array</span>

    a<span class="n">Array</span><span class="p">[</span><span class="mi">0</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span> <span class="nb">vco2</span> <span class="mf">0.2</span><span class="p">,</span> <span class="mi">100</span> <span class="c1">; Fill array with vco2 signals</span>
    a<span class="n">Array</span><span class="p">[</span><span class="mi">0</span><span class="p">][</span><span class="mi">1</span><span class="p">]</span> <span class="nb">vco2</span> <span class="mf">0.4</span><span class="p">,</span> <span class="mi">200</span>
    a<span class="n">Array</span><span class="p">[</span><span class="mi">1</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span> <span class="nb">vco2</span> <span class="mf">0.8</span><span class="p">,</span> <span class="mi">300</span>
    a<span class="n">Array</span><span class="p">[</span><span class="mi">1</span><span class="p">][</span><span class="mi">1</span><span class="p">]</span> <span class="nb">vco2</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">400</span>

    a<span class="n">Var</span> <span class="nb">vco2</span> <span class="mf">0.2</span><span class="p">,</span> <span class="mi">100</span> <span class="c1">; Initialise an a-rate variable with a vco2 signal</span>

    k<span class="n">Var</span> <span class="nb">phasor</span> <span class="mi">1</span> <span class="c1">; Initalise a k-rate variable with a phasor signal</span>

    <span class="nb">hdf5write</span> <span class="s">"example.h5"</span><span class="p">,</span> a<span class="n">Array</span><span class="p">,</span> a<span class="n">Var</span><span class="p">,</span> k<span class="n">Var</span> <span class="c1">; Write variables to an hdf5 file</span>

<span class="kd">endin</span>

<span class="nt">&lt;/CsInstruments&gt;</span>
<span class="nt">&lt;CsScore&gt;</span>

<span class="nb">i</span> <span class="s">"hdf5write"</span> <span class="mi">0</span> <span class="mi">1</span>

<span class="nt">&lt;/CsScore&gt;</span>
<span class="nt">&lt;/CsoundSynthesizer&gt;</span>
</pre>
            </div>
          </div>
        </div>
        <p><br class="example-break" />
    </p>
      </div>
      <div class="refsect1">
        <a id="idm281472925893272"></a>
        <h2>See Also</h2>
        <p>
      <a class="link" href="hdf5read.html" title="hdf5read"><em class="citetitle">hdf5read</em></a>
    </p>
      </div>
      <div class="refsect1">
        <a id="idm281472925891224"></a>
        <h2>Credits</h2>
        <p>
      </p>
        <table border="0" summary="Simple list" class="simplelist">
          <tr>
            <td>Author: Edward Costello;</td>
          </tr>
          <tr>
            <td>NUIM, 2014</td>
          </tr>
        </table>
        <p>
    </p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="hdf5read.html">Prev</a> </td>
          <td width="20%" align="center">
            <a accesskey="u" href="OpcodesTop.html">Up</a>
          </td>
          <td width="40%" align="right"> <a accesskey="n" href="hilbert.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">hdf5read </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> hilbert</td>
        </tr>
      </table>
    </div>
  </body>
</html>