Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 6ed14ebfd686aa32f7956e552aa2e21d > files > 1622

csound-manual-5.13.0-5.fc15.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>fluidNote</title>
    <link rel="stylesheet" href="csound.css" type="text/css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.75.2" />
    <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="fluidLoad.html" title="fluidLoad" />
    <link rel="next" href="fluidOut.html" title="fluidOut" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">fluidNote</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="fluidLoad.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="fluidOut.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry" title="fluidNote">
      <a id="fluidNote"></a>
      <div class="titlepage"></div>
      <a id="IndexFluidNote" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">fluidNote</span>
        </h2>
        <p>fluidNote — 
      Plays a note on a channel in a fluidSynth engine.
           </p>
      </div>
      <div class="refsect1" title="Syntax">
        <a id="id2898724"></a>
        <h2>Syntax</h2>
        <pre class="synopsis"><span class="command"><strong>fluidNote</strong></span> ienginenum, ichannelnum, imidikey, imidivel</pre>
      </div>
      <div class="refsect1" title="Description">
        <a id="id2899704"></a>
        <h2>Description</h2>
        <p>Plays a note at <span class="emphasis"><em>imidikey</em></span> pitch and <span class="emphasis"><em>imidivel</em></span> velocity
    on <span class="emphasis"><em>ichannelnum</em></span> channel of number <span class="emphasis"><em>ienginenum</em></span> fluidEngine. 
    </p>
      </div>
      <div class="refsect1" title="Initialization">
        <a id="id2899730"></a>
        <h2>Initialization</h2>
        <p><span class="emphasis"><em>ienginenum </em></span> -- engine number assigned from
fluidEngine</p>
        <p><span class="emphasis"><em>ichannelnum </em></span> -- which channel number to play a note
on in the given fluidEngine</p>
        <p><span class="emphasis"><em>imidikey</em></span> -- MIDI key for note (0-127)</p>
        <p><span class="emphasis"><em>imidivel </em></span> -- MIDI velocity for note (0-127)</p>
      </div>
      <div class="refsect1" title="Examples">
        <a id="id2899766"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the fluidNote opcode. It uses the file <a class="ulink" href="examples/fluidNote.csd" target="_top"><em class="citetitle">fluidNote.csd</em></a> and <a class="ulink" href="examples/19Trumpet.sf2" target="_top"><em class="citetitle">19Trumpet.sf2</em></a>.
      </p>
        <div class="example">
          <a id="id2899790"></a>
          <p class="title">
            <b>Example 239. Example of the fluidNote opcode.</b>
          </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>
            <pre class="programlisting">
<span class="csdtag">&lt;CsoundSynthesizer&gt;</span>
<span class="csdtag">&lt;CsOptions&gt;</span>
<span class="comment">; Select audio/midi flags here according to platform</span>
-odac   -+rtmidi=virtual  -M0    <span class="comment">;;;realtime audio out and realtime midi in</span>
<span class="comment">;-iadc    ;;;uncomment -iadc if realtime audio input is needed too</span>
<span class="comment">; For Non-realtime ouput leave only the line below:</span>
<span class="comment">;-o fluidNote.wav -W ;;; for file output any platform</span>
<span class="csdtag">&lt;/CsOptions&gt;</span>
<span class="csdtag">&lt;CsInstruments&gt;</span>

<span class="ohdr">sr</span> <span class="op">=</span> 44100
<span class="ohdr">ksmps</span> <span class="op">=</span> 32
<span class="ohdr">nchnls</span> <span class="op">=</span> 2
<span class="ohdr">0dbfs</span> <span class="op">=</span> 1

giengine <span class="opc">fluidEngine</span>
<span class="comment">; soundfont path to manual/examples</span>
isfnum	 <span class="opc">fluidLoad</span> "19Trumpet.sf2", giengine, 1
	 <span class="opc">fluidProgramSelect</span> giengine, 1, isfnum, 0, 56

<span class="oblock">instr</span> 1

	<span class="opc">mididefault</span>   60, p3
	<span class="opc">midinoteonkey</span> p4, p5
ikey	<span class="opc">init</span> p4
ivel	<span class="opc">init</span> p5
	<span class="opc">fluidNote</span> giengine, 1, ikey, ivel

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

<span class="oblock">instr</span> 99

imvol  <span class="opc">init</span> 7
asigl, asigr <span class="opc">fluidOut</span> giengine
       <span class="opc">outs</span> asigl<span class="op">*</span>imvol, asigr<span class="op">*</span>imvol

<span class="oblock">endin</span>
<span class="csdtag">&lt;/CsInstruments&gt;</span>
<span class="csdtag">&lt;CsScore&gt;</span>

<span class="stamnt">i</span> 1 0 2 60 100 <span class="comment">;play one note from score and...</span>
<span class="stamnt">i</span> 99 0 60      <span class="comment">;play virtual keyboard for 60 sec.</span>
<span class="stamnt">e</span>

<span class="csdtag">&lt;/CsScore&gt;</span>
<span class="csdtag">&lt;/CsoundSynthesizer&gt;</span>
</pre>
          </div>
        </div>
        <p><br class="example-break" />
The output should include a line like this:
      </p>
        <pre class="screen">
SoundFont:   1  Bank:   0  Preset:  56  Trumpet metallic
      </pre>
        <p>
    </p>
      </div>
      <div class="refsect1" title="See Also">
        <a id="id2899837"></a>
        <h2>See Also</h2>
        <p><a class="link" href="fluidEngine.html" title="fluidEngine"><em class="citetitle">fluidEngine</em></a>, <a class="link" href="fluidLoad.html" title="fluidLoad"><em class="citetitle">fluidLoad</em></a></p>
      </div>
      <div class="refsect1" title="Credits">
        <a id="id2899860"></a>
        <h2>Credits</h2>
        <p>Michael Gogins (gogins at pipeline dot com), Steven Yi. 
    Thanks to Peter Hanappe for Fluidsynth.</p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="fluidLoad.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="fluidOut.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">fluidLoad </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> fluidOut</td>
        </tr>
      </table>
    </div>
  </body>
</html>