Sophie

Sophie

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

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>mididefault</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="midictrl.html" title="midictrl" />
    <link rel="next" href="midiin.html" title="midiin" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">mididefault</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="midictrl.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="midiin.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry" title="mididefault">
      <a id="mididefault"></a>
      <div class="titlepage"></div>
      <a id="IndexMididefault" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">mididefault</span>
        </h2>
        <p>mididefault — 
      Changes values, depending on MIDI activation.
          </p>
      </div>
      <div class="refsect1" title="Description">
        <a id="id3020196"></a>
        <h2>Description</h2>
        <p>
      <span class="emphasis"><em>mididefault</em></span> is designed to simplify writing instruments that can be used interchangeably for either score or MIDI input, and to make it easier to adapt instruments originally written for score input to work with MIDI input.
    </p>
        <p>
      In general, it should be possible to write instrument definitions that work identically with both scores
and MIDI, including both MIDI files and real-time MIDI input, without using any conditional statements, and that take full advantage of MIDI voice messages.
    </p>
        <p>
      Note that correlating Csound instruments with MIDI channel numbers is done using the <a class="link" href="massign.html" title="massign"><em class="citetitle">massign</em></a> opcode for real-time performance,.  For file-driven performance, instrument numbers default to MIDI channel number + 1, but the defaults are overridden by any MIDI program change messages in the file.
    </p>
      </div>
      <div class="refsect1" title="Syntax">
        <a id="id3020433"></a>
        <h2>Syntax</h2>
        <pre class="synopsis"><span class="command"><strong>mididefault</strong></span> xdefault, xvalue</pre>
      </div>
      <div class="refsect1" title="Performance">
        <a id="id3020450"></a>
        <h2>Performance</h2>
        <p>
      <span class="emphasis"><em>xdefault</em></span> -- specifies a default value that will be used during MIDI activation.
    </p>
        <p>
      <span class="emphasis"><em>xvalue</em></span> -- overwritten by <span class="emphasis"><em>xdefault</em></span> during MIDI activation, remains unchanged otherwise.
    </p>
        <p>
      If the instrument was activated by MIDI input, the opcode will overwrite the value of <span class="emphasis"><em>xvalue</em></span> with the value of <span class="emphasis"><em>xdefault</em></span>. If the instrument was <span class="emphasis"><em>NOT</em></span> activated by MIDI input, <span class="emphasis"><em>xvalue</em></span> will remain unchanged.
    </p>
        <p>
      This enables score pfields to receive a default value during MIDI activation, and score values otherwise.
    </p>
        <div class="note" title="Adapting a score-activated Csound instrument." style="margin-left: 0.5in; margin-right: 0.5in;">
          <table border="0" summary="Note: Adapting a score-activated Csound instrument.">
            <tr>
              <td rowspan="2" align="center" valign="top" width="25">
                <img alt="[Note]" src="images/note.png" />
              </td>
              <th align="left">Adapting a score-activated Csound instrument.</th>
            </tr>
            <tr>
              <td align="left" valign="top">
                <p>See the <a class="link" href="MidiInterop.html" title="MIDI/Score Interoperability opcodes"><em class="citetitle">MIDI interop opcodes</em></a> section for details on adapting score driven instruments for MIDI or vice-versa.</p>
              </td>
            </tr>
          </table>
        </div>
      </div>
      <div class="refsect1" title="See Also">
        <a id="id3021102"></a>
        <h2>See Also</h2>
        <p>
      <a class="link" href="midichannelaftertouch.html" title="midichannelaftertouch"><em class="citetitle">midichannelaftertouch</em></a>, 
      <a class="link" href="midicontrolchange.html" title="midicontrolchange"><em class="citetitle">midicontrolchange</em></a>, 
      <a class="link" href="midinoteoff.html" title="midinoteoff"><em class="citetitle">midinoteoff</em></a>, 
      <a class="link" href="midinoteoncps.html" title="midinoteoncps"><em class="citetitle">midinoteoncps</em></a>, 
      <a class="link" href="midinoteonkey.html" title="midinoteonkey"><em class="citetitle">midinoteonkey</em></a>, 
      <a class="link" href="midinoteonoct.html" title="midinoteonoct"><em class="citetitle">midinoteonoct</em></a>, 
      <a class="link" href="midinoteonpch.html" title="midinoteonpch"><em class="citetitle">midinoteonpch</em></a>, 
      <a class="link" href="midipitchbend.html" title="midipitchbend"><em class="citetitle">midipitchbend</em></a>, 
      <a class="link" href="midipolyaftertouch.html" title="midipolyaftertouch"><em class="citetitle">midipolyaftertouch</em></a>, 
      <a class="link" href="midiprogramchange.html" title="midiprogramchange"><em class="citetitle">midiprogramchange</em></a>
    </p>
      </div>
      <div class="refsect1" title="Credits">
        <a id="id3021195"></a>
        <h2>Credits</h2>
        <p>Author: Michael Gogins</p>
        <p>New in version 4.20</p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="midictrl.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="midiin.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">midictrl </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> midiin</td>
        </tr>
      </table>
    </div>
  </body>
</html>