<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Minim 1.1 Released!</title>
	<link>http://code.compartmental.net/2007/06/03/minim-11-released/</link>
	<description>Prototypes and Other Bits of Code</description>
	<pubDate>Thu, 28 Aug 2008 02:48:00 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
		<item>
		<title>By: ddf</title>
		<link>http://code.compartmental.net/2007/06/03/minim-11-released/#comment-503</link>
		<dc:creator>ddf</dc:creator>
		<pubDate>Sun, 30 Dec 2007 19:59:42 +0000</pubDate>
		<guid>http://code.compartmental.net/2007/06/03/minim-11-released/#comment-503</guid>
		<description>Basil: What you could do is write a class that implements AudioEffect and then just have it add the signal to the samples it receives.  Your process function might look like this:

&lt;pre lang="Java"&gt;
void process(float[] samps)
{
   sine.generate(samps);
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Basil: What you could do is write a class that implements AudioEffect and then just have it add the signal to the samples it receives.  Your process function might look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="java"><span style="color: #996600;">void</span> process<span style="color: #333;">&#40;</span><span style="color: #996600;">float</span><span style="color: #333;">&#91;</span><span style="color: #333;">&#93;</span> samps<span style="color: #333;">&#41;</span>
<span style="color: #333;">&#123;</span>
   sine.<span style="color: #333;">generate</span><span style="color: #333;">&#40;</span>samps<span style="color: #333;">&#41;</span>;
<span style="color: #333;">&#125;</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: Basil Stotz</title>
		<link>http://code.compartmental.net/2007/06/03/minim-11-released/#comment-502</link>
		<dc:creator>Basil Stotz</dc:creator>
		<pubDate>Tue, 18 Dec 2007 14:22:12 +0000</pubDate>
		<guid>http://code.compartmental.net/2007/06/03/minim-11-released/#comment-502</guid>
		<description>Hello

Minim is a great thing. It is easy to use and has many nice interfaces. 

But ther is one problem I can't resolve.

I have an app which gets the signal from an input line, then it filters the signal and finally renders the waveform. perfekt.

Now I'd like to add a signal (e.g. SineWave) to this input signal before the rendering?  But I can't find a suitable hook?

Basil</description>
		<content:encoded><![CDATA[<p>Hello</p>
<p>Minim is a great thing. It is easy to use and has many nice interfaces. </p>
<p>But ther is one problem I can&#8217;t resolve.</p>
<p>I have an app which gets the signal from an input line, then it filters the signal and finally renders the waveform. perfekt.</p>
<p>Now I&#8217;d like to add a signal (e.g. SineWave) to this input signal before the rendering?  But I can&#8217;t find a suitable hook?</p>
<p>Basil</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ddf</title>
		<link>http://code.compartmental.net/2007/06/03/minim-11-released/#comment-498</link>
		<dc:creator>ddf</dc:creator>
		<pubDate>Thu, 06 Dec 2007 01:13:08 +0000</pubDate>
		<guid>http://code.compartmental.net/2007/06/03/minim-11-released/#comment-498</guid>
		<description>Hey Oliver, 

That is a weird workaround and I'm not sure why it works for you as you say it does. There isn't an event that you can listen for to tell you when the sound finishes playing, I'm trying to avoid having too much callback stuff because it can be confusing for beginners. What you can do is poll the isPlaying() method of the AudioPlayer. If you just start the player playing and don't  stop it yourself, this will return false when the sound is done playing. Or, at least it should. This may not work entirely correctly in Minim 1.1 but I am making absolutely sure it does for the next release.

There isn't any way to change the pitch of the sound at the moment, a SAMPLE_RATE control is not typically available from Javasound. But I'm working on something that will make this possible.</description>
		<content:encoded><![CDATA[<p>Hey Oliver, </p>
<p>That is a weird workaround and I&#8217;m not sure why it works for you as you say it does. There isn&#8217;t an event that you can listen for to tell you when the sound finishes playing, I&#8217;m trying to avoid having too much callback stuff because it can be confusing for beginners. What you can do is poll the isPlaying() method of the AudioPlayer. If you just start the player playing and don&#8217;t  stop it yourself, this will return false when the sound is done playing. Or, at least it should. This may not work entirely correctly in Minim 1.1 but I am making absolutely sure it does for the next release.</p>
<p>There isn&#8217;t any way to change the pitch of the sound at the moment, a SAMPLE_RATE control is not typically available from Javasound. But I&#8217;m working on something that will make this possible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oliver</title>
		<link>http://code.compartmental.net/2007/06/03/minim-11-released/#comment-497</link>
		<dc:creator>Oliver</dc:creator>
		<pubDate>Tue, 04 Dec 2007 22:10:48 +0000</pubDate>
		<guid>http://code.compartmental.net/2007/06/03/minim-11-released/#comment-497</guid>
		<description>Hello
With Minim sound in java get's easy!!! Great Work !!!
Question.
If I have a AudioPlayer, is it possible to have a listener ore anything else, that can tell me, that the sound is played ready, so that it can start now, to play a next soundfile?

And second Question.
Is it possible to change the pitch (I mean play it faster or slower) ?

A problem I have is, if I want to change the pan or gain. It is not recognized if i do this to early.

my workaround is to have a request like this, which is called in the repeated draw method, before change any parameters.

  boolean canPlay(){
    player.pause();
    player.mute();
    test=player.isMuted();
    player.unmute();
    return(test);
  }


Thank you very much for this great library.

Oliver</description>
		<content:encoded><![CDATA[<p>Hello<br />
With Minim sound in java get&#8217;s easy!!! Great Work !!!<br />
Question.<br />
If I have a AudioPlayer, is it possible to have a listener ore anything else, that can tell me, that the sound is played ready, so that it can start now, to play a next soundfile?</p>
<p>And second Question.<br />
Is it possible to change the pitch (I mean play it faster or slower) ?</p>
<p>A problem I have is, if I want to change the pan or gain. It is not recognized if i do this to early.</p>
<p>my workaround is to have a request like this, which is called in the repeated draw method, before change any parameters.</p>
<p>  boolean canPlay(){<br />
    player.pause();<br />
    player.mute();<br />
    test=player.isMuted();<br />
    player.unmute();<br />
    return(test);<br />
  }</p>
<p>Thank you very much for this great library.</p>
<p>Oliver</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ddf</title>
		<link>http://code.compartmental.net/2007/06/03/minim-11-released/#comment-305</link>
		<dc:creator>ddf</dc:creator>
		<pubDate>Thu, 09 Aug 2007 00:35:24 +0000</pubDate>
		<guid>http://code.compartmental.net/2007/06/03/minim-11-released/#comment-305</guid>
		<description>Thanks for pointing out the bugs, I'm not surprised they all have to do with mp3 playback. That has been a real pain, especially where the browser is concerned. I suspect the reason for the third one has something to do with applet permissions or possibly just the type of file handle you get from a packed jar as opposed to an actual file system. I seem to recall dealing with that issue at a certain point.</description>
		<content:encoded><![CDATA[<p>Thanks for pointing out the bugs, I&#8217;m not surprised they all have to do with mp3 playback. That has been a real pain, especially where the browser is concerned. I suspect the reason for the third one has something to do with applet permissions or possibly just the type of file handle you get from a packed jar as opposed to an actual file system. I seem to recall dealing with that issue at a certain point.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://code.compartmental.net/2007/06/03/minim-11-released/#comment-304</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Wed, 08 Aug 2007 22:04:12 +0000</pubDate>
		<guid>http://code.compartmental.net/2007/06/03/minim-11-released/#comment-304</guid>
		<description>Hey, great work!
I had some slight problems with the scrubbing demo. The rewind is not working (or VERY slow) the further you are within an MP3 file. I worked around this by pausing the music and moving the red marker until mouseReleased. Just then I change actually the position in the file. 

I have just two smaller problems remaining: When the end of an mp3 file is reached the Java process consumes 100% cpu time. And it stays that way even I close the file and open another one (I use a Java/Javascript interface for opening files inside HTML). 
And the second problem is the length of the mp3 file: It works when I run the applet locally, but not when I run it from a web server. 
Is there a workaround for this?

Greets from Germany,
Ben</description>
		<content:encoded><![CDATA[<p>Hey, great work!<br />
I had some slight problems with the scrubbing demo. The rewind is not working (or VERY slow) the further you are within an MP3 file. I worked around this by pausing the music and moving the red marker until mouseReleased. Just then I change actually the position in the file. </p>
<p>I have just two smaller problems remaining: When the end of an mp3 file is reached the Java process consumes 100% cpu time. And it stays that way even I close the file and open another one (I use a Java/Javascript interface for opening files inside HTML).<br />
And the second problem is the length of the mp3 file: It works when I run the applet locally, but not when I run it from a web server.<br />
Is there a workaround for this?</p>
<p>Greets from Germany,<br />
Ben</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jonah</title>
		<link>http://code.compartmental.net/2007/06/03/minim-11-released/#comment-231</link>
		<dc:creator>jonah</dc:creator>
		<pubDate>Thu, 12 Jul 2007 18:18:24 +0000</pubDate>
		<guid>http://code.compartmental.net/2007/06/03/minim-11-released/#comment-231</guid>
		<description>hey I'm using Minim to play a sound file in processing - but I can't figure out how to play the file just once... I have it playing fine using:

Minim.start(this);
player = Minim.loadFile("clip.mp3", 512);
player.play();

but I need it to stop playing after this and it seems to keep playing over and over and over...

any help would be great.</description>
		<content:encoded><![CDATA[<p>hey I&#8217;m using Minim to play a sound file in processing - but I can&#8217;t figure out how to play the file just once&#8230; I have it playing fine using:</p>
<p>Minim.start(this);<br />
player = Minim.loadFile(&#8221;clip.mp3&#8243;, 512);<br />
player.play();</p>
<p>but I need it to stop playing after this and it seems to keep playing over and over and over&#8230;</p>
<p>any help would be great.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ddf</title>
		<link>http://code.compartmental.net/2007/06/03/minim-11-released/#comment-228</link>
		<dc:creator>ddf</dc:creator>
		<pubDate>Sun, 24 Jun 2007 21:18:22 +0000</pubDate>
		<guid>http://code.compartmental.net/2007/06/03/minim-11-released/#comment-228</guid>
		<description>The only way to get absolutely every sample is to implement &lt;a href="http://code.compartmental.net/minim/javadoc/ddf/minim/AudioListener.html" rel="nofollow"&gt;AudioListener&lt;/a&gt; and then add one as a listener on your &lt;code&gt;AudioInput&lt;/code&gt;. This is because the thread that reads from the input will refill the buffer of your &lt;code&gt;AudioInput&lt;/code&gt; much more quickly than 60 times per second, which is about as often you can hope to poll the buffer in &lt;code&gt;draw()&lt;/code&gt;. 

You could choose to do something like you've suggested, an object that you poll for samples in &lt;code&gt;draw&lt;/code&gt; (you'd want to make both the polling method and the samples methods synchronized), but it would depend on what you wanted to do with the samples.</description>
		<content:encoded><![CDATA[<p>The only way to get absolutely every sample is to implement <a href="http://code.compartmental.net/minim/javadoc/ddf/minim/AudioListener.html" rel="nofollow">AudioListener</a> and then add one as a listener on your <code>AudioInput</code>. This is because the thread that reads from the input will refill the buffer of your <code>AudioInput</code> much more quickly than 60 times per second, which is about as often you can hope to poll the buffer in <code>draw()</code>. </p>
<p>You could choose to do something like you&#8217;ve suggested, an object that you poll for samples in <code>draw</code> (you&#8217;d want to make both the polling method and the samples methods synchronized), but it would depend on what you wanted to do with the samples.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kyle</title>
		<link>http://code.compartmental.net/2007/06/03/minim-11-released/#comment-223</link>
		<dc:creator>Kyle</dc:creator>
		<pubDate>Mon, 04 Jun 2007 07:26:06 +0000</pubDate>
		<guid>http://code.compartmental.net/2007/06/03/minim-11-released/#comment-223</guid>
		<description>If you wanted to do something in real time with every single sample of audio input, what approach would you take? Would you record to a file and retrieve the samples from the file, or something else? With the interfaces defined now, would you implement something similar to an AudioBuffer that would only empty when you polled it?</description>
		<content:encoded><![CDATA[<p>If you wanted to do something in real time with every single sample of audio input, what approach would you take? Would you record to a file and retrieve the samples from the file, or something else? With the interfaces defined now, would you implement something similar to an AudioBuffer that would only empty when you polled it?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
