<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Manual: AudioOutput</title>
	<atom:link href="http://code.compartmental.net/tools/minim/manual-audiooutput/feed/" rel="self" type="application/rss+xml" />
	<link>http://code.compartmental.net</link>
	<description></description>
	<lastBuildDate>Fri, 23 Jul 2010 06:21:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: maki</title>
		<link>http://code.compartmental.net/tools/minim/manual-audiooutput/comment-page-1/#comment-2654</link>
		<dc:creator>maki</dc:creator>
		<pubDate>Tue, 20 Jul 2010 22:57:27 +0000</pubDate>
		<guid isPermaLink="false">http://code.compartmental.net/tools/minim/manual-audiooutput/#comment-2654</guid>
		<description>Yes, I tried passing 4 to getLineOut. But i receive this ERROR:
==== JavaSound Minim Error ====
==== Unable to return a SourceDataLine: unsupported format - PCM_SIGNED 44100.0 Hz, 16 bit, 4 channels, 8 bytes/frame, little-endian

=== Minim Error ===
=== Minim.getLineOut: attempt failed, could not secure a LineOut.

Not setting the OutputMixer with Minim and setting the soundcard as output in the systempreferences, I can use Minim.MONO and Minim.STEREO on two channels. But with setting the mixer with minim.setOutputMixer to the MAYA44, I get an ERROR in any cases.</description>
		<content:encoded><![CDATA[<p>Yes, I tried passing 4 to getLineOut. But i receive this ERROR:<br />
==== JavaSound Minim Error ====<br />
==== Unable to return a SourceDataLine: unsupported format &#8211; PCM_SIGNED 44100.0 Hz, 16 bit, 4 channels, 8 bytes/frame, little-endian</p>
<p>=== Minim Error ===<br />
=== Minim.getLineOut: attempt failed, could not secure a LineOut.</p>
<p>Not setting the OutputMixer with Minim and setting the soundcard as output in the systempreferences, I can use Minim.MONO and Minim.STEREO on two channels. But with setting the mixer with minim.setOutputMixer to the MAYA44, I get an ERROR in any cases.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ddf</title>
		<link>http://code.compartmental.net/tools/minim/manual-audiooutput/comment-page-1/#comment-2650</link>
		<dc:creator>ddf</dc:creator>
		<pubDate>Tue, 20 Jul 2010 03:08:44 +0000</pubDate>
		<guid isPermaLink="false">http://code.compartmental.net/tools/minim/manual-audiooutput/#comment-2650</guid>
		<description>If that&#039;s the case, you could try passing 4 as the argument to getLineOut. Minim.MONO and Minim.STEREO are simply named variables to make the function call more clear, but what you are specifying is the number of channels you want your output to have. Typically people aren&#039;t on systems that can provide four-channel output, so I didn&#039;t bother creating a Minim.QUAD constant.</description>
		<content:encoded><![CDATA[<p>If that&#8217;s the case, you could try passing 4 as the argument to getLineOut. Minim.MONO and Minim.STEREO are simply named variables to make the function call more clear, but what you are specifying is the number of channels you want your output to have. Typically people aren&#8217;t on systems that can provide four-channel output, so I didn&#8217;t bother creating a Minim.QUAD constant.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: maki</title>
		<link>http://code.compartmental.net/tools/minim/manual-audiooutput/comment-page-1/#comment-2641</link>
		<dc:creator>maki</dc:creator>
		<pubDate>Sun, 18 Jul 2010 22:43:04 +0000</pubDate>
		<guid isPermaLink="false">http://code.compartmental.net/tools/minim/manual-audiooutput/#comment-2641</guid>
		<description>hello, has anyone ever tried playing and recording sound with the ESI MAYA 44? 

It doesn&#039;t accept getLineOut(Minim.STEREO); or getLineOut(Minim.MONO); because (this is what I think) it has 4 channel analog line outputs/inputs, which are neither MONO or STEREO, but just channel numbers..</description>
		<content:encoded><![CDATA[<p>hello, has anyone ever tried playing and recording sound with the ESI MAYA 44? </p>
<p>It doesn&#8217;t accept getLineOut(Minim.STEREO); or getLineOut(Minim.MONO); because (this is what I think) it has 4 channel analog line outputs/inputs, which are neither MONO or STEREO, but just channel numbers..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ddf</title>
		<link>http://code.compartmental.net/tools/minim/manual-audiooutput/comment-page-1/#comment-2202</link>
		<dc:creator>ddf</dc:creator>
		<pubDate>Sat, 24 Apr 2010 02:21:18 +0000</pubDate>
		<guid isPermaLink="false">http://code.compartmental.net/tools/minim/manual-audiooutput/#comment-2202</guid>
		<description>Yah, this looks like it will work fine. You could also do the same thing with a single Minim object by setting the output mixer before each call to getLineOut.</description>
		<content:encoded><![CDATA[<p>Yah, this looks like it will work fine. You could also do the same thing with a single Minim object by setting the output mixer before each call to getLineOut.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Naman</title>
		<link>http://code.compartmental.net/tools/minim/manual-audiooutput/comment-page-1/#comment-2129</link>
		<dc:creator>Mike Naman</dc:creator>
		<pubDate>Mon, 19 Apr 2010 14:43:06 +0000</pubDate>
		<guid isPermaLink="false">http://code.compartmental.net/tools/minim/manual-audiooutput/#comment-2129</guid>
		<description>Hi guys,

Just had to complete a quick project that required different mp3 files playing to different sound channels. Processing can accomplish this, here&#039;s how I solved it:

import ddf.minim.*;
import ddf.minim.signals.*;
import javax.sound.sampled.*;

Minim minim1;
Minim minim2;

AudioOutput out1;
AudioOutput out2;

AudioPlayer song1;
AudioPlayer song2;

Mixer.Info[] mixerInfo;

void setup()
{
  size(512, 256);
 
  minim1 = new Minim(this);
  minim2 = new Minim(this);
  
  //--GET THE LIST OF AVAILABLE MIXERS
  mixerInfo = AudioSystem.getMixerInfo();
  
  println(AudioSystem.getMixerInfo());
  
  //--SELECT A MIXER BASED ON THE INDEX IN THE mixerInfo ARRAY
  mixer1 = AudioSystem.getMixer(mixerInfo[1]);
  mixer2 = AudioSystem.getMixer(mixerInfo[2]);
  
  minim1.setOutputMixer(mixer1);
  minim2.setOutputMixer(mixer2);

  
  out1 = minim1.getLineOut(Minim.STEREO);
  out2 = minim2.getLineOut(Minim.STEREO);
  
  song1 = minim1.loadFile(&quot;YOUR SONG FILE.mp3&quot;);
  song2 = minim2.loadFile(&quot;YOUR SONG FILE.mp3&quot;);
 

  song1.play();
  song2.play();
}

void stop()
{
  //--ALWAYS CLOSE THE SONG
  song1.close();
  song2.close();
 
  
  //--ALWAYS STOP THE MINIM
  minim1.stop();
  minim2.stop();
  

  //--CLOSE THE OUT CHANNEL 
  out1.close();
  out2.close();


 
 //--ALWATSYS STOP .super()
 super.stop();
}

I&#039;ve cut down the code to past here so may not work first time.</description>
		<content:encoded><![CDATA[<p>Hi guys,</p>
<p>Just had to complete a quick project that required different mp3 files playing to different sound channels. Processing can accomplish this, here&#8217;s how I solved it:</p>
<p>import ddf.minim.*;<br />
import ddf.minim.signals.*;<br />
import javax.sound.sampled.*;</p>
<p>Minim minim1;<br />
Minim minim2;</p>
<p>AudioOutput out1;<br />
AudioOutput out2;</p>
<p>AudioPlayer song1;<br />
AudioPlayer song2;</p>
<p>Mixer.Info[] mixerInfo;</p>
<p>void setup()<br />
{<br />
  size(512, 256);</p>
<p>  minim1 = new Minim(this);<br />
  minim2 = new Minim(this);</p>
<p>  //&#8211;GET THE LIST OF AVAILABLE MIXERS<br />
  mixerInfo = AudioSystem.getMixerInfo();</p>
<p>  println(AudioSystem.getMixerInfo());</p>
<p>  //&#8211;SELECT A MIXER BASED ON THE INDEX IN THE mixerInfo ARRAY<br />
  mixer1 = AudioSystem.getMixer(mixerInfo[1]);<br />
  mixer2 = AudioSystem.getMixer(mixerInfo[2]);</p>
<p>  minim1.setOutputMixer(mixer1);<br />
  minim2.setOutputMixer(mixer2);</p>
<p>  out1 = minim1.getLineOut(Minim.STEREO);<br />
  out2 = minim2.getLineOut(Minim.STEREO);</p>
<p>  song1 = minim1.loadFile(&#8220;YOUR SONG FILE.mp3&#8243;);<br />
  song2 = minim2.loadFile(&#8220;YOUR SONG FILE.mp3&#8243;);</p>
<p>  song1.play();<br />
  song2.play();<br />
}</p>
<p>void stop()<br />
{<br />
  //&#8211;ALWAYS CLOSE THE SONG<br />
  song1.close();<br />
  song2.close();</p>
<p>  //&#8211;ALWAYS STOP THE MINIM<br />
  minim1.stop();<br />
  minim2.stop();</p>
<p>  //&#8211;CLOSE THE OUT CHANNEL<br />
  out1.close();<br />
  out2.close();</p>
<p> //&#8211;ALWATSYS STOP .super()<br />
 super.stop();<br />
}</p>
<p>I&#8217;ve cut down the code to past here so may not work first time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlo</title>
		<link>http://code.compartmental.net/tools/minim/manual-audiooutput/comment-page-1/#comment-2031</link>
		<dc:creator>Carlo</dc:creator>
		<pubDate>Tue, 06 Apr 2010 15:07:35 +0000</pubDate>
		<guid isPermaLink="false">http://code.compartmental.net/tools/minim/manual-audiooutput/#comment-2031</guid>
		<description>so , with the sine in the sketch of minim it works , I can move between the channels ,but I can&#039;t play a selected file audio from my disk 
this the last I tryed , Can somebody pleeeease help me?

/**
  * This sketch demonstrates how to use the &lt;code&gt;setOutputMixer&lt;/code&gt;
  * method of &lt;code&gt;Minim&lt;/code&gt; in conjunction with the &lt;code&gt;getLineOut&lt;/code&gt;
  * method. By accessing the Mixer objects of Javasound, you can find one that
  * corresponds to the output mixer of the sound device of your choice. You can
  * then set this Mixer as the one that should use when creating an AudioOutput for you.
  * This Mixer will also be used when obtaining outputs for AudioPlayers, AudioSamples,
  * and any other classes that result in sound being ouput to your speakers.
  * 
  * This sketch uses controlP5 for the GUI, a user-contributed Processing library.
  */
 
import ddf.minim.*;
// need signals package for SineWave

import ddf.minim.signals.*;
import controlP5.*;
AudioSample kick;
AudioSample snare;
 
// need to import this so we can use Mixer and Mixer.Info objects
import javax.sound.sampled.*;
 
Minim minim;
AudioOutput out;
// an array of info objects describing all of 
// the mixers the AudioSystem has. we&#039;ll use
// this to populate our gui scroll list and
// also to obtain an actual Mixer when the
// user clicks on an item in the list.
Mixer.Info[] mixerInfo;
 
// a signal for our output
SineWave sine;
 
ControlP5 gui;
 
void setup()
{
   size(512, 200, P3D);
 
  minim = new Minim(this);
  gui = new ControlP5(this);
 
  ScrollList mixers = gui.addScrollList(&quot;Mixers&quot;, 10, 10, 475, 280);
  mixers.setLabel(&quot;Choose A Mixer&quot;);
 
  mixerInfo = AudioSystem.getMixerInfo();
 
  for(int i = 0; i &lt; mixerInfo.length; i++)
  {
    controlP5.Button b = mixers.addItem(&quot;item&quot;+i, i);
    b.setLabel(mixerInfo[i].getName());
  }
 
  sine = new SineWave(220, 0.3, 44100);
 

  
}
 
void draw()
{
  background(0);
 
  //gui.draw();
 
  if ( out != null )
  {
    stroke(255);
    // draw the waveforms
    for(int i = 0; i &lt; out.bufferSize() - 1; i++)
    {
      line(i, 50 + out.left.get(i)*50, i+1, 50 + out.left.get(i+1)*50);
      line(i, 150 + out.right.get(i)*50, i+1, 150 + out.right.get(i+1)*50);
    }
  }
}
 
public void controlEvent(ControlEvent theEvent)
{
  int mixerIndex = (int)theEvent.controller().value();
 
  println(&quot;User chose &quot; + theEvent.controller().label());
  println(&quot;Using mixer info &quot; + mixerInfo[mixerIndex].getName());
 
  Mixer mixer = AudioSystem.getMixer(mixerInfo[mixerIndex]);
 
  minim.setOutputMixer(mixer);
  // load BD.wav from the data folder
  kick = minim.loadSample(&quot;file1.wav&quot;, 2048);
  if ( kick == null ) println(&quot;Didn&#039;t get kick!&quot;);
  // load SD.wav from the data folder
  snare = minim.loadSample(&quot;file2.wav&quot;, 2048);
  if ( snare == null ) println(&quot;Didn&#039;t get snare!&quot;);

 
  if ( out != null )
  {
    out.close();
  }
 
  out = minim.getLineOut(Minim.STEREO);
 
  if ( out != null )
  {
    snare.trigger();
  }
}
 void keyPressed()
{
  if ( key == &#039;s&#039; ) snare.trigger();
  if ( key == &#039;k&#039; ) kick.trigger();
}
 
 
void stop()
{  // always close Minim audio classes when you are done with them
  kick.close();
  snare.close();
  // always close Minim audio classes when you are done with them
  if ( out != null )
  {
    out.close();
  }
  minim.stop();
 
  super.stop();
}</description>
		<content:encoded><![CDATA[<p>so , with the sine in the sketch of minim it works , I can move between the channels ,but I can&#8217;t play a selected file audio from my disk<br />
this the last I tryed , Can somebody pleeeease help me?</p>
<p>/**<br />
  * This sketch demonstrates how to use the <code>setOutputMixer</code><br />
  * method of <code>Minim</code> in conjunction with the <code>getLineOut</code><br />
  * method. By accessing the Mixer objects of Javasound, you can find one that<br />
  * corresponds to the output mixer of the sound device of your choice. You can<br />
  * then set this Mixer as the one that should use when creating an AudioOutput for you.<br />
  * This Mixer will also be used when obtaining outputs for AudioPlayers, AudioSamples,<br />
  * and any other classes that result in sound being ouput to your speakers.<br />
  *<br />
  * This sketch uses controlP5 for the GUI, a user-contributed Processing library.<br />
  */</p>
<p>import ddf.minim.*;<br />
// need signals package for SineWave</p>
<p>import ddf.minim.signals.*;<br />
import controlP5.*;<br />
AudioSample kick;<br />
AudioSample snare;</p>
<p>// need to import this so we can use Mixer and Mixer.Info objects<br />
import javax.sound.sampled.*;</p>
<p>Minim minim;<br />
AudioOutput out;<br />
// an array of info objects describing all of<br />
// the mixers the AudioSystem has. we&#8217;ll use<br />
// this to populate our gui scroll list and<br />
// also to obtain an actual Mixer when the<br />
// user clicks on an item in the list.<br />
Mixer.Info[] mixerInfo;</p>
<p>// a signal for our output<br />
SineWave sine;</p>
<p>ControlP5 gui;</p>
<p>void setup()<br />
{<br />
   size(512, 200, P3D);</p>
<p>  minim = new Minim(this);<br />
  gui = new ControlP5(this);</p>
<p>  ScrollList mixers = gui.addScrollList(&#8220;Mixers&#8221;, 10, 10, 475, 280);<br />
  mixers.setLabel(&#8220;Choose A Mixer&#8221;);</p>
<p>  mixerInfo = AudioSystem.getMixerInfo();</p>
<p>  for(int i = 0; i &lt; mixerInfo.length; i++)<br />
  {<br />
    controlP5.Button b = mixers.addItem(&quot;item&quot;+i, i);<br />
    b.setLabel(mixerInfo[i].getName());<br />
  }</p>
<p>  sine = new SineWave(220, 0.3, 44100);</p>
<p>}</p>
<p>void draw()<br />
{<br />
  background(0);</p>
<p>  //gui.draw();</p>
<p>  if ( out != null )<br />
  {<br />
    stroke(255);<br />
    // draw the waveforms<br />
    for(int i = 0; i &lt; out.bufferSize() &#8211; 1; i++)<br />
    {<br />
      line(i, 50 + out.left.get(i)*50, i+1, 50 + out.left.get(i+1)*50);<br />
      line(i, 150 + out.right.get(i)*50, i+1, 150 + out.right.get(i+1)*50);<br />
    }<br />
  }<br />
}</p>
<p>public void controlEvent(ControlEvent theEvent)<br />
{<br />
  int mixerIndex = (int)theEvent.controller().value();</p>
<p>  println(&quot;User chose &quot; + theEvent.controller().label());<br />
  println(&quot;Using mixer info &quot; + mixerInfo[mixerIndex].getName());</p>
<p>  Mixer mixer = AudioSystem.getMixer(mixerInfo[mixerIndex]);</p>
<p>  minim.setOutputMixer(mixer);<br />
  // load BD.wav from the data folder<br />
  kick = minim.loadSample(&quot;file1.wav&quot;, 2048);<br />
  if ( kick == null ) println(&quot;Didn&#039;t get kick!&quot;);<br />
  // load SD.wav from the data folder<br />
  snare = minim.loadSample(&quot;file2.wav&quot;, 2048);<br />
  if ( snare == null ) println(&quot;Didn&#039;t get snare!&quot;);</p>
<p>  if ( out != null )<br />
  {<br />
    out.close();<br />
  }</p>
<p>  out = minim.getLineOut(Minim.STEREO);</p>
<p>  if ( out != null )<br />
  {<br />
    snare.trigger();<br />
  }<br />
}<br />
 void keyPressed()<br />
{<br />
  if ( key == &#039;s&#039; ) snare.trigger();<br />
  if ( key == &#039;k&#039; ) kick.trigger();<br />
}</p>
<p>void stop()<br />
{  // always close Minim audio classes when you are done with them<br />
  kick.close();<br />
  snare.close();<br />
  // always close Minim audio classes when you are done with them<br />
  if ( out != null )<br />
  {<br />
    out.close();<br />
  }<br />
  minim.stop();</p>
<p>  super.stop();<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlo</title>
		<link>http://code.compartmental.net/tools/minim/manual-audiooutput/comment-page-1/#comment-2025</link>
		<dc:creator>Carlo</dc:creator>
		<pubDate>Mon, 05 Apr 2010 06:36:19 +0000</pubDate>
		<guid isPermaLink="false">http://code.compartmental.net/tools/minim/manual-audiooutput/#comment-2025</guid>
		<description>hum, now I try , many many thanks!</description>
		<content:encoded><![CDATA[<p>hum, now I try , many many thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ddf</title>
		<link>http://code.compartmental.net/tools/minim/manual-audiooutput/comment-page-1/#comment-2024</link>
		<dc:creator>ddf</dc:creator>
		<pubDate>Mon, 05 Apr 2010 02:23:58 +0000</pubDate>
		<guid isPermaLink="false">http://code.compartmental.net/tools/minim/manual-audiooutput/#comment-2024</guid>
		<description>It should work with AudioSample, as well, as long as you call setOutputMixer before asking for the sample, as you must do before obtaining an AudioOutput.</description>
		<content:encoded><![CDATA[<p>It should work with AudioSample, as well, as long as you call setOutputMixer before asking for the sample, as you must do before obtaining an AudioOutput.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlo</title>
		<link>http://code.compartmental.net/tools/minim/manual-audiooutput/comment-page-1/#comment-2019</link>
		<dc:creator>Carlo</dc:creator>
		<pubDate>Sun, 04 Apr 2010 08:18:36 +0000</pubDate>
		<guid isPermaLink="false">http://code.compartmental.net/tools/minim/manual-audiooutput/#comment-2019</guid>
		<description>Hello , I&#039;m trying to output from my souncard ( a 8 channells out , fireface 800)  a set of 5 sounds that should exit from audio autput 1--3-4--5 in different times, using processing, I tryied with audioOutput ,but it works with the sinewave in the code but not if I call a sample from my pc. Any suggestion?</description>
		<content:encoded><![CDATA[<p>Hello , I&#8217;m trying to output from my souncard ( a 8 channells out , fireface 800)  a set of 5 sounds that should exit from audio autput 1&#8211;3-4&#8211;5 in different times, using processing, I tryied with audioOutput ,but it works with the sinewave in the code but not if I call a sample from my pc. Any suggestion?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Processing brain pain &#171; Carina Westling</title>
		<link>http://code.compartmental.net/tools/minim/manual-audiooutput/comment-page-1/#comment-1608</link>
		<dc:creator>Processing brain pain &#171; Carina Westling</dc:creator>
		<pubDate>Wed, 20 Jan 2010 15:53:53 +0000</pubDate>
		<guid isPermaLink="false">http://code.compartmental.net/tools/minim/manual-audiooutput/#comment-1608</guid>
		<description>[...] brain&#160;pain  Resource library Minim overview page AudioSample code example Web sample of code [...]</description>
		<content:encoded><![CDATA[<p>[...] brain&nbsp;pain  Resource library Minim overview page AudioSample code example Web sample of code [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
