<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Le 29/04/2015 22:19, Samuel Gougeon a
écrit :<br>
</div>
<blockquote cite="mid:55413CD7.10506@free.fr" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">Hello Antoine,<br>
<br>
Le 24/04/2015 16:31, Antoine Monmayrant a écrit :<br>
</div>
<blockquote cite="mid:553A53AE.9070809@laas.fr" type="cite">Hi
everyone, <br>
<br>
I'm trying to use Scilab to generate a soundwave with a given
frequency and output it continuously. .../...<br>
<br>
</blockquote>
If you are successful in installing Python 2.7 and NumPy, you may
try using the PIMS module and execute the following code with
pyEvalStr(..):<br>
<pre style="font-family:Monospaced;font-style:normal;font-size:12.0;"><span style="color:rgb(0,0,0);">import</span> <span style="color:rgb(0,0,0);">audiere</span>
<span style="color:rgb(0,0,0);">d</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(0,0,0);">audiere</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">open_device</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(0,0,0);">t</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(0,0,0);">d</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">create_tone</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">17000</span><span style="color:rgb(74,85,219);">)</span> <span style="color:rgb(0,0,0);">#</span> <span style="color:rgb(188,143,143);">17</span> <span style="color:rgb(0,0,0);">KHz</span>
<span style="color:rgb(0,0,0);">t</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">play</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(74,85,219);">)</span> <span style="color:rgb(0,0,0);">#</span> <span style="color:rgb(0,0,0);">non</span><span style="color:rgb(92,92,92);">-</span><span style="color:rgb(0,0,0);">blocking</span> <span style="color:rgb(50,185,185);">call</span>
<span style="color:rgb(0,0,0);">import</span> <span style="color:rgb(0,0,0);">time</span>
<span style="color:rgb(0,0,0);">time</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">sleep</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">5</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(0,0,0);">t</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">stop</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(74,85,219);">)</span></pre>
</blockquote>
May i add that i did not succeed finding any <b>Java</b> code able
to trig such a sound emission in a non modal (non blocking) way.
Yet, it would be better to use JIMS rather than PIMS, since a) JIMS
is supported by Mac OS X, whereas PIMS is supported "only" on
Windows and Linux b) JIMS does not require installing an external
library as Python and Numpy.<br>
You may also dig this way! Java developpers may provide interesting
hints.<br>
<br>
Samuel<br>
<br>
</body>
</html>