<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/239052</link>
    <title>MATLAB Central Newsreader - Event driven audio recording</title>
    <description>Feed for thread: Event driven audio recording</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Tue, 11 Nov 2008 15:02:03 -0500</pubDate>
      <title>Event driven audio recording</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/239052#610299</link>
      <author>Johan Carlson</author>
      <description>This is what I would like to do:&lt;br&gt;
-------------------------------------&lt;br&gt;
1) Start a process that monitors audio input on two channels of the sound card. &lt;br&gt;
2) Audio should be sampled into circular buffers of some length of my choice.&lt;br&gt;
3) Once the audio signal on either channel exceeds some predefined threshold, the function should return the contents of the audio buffers.&lt;br&gt;
&lt;br&gt;
So, why do I want this:&lt;br&gt;
----------------------------&lt;br&gt;
I'm interested in recording transient audio events. They do not occur very often and not at any predefined times. I would therefore like MATLAB to continuously record sound into two circular buffers. In this way I won't miss any part of the signal as long as the buffer lengths are set up properly.&lt;br&gt;
&lt;br&gt;
So, any ideas? To me this sounds like a problem that someone else should have run into.&lt;br&gt;
&lt;br&gt;
Thanks in advance,&lt;br&gt;
/Johan</description>
    </item>
    <item>
      <pubDate>Fri, 14 Nov 2008 16:00:05 -0500</pubDate>
      <title>Re: Event driven audio recording</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/239052#610929</link>
      <author>Johan Carlson</author>
      <description>Hi again!&lt;br&gt;
&lt;br&gt;
Well folks, I solved the problem myself. The solution requires the Data Acquisition Toolbox, but other than that it's fine.&lt;br&gt;
&lt;br&gt;
I'm going to post the zip in the file exchange once I figure out how to do that.&lt;br&gt;
&lt;br&gt;
Cheers!&lt;br&gt;
/JC</description>
    </item>
    <item>
      <pubDate>Sat, 15 Nov 2008 11:08:02 -0500</pubDate>
      <title>Re: Event driven audio recording</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/239052#611061</link>
      <author>Johan Carlson</author>
      <description>Hi again!&lt;br&gt;
&lt;br&gt;
I now submitted my solution to the &quot;File exchange&quot;. It may take a few days before it shows up, but search for &quot;audiorec&quot; and it should pop up.&lt;br&gt;
&lt;br&gt;
Tested on Windows XP and MATLAB 2007b. Requires the Data Acquisition Toolbox, which has had the habit of changing a lot lately, causing old functions to stop working if you upgrade MATLAB. So, if it does not work on previous or newer MATLAB releases, let me know.&lt;br&gt;
&lt;br&gt;
Regards,&lt;br&gt;
/JC</description>
    </item>
    <item>
      <pubDate>Sun, 16 Nov 2008 01:00:19 -0500</pubDate>
      <title>Re: Event driven audio recording</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/239052#611108</link>
      <author>Rob Purser</author>
      <description>Cool application.  &lt;br&gt;
&lt;br&gt;
I wanted to follow up on one comment about the Data Acquisition Toolbox changing a lot recently.  I'm the lead developer, and we try to make sure not to break people's code from one release to another.  Would you be willing to tell us about a place where we did break your code?  We want to learn about things that we missed in order to ensure we don't deo it in the future.&lt;br&gt;
&lt;br&gt;
Thanks very much,&lt;br&gt;
Rob Purser&lt;br&gt;
Senior Team lead, Test and Measurement</description>
    </item>
    <item>
      <pubDate>Sun, 16 Nov 2008 07:40:21 -0500</pubDate>
      <title>Re: Event driven audio recording</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/239052#611124</link>
      <author>Johan Carlson</author>
      <description>OK,&lt;br&gt;
&lt;br&gt;
This piece of code was taken from a MATLAB 6.x version:&lt;br&gt;
&lt;br&gt;
AI = analoginput('nidaq');&lt;br&gt;
&lt;br&gt;
Then, using the exact same hardware, but with MATLAB 2007b, I had to do this:&lt;br&gt;
&lt;br&gt;
hwinfo = daqhwinfo('nidaq');&lt;br&gt;
dev = char(hwinfo.InstalledBoardIds);&lt;br&gt;
AI = analoginput('nidaq',dev);&lt;br&gt;
&lt;br&gt;
There's only one National Instruments card in the machine, so this shouldn't be necessary. &lt;br&gt;
&lt;br&gt;
Then, for MATLAB 2008a it stopped working again, but unfortunately I don't have that code here. I'll check with my colleague if he managed to fix it, or I will post the error messages we got.&lt;br&gt;
&lt;br&gt;
Thanks!&lt;br&gt;
/JC</description>
    </item>
    <item>
      <pubDate>Mon, 17 Nov 2008 16:18:01 -0500</pubDate>
      <title>Re: Event driven audio recording</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/239052#611306</link>
      <author>Johan Carlson</author>
      <description>OK, now my software is available at the File Exchange,&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/matlabcentral/fileexchange/22115&quot;&gt;http://www.mathworks.com/matlabcentral/fileexchange/22115&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Enjoy!&lt;br&gt;
/Johan</description>
    </item>
  </channel>
</rss>

