<?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>bformenc1</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="bexprnd.html" title="bexprnd" /> <link rel="next" href="bformdec1.html" title="bformdec1" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">bformenc1</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="bexprnd.html">Prev</a> </td> <th width="60%" align="center">Orchestra Opcodes and Operators</th> <td width="20%" align="right"> <a accesskey="n" href="bformdec1.html">Next</a></td> </tr> </table> <hr /> </div> <div class="refentry" title="bformenc1"> <a id="bformenc1"></a> <div class="titlepage"></div> <a id="IndexBformenc1" class="indexterm"></a> <div class="refnamediv"> <h2> <span class="refentrytitle">bformenc1</span> </h2> <p>bformenc1 — Codes a signal into the ambisonic B format. </p> </div> <div class="refsect1" title="Description"> <a id="idp14655264"></a> <h2>Description</h2> <p> Codes a signal into the ambisonic B format </p> </div> <div class="refsect1" title="Syntax"> <a id="idp14655992"></a> <h2>Syntax</h2> <pre class="synopsis">aw, ax, ay, az <span class="command"><strong>bformenc1</strong></span> asig, kalpha, kbeta</pre> <pre class="synopsis">aw, ax, ay, az, ar, as, at, au, av <span class="command"><strong>bformenc1</strong></span> asig, kalpha, kbeta</pre> <pre class="synopsis">aw, ax, ay, az, ar, as, at, au, av, ak, al, am, an, ao, ap, aq <span class="command"><strong>bformenc1</strong></span> \ asig, kalpha, kbeta</pre> </div> <div class="refsect1" title="Performance"> <a id="idp14760440"></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 (anticlockwise). </p> <p> <span class="emphasis"><em>kbeta</em></span> -- altitude angle in degrees. </p> </div> <div class="refsect1" title="Example"> <a id="idp14762856"></a> <h2>Example</h2> <p> Here is an example of the bformenc1 opcode. It uses the file <a class="ulink" href="examples/bformenc1.csd" target="_top"><em class="citetitle">bformenc1.csd</em></a>. </p> <div class="example"> <a id="idp14763856"></a> <p class="title"> <strong>Example 78. Example of the bformenc1 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"><CsoundSynthesizer></span> <span class="csdtag"><CsOptions></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"></CsOptions></span> <span class="csdtag"><CsInstruments></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="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">; generate B format</span> aw, ax, ay, az, ar, as, at, au, av <span class="opc">bformenc1</span> anoise, kalpha, kbeta <span class="comment">; decode B format for 8 channel circle loudspeaker setup</span> a1, a2, a3, a4, a5, a6, a7, a8 <span class="opc">bformdec1</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"></CsInstruments></span> <span class="csdtag"><CsScore></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"></CsScore></span> <span class="csdtag"></CsoundSynthesizer></span> </pre> </div> </div> <p><br class="example-break" /> </p> </div> <div class="refsect1" title="See Also"> <a id="idp14766136"></a> <h2>See Also</h2> <p> <a class="link" href="bformdec1.html" title="bformdec1"><em class="citetitle">bformdec1</em></a> </p> </div> <div class="refsect1" title="Credits"> <a id="idp14767184"></a> <h2>Credits</h2> <p> </p> <table border="0" summary="Simple list" class="simplelist"> <tr> <td>Author: Richard Furse, Bruce Wiggins and Fons Adriaensen, following code by Samuel Groner</td> </tr> <tr> <td>2008</td> </tr> </table> <p> </p> <p>New in version 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="bexprnd.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="bformdec1.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">bexprnd </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> bformdec1</td> </tr> </table> </div> </body> </html>