<?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>voice</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="vmultv_i.html" title="vmultv_i" /> <link rel="next" href="vosim.html" title="vosim" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">voice</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="vmultv_i.html">Prev</a> </td> <th width="60%" align="center">Orchestra Opcodes and Operators</th> <td width="20%" align="right"> <a accesskey="n" href="vosim.html">Next</a></td> </tr> </table> <hr /> </div> <div class="refentry" title="voice"> <a id="voice"></a> <div class="titlepage"></div> <a id="IndexVoice" class="indexterm"></a> <div class="refnamediv"> <h2> <span class="refentrytitle">voice</span> </h2> <p>voice — An emulation of a human voice. </p> </div> <div class="refsect1" title="Description"> <a id="idp52405432"></a> <h2>Description</h2> <p> An emulation of a human voice. </p> </div> <div class="refsect1" title="Syntax"> <a id="idp52392240"></a> <h2>Syntax</h2> <pre class="synopsis">ares <span class="command"><strong>voice</strong></span> kamp, kfreq, kphoneme, kform, kvibf, kvamp, ifn, ivfn</pre> </div> <div class="refsect1" title="Initialization"> <a id="idp52393376"></a> <h2>Initialization</h2> <p> <span class="emphasis"><em>ifn</em></span>, <span class="emphasis"><em>ivfn</em></span> -- two table numbers containing the carrier waveform and the vibrato waveform. The files <a class="ulink" href="examples/impuls20.aiff" target="_top"><em class="citetitle">impuls20.aiff</em></a>, <a class="ulink" href="examples/ahh.aiff" target="_top"><em class="citetitle">ahh.aiff</em></a>, <a class="ulink" href="examples/eee.aiff" target="_top"><em class="citetitle">eee.aiff</em></a>, or <a class="ulink" href="examples/ooo.aiff" target="_top"><em class="citetitle">ooo.aiff</em></a> are suitable for the first of these, and a sine wave for the second. These files are available from <a class="ulink" href="ftp://ftp.cs.bath.ac.uk/pub/dream/documentation/sounds/modelling/" target="_top"><em class="citetitle">ftp://ftp.cs.bath.ac.uk/pub/dream/documentation/sounds/modelling/</em></a>. </p> </div> <div class="refsect1" title="Performance"> <a id="idp52448488"></a> <h2>Performance</h2> <p> <span class="emphasis"><em>kamp</em></span> -- Amplitude of note. </p> <p> <span class="emphasis"><em>kfreq</em></span> -- Frequency of note played. It can be varied in performance. </p> <p> <span class="emphasis"><em>kphoneme</em></span> -- an integer in the range 0 to 16, which select the formants for the sounds: </p> <div class="itemizedlist"> <ul class="itemizedlist" type="disc"> <li class="listitem"> <p> <span class="quote">“<span class="quote">eee</span>”</span>, <span class="quote">“<span class="quote">ihh</span>”</span>, <span class="quote">“<span class="quote">ehh</span>”</span>, <span class="quote">“<span class="quote">aaa</span>”</span>, </p> </li> <li class="listitem"> <p> <span class="quote">“<span class="quote">ahh</span>”</span>, <span class="quote">“<span class="quote">aww</span>”</span>, <span class="quote">“<span class="quote">ohh</span>”</span>, <span class="quote">“<span class="quote">uhh</span>”</span>, </p> </li> <li class="listitem"> <p> <span class="quote">“<span class="quote">uuu</span>”</span>, <span class="quote">“<span class="quote">ooo</span>”</span>, <span class="quote">“<span class="quote">rrr</span>”</span>, <span class="quote">“<span class="quote">lll</span>”</span>, </p> </li> <li class="listitem"> <p> <span class="quote">“<span class="quote">mmm</span>”</span>, <span class="quote">“<span class="quote">nnn</span>”</span>, <span class="quote">“<span class="quote">nng</span>”</span>, <span class="quote">“<span class="quote">ngg</span>”</span>. </p> </li> </ul> </div> <p> </p> <p> At present the phonemes </p> <div class="itemizedlist"> <ul class="itemizedlist" type="disc"> <li class="listitem"> <p> <span class="quote">“<span class="quote">fff</span>”</span>, <span class="quote">“<span class="quote">sss</span>”</span>, <span class="quote">“<span class="quote">thh</span>”</span>, <span class="quote">“<span class="quote">shh</span>”</span>, </p> </li> <li class="listitem"> <p> <span class="quote">“<span class="quote">xxx</span>”</span>, <span class="quote">“<span class="quote">hee</span>”</span>, <span class="quote">“<span class="quote">hoo</span>”</span>, <span class="quote">“<span class="quote">hah</span>”</span>, </p> </li> <li class="listitem"> <p> <span class="quote">“<span class="quote">bbb</span>”</span>, <span class="quote">“<span class="quote">ddd</span>”</span>, <span class="quote">“<span class="quote">jjj</span>”</span>, <span class="quote">“<span class="quote">ggg</span>”</span>, </p> </li> <li class="listitem"> <p> <span class="quote">“<span class="quote">vvv</span>”</span>, <span class="quote">“<span class="quote">zzz</span>”</span>, <span class="quote">“<span class="quote">thz</span>”</span>, <span class="quote">“<span class="quote">zhh</span>”</span> </p> </li> </ul> </div> <p> are not available (!) </p> <p> <span class="emphasis"><em>kform</em></span> -- Gain on the phoneme. values 0.0 to 1.2 recommended. </p> <p> <span class="emphasis"><em>kvibf</em></span> -- frequency of vibrato in Hertz. Suggested range is 0 to 12 </p> <p> <span class="emphasis"><em>kvamp</em></span> -- amplitude of the vibrato </p> </div> <div class="refsect1" title="Examples"> <a id="idp52462440"></a> <h2>Examples</h2> <p> Here is an example of the voice opcode. It uses the file <a class="ulink" href="examples/voice.csd" target="_top"><em class="citetitle">voice.csd</em></a>, and <a class="ulink" href="examples/impuls20.aiff" target="_top"><em class="citetitle">impuls20.aiff</em></a>. </p> <div class="example"> <a id="idp52463856"></a> <p class="title"> <strong>Example 961. Example of the voice 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> -odac <span class="comment">;;;realtime audio out</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 voice.wav -W ;;; 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">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 <span class="oblock">instr</span> 1 kamp <span class="op">=</span> p4 kphon <span class="op">=</span> p5 asig <span class="opc">voice</span> kamp, 200, kphon, 0.488, 0, 1, 1, 2 <span class="opc">outs</span> asig, asig <span class="oblock">endin</span> <span class="csdtag"></CsInstruments></span> <span class="csdtag"><CsScore></span> <span class="stamnt">f</span> 1 0 256 1 "impuls20.ai<span class="stamnt">f</span><span class="stamnt">f</span>" 0 0 0 <span class="comment">;audio file for the carrier waveform</span> <span class="stamnt">f</span> 2 0 256 10 1 <span class="comment">;sine wave for the vibrato waveform</span> <span class="comment">; ampl phoneme</span> <span class="stamnt">i</span> 1 0 2 0.8 1 <span class="stamnt">i</span> 1 + . 0.6 2 <span class="stamnt">i</span> 1 + . 1.8 3 <span class="stamnt">i</span> 1 + . 15.0 4 <span class="stamnt">i</span> 1 + . 0.05 5 <span class="stamnt">i</span> 1 + . 0.06 6 <span class="stamnt">i</span> 1 + . 0.03 7 <span class="stamnt">i</span> 1 + . 0.0002 8 <span class="stamnt">i</span> 1 + . 0.1 9 <span class="stamnt">i</span> 1 + . 0.5 10 <span class="stamnt">i</span> 1 + . 100 11 <span class="stamnt">i</span> 1 + . 0.03 12 <span class="stamnt">i</span> 1 + . 0.04 13 <span class="stamnt">i</span> 1 + . 0.04 14 <span class="stamnt">i</span> 1 + . 0.04 15 <span class="stamnt">i</span> 1 + . 0.05 16 <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="Credits"> <a id="idp52466128"></a> <h2>Credits</h2> <p> </p> <table border="0" summary="Simple list" class="simplelist"> <tr> <td>Author: John ffitch (after Perry Cook)</td> </tr> <tr> <td>University of Bath, Codemist Ltd.</td> </tr> <tr> <td>Bath, UK</td> </tr> </table> <p> </p> <p>New in Csound version 3.47</p> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="vmultv_i.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="vosim.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">vmultv_i </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> vosim</td> </tr> </table> </div> </body> </html>