Sophie

Sophie

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

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>bformenc</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="DeprecatedTop.html" title="Deprecated Orchestra Opcodes and GEN Routines" />
    <link rel="prev" href="aweibull.html" title="aweibull" />
    <link rel="next" href="bformdec.html" title="bformdec" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">bformenc</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="aweibull.html">Prev</a> </td>
          <th width="60%" align="center">Deprecated Orchestra Opcodes and GEN Routines</th>
          <td width="20%" align="right"> <a accesskey="n" href="bformdec.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry" title="bformenc">
      <a id="bformenc"></a>
      <div class="titlepage"></div>
      <a id="IndexBformenc" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">bformenc</span>
        </h2>
        <p>bformenc — 
      Deprecated. Codes a signal into the ambisonic B format.
     </p>
      </div>
      <div class="refsect1" title="Description">
        <a id="idp80016024"></a>
        <h2>Description</h2>
        <p>
      Codes a signal into the ambisonic B format. Note that this opcode is
      deprecated as it is inaccurate, and is replaced by the much
      better
      opcode <a class="link" href="bformenc1.html" title="bformenc1"><em class="citetitle">bformenc1</em></a>
      which replicates all the important features; also note that the
      gain arguments are not available in <span class="emphasis"><em>bformenc1</em></span>.
    </p>
      </div>
      <div class="refsect1" title="Syntax">
        <a id="idp80026696"></a>
        <h2>Syntax</h2>
        <pre class="synopsis">aw, ax, ay, az <span class="command"><strong>bformenc</strong></span> asig, kalpha, kbeta, kord0, kord1</pre>
        <pre class="synopsis">aw, ax, ay, az, ar, as, at, au, av <span class="command"><strong>bformenc</strong></span> asig, kalpha, kbeta, \
      kord0, kord1 , kord2</pre>
        <pre class="synopsis">aw, ax, ay, az, ar, as, at, au, av, ak, al, am, an, ao, ap, aq <span class="command"><strong>bformenc</strong></span> \
      asig, kalpha, kbeta, kord0, kord1, kord2, kord3</pre>
      </div>
      <div class="refsect1" title="Performance">
        <a id="idp80029592"></a>
        <h2>Performance</h2>
        <p>
	<span class="emphasis"><em>aw, ax, ay, ... </em></span>
	-- output cells of the B format.
	</p>
        <p>
	<span class="emphasis"><em>asig</em></span> -- input signal.
	</p>
        <p>
	<span class="emphasis"><em>kalpha</em></span> –- azimuth angle in degrees (clockwise).
	</p>
        <p>
	<span class="emphasis"><em>kbeta</em></span> -- altitude angle in degrees.
        </p>
        <p>
	<span class="emphasis"><em>kord0</em></span> -- linear gain of the zero order B format.
	</p>
        <p>
	<span class="emphasis"><em>kord1</em></span> -- linear gain of the first order B format.
	</p>
        <p>
	<span class="emphasis"><em>kord2</em></span> -- linear gain of the second order B format.
	</p>
        <p>
	<span class="emphasis"><em>kord3</em></span> -- linear gain of the third order B format.
	</p>
      </div>
      <div class="refsect1" title="Example">
        <a id="idp80065312"></a>
        <h2>Example</h2>
        <p>
      Here is an example of the bformenc opcode. It uses the file <a class="ulink" href="examples/bformenc.csd" target="_top"><em class="citetitle">bformenc.csd</em></a>.

    </p>
        <div class="example">
          <a id="idp80066296"></a>
          <p class="title">
            <strong>Example 1079. Example of the bformenc 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">; Select audio/midi flags here according to platform</span>
<span class="comment">; Audio out   Audio in    No messages</span>
<span class="comment">;-odac           -iadc     -d     ;;;RT audio I/O</span>
<span class="comment">; For Non-realtime ouput leave only the line below:</span>
 -o bformenc.wav -W <span class="comment">;;; 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">kr</span> <span class="op">=</span> 4410
<span class="ohdr">ksmps</span> <span class="op">=</span> 10
<span class="ohdr">nchnls</span> <span class="op">=</span> 8

<span class="comment">;bformenc is deprecated, please use bformenc1</span>

<span class="oblock">instr</span> 1
        <span class="comment">; generate pink noise</span>
        anoise <span class="opc">pinkish</span> 1000
        
        <span class="comment">; two full turns</span>
        kalpha <span class="opc">line</span> 0, p3, 720
        kbeta <span class="op">=</span> 0
        
        <span class="comment">; fade ambisonic order from 2nd to 0th during second turn</span>
        kord0 <span class="op">=</span> 1
        kord1 <span class="opc">linseg</span> 1, p3 <span class="op">/</span> 2, 1, p3 <span class="op">/</span> 2, 0
        kord2 <span class="opc">linseg</span> 1, p3 <span class="op">/</span> 2, 1, p3 <span class="op">/</span> 2, 0
        
        <span class="comment">; generate B format</span>
        aw, ax, ay, az, ar, as, at, au, av <span class="opc">bformenc</span> anoise, kalpha, kbeta, kord0, kord1, kord2
        
        <span class="comment">; decode B format for 8 channel circle loudspeaker setup</span>
        a1, a2, a3, a4, a5, a6, a7, a8 <span class="opc">bformdec</span> 4, aw, ax, ay, az, ar, as, at, au, av
        
        <span class="comment">; write audio out</span>
        <span class="opc">outo</span> a1, a2, a3, a4, a5, a6, a7, a8
<span class="oblock">endin</span>

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

<span class="comment">; Play Instrument #1 for 20 seconds.</span>
<span class="stamnt">i</span> 1 0 20
<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" />
    </p>
      </div>
      <div class="refsect1" title="Credits">
        <a id="idp80068576"></a>
        <h2>Credits</h2>
        <p>
      </p>
        <table border="0" summary="Simple list" class="simplelist">
          <tr>
            <td>Author: Samuel Groner</td>
          </tr>
          <tr>
            <td>2005</td>
          </tr>
        </table>
        <p>
    </p>
        <p>New in version 5.07. Deprecated in 5.09.</p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="aweibull.html">Prev</a> </td>
          <td width="20%" align="center">
            <a accesskey="u" href="DeprecatedTop.html">Up</a>
          </td>
          <td width="40%" align="right"> <a accesskey="n" href="bformdec.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">aweibull </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> bformdec</td>
        </tr>
      </table>
    </div>
  </body>
</html>