Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release > by-pkgid > b707d9a4ee443103660a75ccb6e51334 > files > 2870

csound-doc-5.19.01-10.mga5.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>vstnote</title>
    <link rel="stylesheet" type="text/css" href="csound.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.76.1" />
    <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="vstmidiout.html" title="vstmidiout" />
    <link rel="next" href="vstparamset.html" title="vstparamset,vstparamget" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">vstnote</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="vstmidiout.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="vstparamset.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry" title="vstnote">
      <a id="vstnote"></a>
      <div class="titlepage"></div>
      <a id="IndexVstNote" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">vstnote</span>
        </h2>
        <p>vstnote — Sends a MIDI note with definite duration to a VST plugin.
    </p>
      </div>
      <div class="refsect1" title="Syntax">
        <a id="idp53003208"></a>
        <h2>Syntax</h2>
        <pre class="synopsis"><span class="command"><strong>vstnote</strong></span> instance, kchan, knote, kveloc, kdur
    </pre>
      </div>
      <div class="refsect1" title="Description">
        <a id="idp53118552"></a>
        <h2>Description</h2>
        <p><span class="emphasis"><em>vstnote</em></span> sends a MIDI note with definite duration to a VST plugin.</p>
      </div>
      <div class="refsect1" title="Initialization">
        <a id="idp53119320"></a>
        <h2>Initialization</h2>
        <p><span class="emphasis"><em>instance</em></span> - the number which identifies the
      plugin generated by <a class="link" href="vstinit.html" title="vstinit"><em class="citetitle">vstinit</em></a>.</p>
      </div>
      <div class="refsect1" title="Performance">
        <a id="idp53120656"></a>
        <h2>Performance</h2>
        <p><span class="emphasis"><em>kchan</em></span> - The MIDI channel to trasnmit the note on. Note that MIDI channels are numbered starting from 0.</p>
        <p><span class="emphasis"><em>knote</em></span> - The MIDI note number to send.</p>
        <p><span class="emphasis"><em>kveloc</em></span> - The MIDI note's velocity.</p>
        <p><span class="emphasis"><em>kdur</em></span> - The MIDI note's duration in seconds.</p>
        <p>Note: Be sure the instrument containing vstnote is not finished
      before the duration of the note, otherwise you'll have a 'hung'
      note.</p>
      </div>
      <div class="refsect1" title="Examples">
        <a id="idp53123096"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the use of the <span class="emphasis"><em>vstnote</em></span> opcode. It uses the file <a class="ulink" href="examples/vst4cs.csd" target="_top"><em class="citetitle">vst4cs.csd</em></a>.
      </p>
        <div class="example">
          <a id="idp53124296"></a>
          <p class="title">
            <strong>Example 977. Example of the <span class="emphasis"><em>vstnote</em></span> 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>
            <pre class="programlisting">
<span class="csdtag">&lt;CsoundSynthesizer&gt;</span>
<span class="csdtag">&lt;CsOptions&gt;</span>
<span class="comment">; Credits: Adapted by Michael Gogins </span>
<span class="comment">; from code by David Horowitz and Lian Cheung. </span>
<span class="comment">; The "--displays" option is required in order for </span>
<span class="comment">; the Pianoteq GUI to dispatch events and display properly.</span>
-m3 --displays -odac
<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> 20
<span class="ohdr">nchnls</span> <span class="op">=</span> 2
                <span class="comment">; Load the Pianoteq into memory.</span>
gipianoteq      <span class="opc">vstinit</span>      "C<span class="op">:</span>\\Program Files\\Steinberg\\VstPlugins\\Pianoteq 3.0 Trial\\Pianoteq30 Trial.dll", 1
                
                <span class="comment">; Print information about the Pianoteq, such as parameter names and numbers.</span>
                <span class="opc">vstinfo</span>      gipianoteq
                
                <span class="comment">; Open the Pianoteq's GUI.</span>
                <span class="opc">vstedit</span>      gipianoteq

                <span class="comment">; Send notes from the score to the Pianoteq.</span>
                <span class="oblock">instr</span> 1 
                <span class="comment">; MIDI channels are numbered starting at 0.</span>
                <span class="comment">; p3 always contains the duration of the note.</span>
                <span class="comment">; p4 contains the MIDI key number (pitch),</span>
                <span class="comment">; p5 contains the MIDI velocity number (loudness),</span>
imidichannel    <span class="opc">init</span>         0
                <span class="opc">vstnote</span>      gipianoteq, imidichannel, p4, p5, p3
                <span class="oblock">endin</span>

                <span class="comment">; Send parameter changes to the Pianoteq.</span>
                <span class="oblock">instr</span> 2 
                <span class="comment">; p4 is the parameter number.</span>
                <span class="comment">; p5 is the parameter value.</span>
                <span class="opc">vstparamset</span>  gipianoteq, p4, p5 
                <span class="oblock">endin</span>

                <span class="comment">; Send audio from the Pianoteq to the output.</span>
                <span class="oblock">instr</span> 3 
ablankinput     <span class="opc">init</span>         0
aleft, aright   <span class="opc">vstaudio</span>     gipianoteq, ablankinput, ablankinput
                <span class="opc">outs</span>         aleft, aright
                <span class="oblock">endin</span>

<span class="csdtag">&lt;/CsInstruments&gt;</span>
<span class="csdtag">&lt;CsScore&gt;</span>
<span class="comment">; Turn on the instrument that receives audio from the Pianoteq indefinitely.</span>
<span class="stamnt">i</span> 3 0 -1
<span class="comment">; Send parameter changes to Pianoteq before sending any notes.</span>
<span class="comment">; NOTE: All parameters must be between 0.0 and 1.0.</span>
<span class="comment">; Length of piano strings:</span>
<span class="stamnt">i</span> 2 0 1 33 0.5
<span class="comment">; Hammer noise:</span>
<span class="stamnt">i</span> 2 0 1 25 0.1
<span class="comment">; Send a C major 7th arpeggio to the Pianoteq.</span>
<span class="stamnt">i</span> 1 1 10 60 76
<span class="stamnt">i</span> 1 2 10 64 73
<span class="stamnt">i</span> 1 3 10 67 70 
<span class="stamnt">i</span> 1 4 10 71 67
<span class="comment">; End the performance, leaving some time </span>
<span class="comment">; for the Pianoteq to finish sending out its audio,</span>
<span class="comment">; or for the user to play with the Pianoteq virtual keyboard.</span>
<span class="stamnt">e</span> 20
<span class="csdtag">&lt;/CsScore&gt;</span>
<span class="csdtag">&lt;/CsoundSynthesizer&gt;</span>
</pre>
          </div>
        </div>
        <p><br class="example-break" />
    </p>
      </div>
      <div class="refsect1" title="Credits">
        <a id="idp53126776"></a>
        <h2>Credits</h2>
        <p>By: Andrés Cabrera and Michael Gogins</p>
        <p>Uses code from Hermann Seib's VSTHost and Thomas Grill's vst~
      object.</p>
        <p>VST is a trademark of Steinberg Media Technologies GmbH. 
      VST Plug-In Technology by Steinberg.</p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="vstmidiout.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="vstparamset.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">vstmidiout </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> vstparamset,vstparamget</td>
        </tr>
      </table>
    </div>
  </body>
</html>