Re: AUDITORY Digest - 14 Oct 2011 to 17 Oct 2011 - Special issue (#2011-238) (Vijay Narne )


Subject: Re: AUDITORY Digest - 14 Oct 2011 to 17 Oct 2011 - Special issue (#2011-238)
From:    Vijay Narne  <vijaynarne@xxxxxxxx>
Date:    Tue, 18 Oct 2011 07:18:42 +0530
List-Archive:<http://lists.mcgill.ca/scripts/wa.exe?LIST=AUDITORY>

--20cf307d00fa6013d504af88eca5 Content-Type: text/plain; charset=ISO-8859-1 Subject: Audio Glitch in Matlab The truncation of the auditory signals less than 500 ms was also seen in windows 7 and MATLAB version 10. I have even noticed this kind of problems in Adobe Audition software. I have not used ASIO sound card. I am not sure about other sound playing softwares. Vijaya Kumar Narne PhD Lecturer in Audiology AIISH Mysore Date: Mon, 17 Oct 2011 09:57:17 -0400 From: Patrick Zurek <pat@xxxxxxxx> Subject: Audio Glitch in Matlab This is a multi-part message in MIME format. --------------030103020706040808060701 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I'm writing to notify list readers of a problem playing audio using Matlab. The problem is that brief signals are truncated, and it happens using any of the common commands for playing audio (wavplay, sound, and the play method of the audioplayer object). I can't specify the exact conditions under which the truncation occurs. However, with a sample rate of 44.1 kHz, signals shorter than about 500 msec are truncated. I haven't looked much at other sample rates. A simple work-around for the problem is to pad the end of the signal with a sufficient number of zeros that truncation occurs during the zero segment. I've found that at least 2000 zeros need to be added to assure no truncation of a 10-msec signal (with a sample rate of 44.1kHz). I've brought this problem to the attention of The Mathworks. They confirmed the problem, which they attribute to a bug in their driver. The Mathworks also informed me that the problem has been solved in their latest release (R2011b) for playing using audioplayer, but not necessarily for the other audio commands. I've confirmed this in very limited tests. The following is a piece of code that you can use to observe the truncation. It creates a 100-msec, 1-kHz sine wave, applies a hanning window, and then plays it first with zero-padding and then without. You should be able to hear the click at the end of the second tone, which is not present on the first. If not, you can see it on an oscilloscope. %%%%%%%%%%%%%%%%%%%% fs = 44100; f = 1000; T = 0.1; nPad = 2000; nS = round(fs*T); y = sin(2.*pi*f/fs*(1:nS)'); w = .5*(1 - cos(2*pi*(1:nS)'/(nS+1))); y = w.*y; yPad = [y; zeros(nPad,1)]; wavplay(yPad, fs, 'sync') pause(0.5) wavplay(y, fs, 'sync') %%%%%%%%%%%%%%%%%%%%% -- Patrick M. Zurek President Sensimetrics Corporation 14 Summer St. Suite 403 Malden, MA 02148 Tel: 781-399-0858 x237 Fax: 781-399-0853 email: pat@xxxxxxxx web: www.sens.com On Mon, Oct 17, 2011 at 10:02 PM, AUDITORY automatic digest system < LISTSERV@xxxxxxxx> wrote: > There are 6 messages totalling 1517 lines in this issue. > > Topics in this special issue: > > 1. CFP: Special Issue on Speech Separation and Recognition in Multisource > Environments > 2. Audio Glitch in Matlab (5) > > ---------------------------------------------------------------------- > > Date: Mon, 17 Oct 2011 12:29:02 +0100 > From: jon <j.barker@xxxxxxxx> > Subject: CFP: Special Issue on Speech Separation and Recognition in > Multisource Environments > > --Apple-Mail=_EDC2B160-FC49-4860-979B-9662B080E0E5 > Content-Transfer-Encoding: quoted-printable > Content-Type: text/plain; > charset=windows-1252 > > [Apologies for multiple postings] > > +++++++++++++++++++++++++++++++++++++++++++ > > COMPUTER SPEECH AND LANGUAGE > http://www.elsevier.com/locate/csl > > Special issue on > SPEECH SEPARATION AND RECOGNITION IN MULTISOURCE ENVIRONMENTS > > Submission Deadline: NOVEMBER 30, 2011 > > +++++++++++++++++++++++++++++++++++++++++++ > > One of the chief difficulties of building distant-microphone speech = > recognition systems for use in everyday applications is that the noise = > background is typically `multisource'. A speech recognition system = > designed to operate in a family home, for example, must contend with = > competing noise from televisions and radios, children playing, vacuum = > cleaners, and outdoors noises from open windows. Despite their = > complexity, such environments contain structure that can be learnt and = > exploited using advanced source separation, machine learning and speech = > recognition techniques such as those presented at the 1st International = > Workshop on Machine Listening in Multisource Environments (CHiME 2011). = > http://spandh.dcs.shef.ac.uk/projects/chime/workshop/ > > This special issue solicits papers describing advances in speech = > separation and recognition in multisource noise environments, including = > theoretical developments, algorithms or systems. > > Examples of topics relevant to the special issue include: > =95 multiple speaker localization, beamforming and source separation, > =95 hearing inspired approaches to multisource processing, > =95 background noise tracking and modelling, > =95 noise-robust speech decoding, > =95 model combination approaches to robust speech recognition, > =95 datasets, toolboxes and other resources for multisource speech = > separation and recognition. > > > SUBMISSION INSTRUCTIONS: > Manuscript submissions shall be made through the Elsevier Editorial = > System (EES) at > http://ees.elsevier.com/csl/ > Once logged in, click on =93Submit New Manuscript=94 then select = > =93Special Issue: Multisource Environments=94 in the =93Choose Article = > Type=94 dropdown menu. > > > IMPORTANT DATES: > November 30, 2011: Paper submission > March 30, 2012: First review > May 30, 2012: Revised submission > July 30, 2012: Second review > August 30, 2012: Camera-ready submission > > > We are looking forward to your submission! > > > Jon Barker, University of Sheffield, UK > Emmanuel Vincent, INRIA, France > > ---=20 > > > --Apple-Mail=_EDC2B160-FC49-4860-979B-9662B080E0E5 > Content-Transfer-Encoding: quoted-printable > Content-Type: text/html; > charset=windows-1252 > > <html><head></head><body style=3D"word-wrap: break-word; = > -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; = > ">[Apologies for multiple = > postings]<div><br></div><div>&nbsp;+++++++++++++++++++++++++++++++++++++++= > ++++</div><div><br></div>&nbsp; &nbsp; &nbsp; COMPUTER SPEECH AND = > LANGUAGE<br>&nbsp; &nbsp; &nbsp;&nbsp;<a = > href=3D"http://www.elsevier.com/locate/csl"> > http://www.elsevier.com/locate= > /csl</a><br><br>&nbsp; &nbsp; &nbsp; Special issue on<div>&nbsp; &nbsp; = > &nbsp; SPEECH SEPARATION AND RECOGNITION IN MULTISOURCE = > ENVIRONMENTS<br><br>&nbsp; &nbsp; &nbsp; Submission Deadline: = > &nbsp;NOVEMBER 30, = > 2011</div><div><br>+++++++++++++++++++++++++++++++++++++++++++<br><br>One = > of the chief difficulties of building distant-microphone speech = > recognition systems for use in everyday applications is that the noise = > background is typically `multisource'. A speech recognition system = > designed to operate in a family home, for example, must contend with = > competing noise from televisions and radios, children playing, vacuum = > cleaners, and outdoors noises from open windows. Despite their = > complexity, such environments contain structure that can be learnt and = > exploited using advanced source separation, machine learning and speech = > recognition techniques such as those presented at the 1st International = > Workshop on Machine Listening in Multisource Environments (CHiME = > 2011).&nbsp;<a = > href=3D"http://spandh.dcs.shef.ac.uk/projects/chime/workshop/">http://span > = > dh.dcs.shef.ac.uk/projects/chime/workshop/</a><br><br>This special issue = > solicits papers describing advances in speech separation and recognition = > in multisource noise environments, including theoretical developments, = > algorithms or systems.<br><br>Examples of topics relevant to the special = > issue include:<br>=95 multiple speaker localization, beamforming and = > source separation,<br>=95 hearing inspired approaches to multisource = > processing,<br>=95 background noise tracking and modelling,<br>=95 = > noise-robust speech decoding,<br>=95 model combination approaches to = > robust speech recognition,<br>=95 datasets, toolboxes and other = > resources for multisource speech separation and = > recognition.<br><br><br>SUBMISSION INSTRUCTIONS:<br>Manuscript = > submissions shall be made through the Elsevier Editorial System (EES) = > at<br><a = > href=3D"http://ees.elsevier.com/csl/">http://ees.elsevier.com/csl/ > </a><br>= > Once logged in, click on =93Submit New Manuscript=94 then select = > =93Special Issue: Multisource Environments=94 in the =93Choose Article = > Type=94 dropdown menu.<br><br><br>IMPORTANT DATES:<br>November 30, 2011: = > Paper submission<br>March 30, 2012: First review<br>May 30, 2012: = > Revised submission<br>July 30, 2012: Second review<br>August 30, 2012: = > Camera-ready submission<br><br><br>We are looking forward to your = > submission!<br></div><div><br></div><div><br></div><div>Jon Barker, = > University of Sheffield, UK<br>Emmanuel Vincent, INRIA, = > France<br><br></div><div>---&nbsp;<div><span class=3D"Apple-style-span" = > style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: = > Helvetica; font-size: medium; font-style: normal; font-variant: normal; = > font-weight: normal; letter-spacing: normal; line-height: normal; = > orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; = > widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; = > -webkit-border-vertical-spacing: 0px; = > -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: = > auto; -webkit-text-stroke-width: 0px; "><span class=3D"Apple-style-span" = > style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: = > Helvetica; font-size: medium; font-style: normal; font-variant: normal; = > font-weight: normal; letter-spacing: normal; line-height: normal; = > orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; = > widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; = > -webkit-border-vertical-spacing: 0px; = > -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: = > auto; -webkit-text-stroke-width: 0px; "><div style=3D"word-wrap: = > break-word; -webkit-nbsp-mode: space; -webkit-line-break: = > after-white-space; "></div></span></span></div></div><div> > <span class=3D"Apple-style-span" style=3D"border-collapse: separate; = > color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; = > font-style: normal; font-variant: normal; font-weight: normal; = > letter-spacing: normal; line-height: normal; orphans: 2; text-align: = > auto; text-indent: 0px; text-transform: none; white-space: normal; = > widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; = > -webkit-border-vertical-spacing: 0px; = > -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: = > auto; -webkit-text-stroke-width: 0px; "><span class=3D"Apple-style-span" = > style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: = > Helvetica; font-size: medium; font-style: normal; font-variant: normal; = > font-weight: normal; letter-spacing: normal; line-height: normal; = > orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; = > widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; = > -webkit-border-vertical-spacing: 0px; = > -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: = > auto; -webkit-text-stroke-width: 0px; "><div style=3D"word-wrap: = > break-word; -webkit-nbsp-mode: space; -webkit-line-break: = > after-white-space; = > "><div><br></div></div></span></span></div></body></html>= > > --Apple-Mail=_EDC2B160-FC49-4860-979B-9662B080E0E5-- > > ------------------------------ > > Date: Mon, 17 Oct 2011 09:57:17 -0400 > From: Patrick Zurek <pat@xxxxxxxx> > Subject: Audio Glitch in Matlab > > This is a multi-part message in MIME format. > --------------030103020706040808060701 > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > Content-Transfer-Encoding: 7bit > > I'm writing to notify list readers of a problem playing audio using Matlab. > > The problem is that brief signals are truncated, and it happens using > any of the common commands for playing audio (wavplay, sound, and the > play method of the audioplayer object). > > I can't specify the exact conditions under which the truncation occurs. > However, with a sample rate of 44.1 kHz, signals shorter than about 500 > msec are truncated. I haven't looked much at other sample rates. > > A simple work-around for the problem is to pad the end of the signal > with a sufficient number of zeros that truncation occurs during the zero > segment. I've found that at least 2000 zeros need to be added to assure > no truncation of a 10-msec signal (with a sample rate of 44.1kHz). > > I've brought this problem to the attention of The Mathworks. They > confirmed the problem, which they attribute to a bug in their driver. > > The Mathworks also informed me that the problem has been solved in their > latest release (R2011b) for playing using audioplayer, but not > necessarily for the other audio commands. I've confirmed this in very > limited tests. > > The following is a piece of code that you can use to observe the > truncation. It creates a 100-msec, 1-kHz sine wave, applies a hanning > window, and then plays it first with zero-padding and then without. You > should be able to hear the click at the end of the second tone, which is > not present on the first. If not, you can see it on an oscilloscope. > > %%%%%%%%%%%%%%%%%%%% > fs = 44100; > f = 1000; > T = 0.1; > nPad = 2000; > > nS = round(fs*T); > > y = sin(2.*pi*f/fs*(1:nS)'); > w = .5*(1 - cos(2*pi*(1:nS)'/(nS+1))); > y = w.*y; > yPad = [y; zeros(nPad,1)]; > > wavplay(yPad, fs, 'sync') > pause(0.5) > wavplay(y, fs, 'sync') > %%%%%%%%%%%%%%%%%%%%% > > -- > Patrick M. Zurek > President > > Sensimetrics Corporation > 14 Summer St. > Suite 403 > Malden, MA 02148 > Tel: 781-399-0858 x237 > Fax: 781-399-0853 > email: pat@xxxxxxxx > web: www.sens.com > > > --------------030103020706040808060701 > Content-Type: text/html; charset=ISO-8859-1 > Content-Transfer-Encoding: 7bit > > <html> > <head> > > <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> > </head> > <body bgcolor="#FFFFFF" text="#000000"> > <font face="Calibri">I'm writing to notify list readers of a problem > playing audio using Matlab. <br> > <br> > The problem is that brief signals are truncated, and it happens > using any of the common commands for playing audio (wavplay, > sound, and the play method of the audioplayer object).<br> > <br> > I can't specify the exact conditions under which the truncation > occurs. However, with a sample rate of 44.1 kHz, signals shorter > than about 500 msec are truncated. I haven't looked much at other > sample rates.<br> > <br> > A simple work-around for the problem is to pad the end of the > signal with a sufficient number of zeros that truncation occurs > during the zero segment. I've found that at least 2000 zeros need > to be added to assure no truncation of a 10-msec signal (with a > sample rate of 44.1kHz).<br> > <br> > I've brought this problem to the attention of The Mathworks. They > confirmed the problem, which they attribute to a bug in their > driver. <br> > <br> > The Mathworks also informed me that the problem has been solved in > their latest release (R2011b) for playing using audioplayer, but > not necessarily for the other audio commands. I've confirmed this > in very limited tests. <br> > <br> > The following is a piece of code that you can use to observe the > truncation. It creates a 100-msec, 1-kHz sine wave, applies a > hanning window, and then plays it first with zero-padding and then > without. You should be able to hear the click at the end of the > second tone, which is not present on the first. If not, you can > see it on an oscilloscope.<br> > <br> > %%%%%%%%%%%%%%%%%%%%<br> > fs = 44100;<br> > f = 1000; <br> > T = 0.1;<br> > nPad = 2000;<br> > <br> > nS = round(fs*T);<br> > <br> > y = sin(2.*pi*f/fs*(1:nS)');<br> > w = .5*(1 - cos(2*pi*(1:nS)'/(nS+1)));<br> > y = w.*y;<br> > yPad = [y; zeros(nPad,1)];<br> > <br> > wavplay(yPad, fs, 'sync')<br> > pause(0.5)<br> > wavplay(y, fs, 'sync')<br> > %%%%%%%%%%%%%%%%%%%%%</font><br> > <pre class="moz-signature" cols="72">-- > Patrick M. Zurek > President > > Sensimetrics Corporation > 14 Summer St. > Suite 403 > Malden, MA 02148 > Tel: 781-399-0858 x237 > Fax: 781-399-0853 > email: <a class="moz-txt-link-abbreviated" href="mailto:pat@xxxxxxxx"> > pat@xxxxxxxx</a> > web: <a class="moz-txt-link-abbreviated" href="http://www.sens.com"> > www.sens.com</a></pre> > </body> > </html> > > --------------030103020706040808060701-- > > ------------------------------ > > Date: Mon, 17 Oct 2011 10:35:49 -0400 > From: Brian FG Katz <brian.katz@xxxxxxxx> > Subject: Re: Audio Glitch in Matlab > > This is a multipart message in MIME format. > > ------=_NextPart_000_0084_01CC8CB8.8AAFF440 > Content-Type: text/plain; > charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > This bug is quite present in Windows. The solution is to not use the = > default > system driver, but an ASIO supported soundcard. This is also recommended = > for > any sync play/rec situations, as the default Windows driver does not = > assure > good or repeatable synchronization.=20 > > =20 > > -Brian FG Katz > > -- > > Brian FG Katz, Ph.D > > Audio & Acoustique > > LIMSI-CNRS > > BP 133 > > F91403 Orsay > > France > > tel. (+33) 01 69 85 81 55 > > fax. (+33) 01.69.85.80.88 > > e-mail <mailto:Brian.Katz@xxxxxxxx> Brian.Katz@xxxxxxxx < > <mailto:Brian.Katz@xxxxxxxx> mailto:Brian.Katz@xxxxxxxx> > > web_theme: <http://www.limsi.fr/Scientifique/aa/thmsonesp/> > http://www.limsi.fr/Scientifique/aa/thmsonesp/ > > web_group: <http://www.limsi.fr/Scientifique/aa/> > http://www.limsi.fr/Scientifique/aa/ > > =20 > > =20 > > =20 > > De : AUDITORY - Research in Auditory Perception > [mailto:AUDITORY@xxxxxxxx De la part de Patrick Zurek > Envoy=E9 : lundi 17 octobre 2011 09:57 > =C0 : AUDITORY@xxxxxxxx > Objet : [AUDITORY] Audio Glitch in Matlab > > =20 > > I'm writing to notify list readers of a problem playing audio using = > Matlab.=20 > > The problem is that brief signals are truncated, and it happens using = > any of > the common commands for playing audio (wavplay, sound, and the play = > method > of the audioplayer object). > > I can't specify the exact conditions under which the truncation occurs. > However, with a sample rate of 44.1 kHz, signals shorter than about 500 = > msec > are truncated. I haven't looked much at other sample rates. > > A simple work-around for the problem is to pad the end of the signal = > with a > sufficient number of zeros that truncation occurs during the zero = > segment. > I've found that at least 2000 zeros need to be added to assure no = > truncation > of a 10-msec signal (with a sample rate of 44.1kHz). > > I've brought this problem to the attention of The Mathworks. They = > confirmed > the problem, which they attribute to a bug in their driver.=20 > > The Mathworks also informed me that the problem has been solved in their > latest release (R2011b) for playing using audioplayer, but not = > necessarily > for the other audio commands. I've confirmed this in very limited tests. = > > > The following is a piece of code that you can use to observe the = > truncation. > It creates a 100-msec, 1-kHz sine wave, applies a hanning window, and = > then > plays it first with zero-padding and then without. You should be able to > hear the click at the end of the second tone, which is not present on = > the > first. If not, you can see it on an oscilloscope. > > %%%%%%%%%%%%%%%%%%%% > fs =3D 44100; > f =3D 1000;=20 > T =3D 0.1; > nPad =3D 2000; > > nS =3D round(fs*T); > > y =3D sin(2.*pi*f/fs*(1:nS)'); > w =3D .5*(1 - cos(2*pi*(1:nS)'/(nS+1))); > y =3D w.*y; > yPad =3D [y; zeros(nPad,1)]; > > wavplay(yPad, fs, 'sync') > pause(0.5) > wavplay(y, fs, 'sync') > %%%%%%%%%%%%%%%%%%%%% > > > > --=20 > Patrick M. Zurek > President=20 > =20 > Sensimetrics Corporation > 14 Summer St. > Suite 403 > Malden, MA 02148 > Tel: 781-399-0858 x237 > Fax: 781-399-0853 > email: pat@xxxxxxxx > web: www.sens.com > > ------=_NextPart_000_0084_01CC8CB8.8AAFF440 > Content-Type: text/html; > charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = > charset=3Diso-8859-1"> > <html xmlns:v=3D"urn:schemas-microsoft-com:vml" = > xmlns:o=3D"urn:schemas-microsoft-com:office:office" = > xmlns:w=3D"urn:schemas-microsoft-com:office:word" = > xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" = > xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta name=3DGenerator = > content=3D"Microsoft Word 14 (filtered medium)"><style><!-- > /* Font Definitions */ > @xxxxxxxx > {font-family:Calibri; > panose-1:2 15 5 2 2 2 4 3 2 4;} > @xxxxxxxx > {font-family:Tahoma; > panose-1:2 11 6 4 3 5 4 4 2 4;} > @xxxxxxxx > {font-family:Consolas; > panose-1:2 11 6 9 2 2 4 3 2 4;} > /* Style Definitions */ > p.MsoNormal, li.MsoNormal, div.MsoNormal > {margin:0cm; > margin-bottom:.0001pt; > font-size:12.0pt; > font-family:"Times New Roman","serif"; > color:black;} > a:link, span.MsoHyperlink > {mso-style-priority:99; > color:blue; > text-decoration:underline;} > a:visited, span.MsoHyperlinkFollowed > {mso-style-priority:99; > color:purple; > text-decoration:underline;} > pre > {mso-style-priority:99; > mso-style-link:"Pr=E9format=E9 HTML Car"; > margin:0cm; > margin-bottom:.0001pt; > font-size:10.0pt; > font-family:"Courier New"; > color:black;} > span.PrformatHTMLCar > {mso-style-name:"Pr=E9format=E9 HTML Car"; > mso-style-priority:99; > mso-style-link:"Pr=E9format=E9 HTML"; > font-family:Consolas; > color:black;} > span.EmailStyle19 > {mso-style-type:personal-reply; > font-family:"Calibri","sans-serif"; > color:#1F497D;} > .MsoChpDefault > {mso-style-type:export-only; > font-size:10.0pt;} > @xxxxxxxx WordSection1 > {size:612.0pt 792.0pt; > margin:70.85pt 70.85pt 70.85pt 70.85pt;} > div.WordSection1 > {page:WordSection1;} > --></style><!--[if gte mso 9]><xml> > <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> > </xml><![endif]--><!--[if gte mso 9]><xml> > <o:shapelayout v:ext=3D"edit"> > <o:idmap v:ext=3D"edit" data=3D"1" /> > </o:shapelayout></xml><![endif]--></head><body bgcolor=3Dwhite = > lang=3DEN-US link=3Dblue vlink=3Dpurple><div class=3DWordSection1><p = > class=3DMsoNormal><span = > style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497= > D'>This bug is quite present in Windows. The solution is to not use the = > default system driver, but an ASIO supported soundcard. This is also = > recommended for any sync play/rec situations, as the default Windows = > driver does not assure good or repeatable synchronization. = > <o:p></o:p></span></p><p class=3DMsoNormal><span = > style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497= > D'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span = > style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497= > D'>-Brian FG Katz<o:p></o:p></span></p><div><p class=3DMsoNormal><span = > lang=3DFR = > style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'= > >--<o:p></o:p></span></p><p class=3DMsoNormal><span lang=3DFR = > style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'= > >Brian FG Katz, Ph.D<o:p></o:p></span></p><p class=3DMsoNormal><span = > lang=3DFR = > style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'= > >Audio &amp; Acoustique<o:p></o:p></span></p><p class=3DMsoNormal><span = > style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'= > >LIMSI-CNRS<o:p></o:p></span></p><p class=3DMsoNormal><span = > style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'= > >BP 133<o:p></o:p></span></p><p class=3DMsoNormal><span = > style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'= > >F91403 Orsay<o:p></o:p></span></p><p class=3DMsoNormal><span = > style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'= > >France<o:p></o:p></span></p><p class=3DMsoNormal><span = > style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'= > >tel. (+33) 01 69 85 81 55<o:p></o:p></span></p><p = > class=3DMsoNormal><span = > style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'= > >fax. (+33) 01.69.85.80.88<o:p></o:p></span></p><p = > class=3DMsoNormal><span = > style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'= > >e-mail </span><span lang=3DFR = > style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'= > ><a href=3D"mailto:Brian.Katz@xxxxxxxx"><span lang=3DEN-US = > style=3D'color:blue'>Brian.Katz@xxxxxxxx</span></a></span><span = > style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'= > > &lt;</span><span lang=3DFR = > style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'= > ><a href=3D"mailto:Brian.Katz@xxxxxxxx"><span lang=3DEN-US = > style=3D'color:blue'>mailto:Brian.Katz@xxxxxxxx</span></a></span><span = > style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'= > >&gt;<o:p></o:p></span></p><p class=3DMsoNormal><span = > style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'= > >web_theme: </span><span lang=3DFR = > style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'= > ><a href=3D"http://www.limsi.fr/Scientifique/aa/thmsonesp/"><span = > lang=3DEN-US = > style=3D'color:blue'>http://www.limsi.fr/Scientifique/aa/thmsonesp/</span= > ></a></span><span = > style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'= > ><o:p></o:p></span></p><p class=3DMsoNormal><span = > style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'= > >web_group: </span><span lang=3DFR = > style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'= > ><a href=3D"http://www.limsi.fr/Scientifique/aa/"><span lang=3DEN-US = > style=3D'color:blue'>http://www.limsi.fr/Scientifique/aa/</span></a></spa= > n><span = > style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'= > ><o:p></o:p></span></p><p class=3DMsoNormal><span = > style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'= > ><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span = > style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'= > ><o:p>&nbsp;</o:p></span></p></div><p class=3DMsoNormal><span = > style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497= > D'><o:p>&nbsp;</o:p></span></p><div><div = > style=3D'border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm = > 0cm 0cm'><p class=3DMsoNormal><b><span lang=3DFR = > style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowt= > ext'>De&nbsp;:</span></b><span lang=3DFR = > style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowt= > ext'> AUDITORY - Research in Auditory Perception = > [mailto:AUDITORY@xxxxxxxx <b>De la part de</b> Patrick = > Zurek<br><b>Envoy=E9&nbsp;:</b> lundi 17 octobre 2011 = > 09:57<br><b>=C0&nbsp;:</b> = > AUDITORY@xxxxxxxx<br><b>Objet&nbsp;:</b> [AUDITORY] Audio Glitch = > in Matlab<o:p></o:p></span></p></div></div><p = > class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal><span = > style=3D'font-family:"Calibri","sans-serif"'>I'm writing to notify list = > readers of a problem playing audio using Matlab. <br><br>The problem is = > that brief signals are truncated, and it happens using any of the common = > commands for playing audio (wavplay, sound, and the play method of the = > audioplayer object).<br><br>I can't specify the exact conditions under = > which the truncation occurs. However, with a sample rate of 44.1 kHz, = > signals shorter than about 500 msec are truncated. I haven't looked much = > at other sample rates.<br><br>A simple work-around for the problem is to = > pad the end of the signal with a sufficient number of zeros that = > truncation occurs during the zero segment. I've found that at least 2000 = > zeros need to be added to assure no truncation of a 10-msec signal (with = > a sample rate of 44.1kHz).<br><br>I've brought this problem to the = > attention of The Mathworks. They confirmed the problem, which they = > attribute to a bug in their driver. <br><br>The Mathworks also informed = > me that the problem has been solved in their latest release (R2011b) for = > playing using audioplayer, but not necessarily for the other audio = > commands. I've confirmed this in very limited tests. <br><br>The = > following is a piece of code that you can use to observe the truncation. = > It creates a 100-msec, 1-kHz sine wave, applies a hanning window, and = > then plays it first with zero-padding and then without. You should be = > able to hear the click at the end of the second tone, which is not = > present on the first. If not, you can see it on an = > oscilloscope.<br><br>%%%%%%%%%%%%%%%%%%%%<br>fs =3D 44100;<br>f =3D = > 1000; <br>T =3D 0.1;<br>nPad =3D 2000;<br><br>nS =3D = > round(fs*T);<br><br>y =3D sin(2.*pi*f/fs*(1:nS)');<br>w =3D .5*(1 - = > cos(2*pi*(1:nS)'/(nS+1)));<br>y =3D w.*y;<br>yPad =3D [y; = > zeros(nPad,1)];<br><br>wavplay(yPad, fs, = > 'sync')<br>pause(0.5)<br>wavplay(y, fs, = > 'sync')<br>%%%%%%%%%%%%%%%%%%%%%</span><br><br><o:p></o:p></p><pre>-- = > <o:p></o:p></pre><pre>Patrick M. Zurek<o:p></o:p></pre><pre>President = > <o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>Sensimetrics = > Corporation<o:p></o:p></pre><pre>14 Summer = > St.<o:p></o:p></pre><pre>Suite 403<o:p></o:p></pre><pre>Malden, MA = > 02148<o:p></o:p></pre><pre>Tel: 781-399-0858 = > x237<o:p></o:p></pre><pre>Fax: 781-399-0853<o:p></o:p></pre><pre>email: = > <a = > href=3D"mailto:pat@xxxxxxxx">pat@xxxxxxxx</a><o:p></o:p></pre><pre>web: = > <a = > href=3D"http://www.sens.com">www.sens.com</a><o:p></o:p></pre></div></bod= > y></html> > ------=_NextPart_000_0084_01CC8CB8.8AAFF440-- > > ------------------------------ > > Date: Mon, 17 Oct 2011 11:28:33 -0400 > From: Joachim Thiemann <joachim.thiemann@xxxxxxxx> > Subject: Re: Audio Glitch in Matlab > > On Mon, Oct 17, 2011 at 09:57, Patrick Zurek <pat@xxxxxxxx> wrote: > > I'm writing to notify list readers of a problem playing audio using > Matlab. > > I don't know if the bug you're referring to is Windows-specific; but > the "sound" command on Linux used to have ... issues. (possibly > related to the JVM and the OSS/ALSA/whatever is used now transition) > > I wrote a small almost trivial workaround (see > > http://signalsprocessed.blogspot.com/2011/02/playing-sounds-from-matlab-on-unix.html > ) > that would simply write the sound to disk then play it from there: > > function [ ] = usound( w, fs ) > %USOUND Plays sound on ALSA-based linux machines or macs > > if nargin < 2 > fs = 16000; > end > > filename = ['/tmp/' getenv('USER') '_matplay.wav']; > wavwrite( w, fs, filename ); > if ismac > eval(['!afplay ' filename ' &']); > else > eval(['!aplay ' filename ' &']); > end > > On a modern machine, the overhead is not perceptible: /tmp should be > in RAM anyways. > > Note this also doesn't block, so you can continue working while the > sound is playing (IIRC - this code is a bit old :-) > > Joe. > > -- > Joachim Thiemann :: http://www.tsp.ece.mcgill.ca/~jthiem1 > > ------------------------------ > > Date: Mon, 17 Oct 2011 17:52:09 +0200 > From: "Jelfs, Sam" <sam.jelfs@xxxxxxxx> > Subject: Re: Audio Glitch in Matlab > > --_000_E4FB19A270B2AE4E99E35D8BF51CEA3FC8FD0DCEFCNLCLUEXM03con_ > Content-Type: text/plain; charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > It is also possible to use PortAudio / pa_wavplay to make use of the > ASIO4A= > LL drivers with existing non-asio hardware. > > http://www.portaudio.com/ > http://www.mathworks.com/matlabcentral/fileexchange/4017 > http://www.asio4all.com/ > > > Sam Jelfs > > From: AUDITORY - Research in Auditory Perception [mailto: > AUDITORY@xxxxxxxx= > ILL.CA] On Behalf Of Brian FG Katz > Sent: Monday 17 October 2011 16:36 > To: AUDITORY@xxxxxxxx > Subject: Re: [AUDITORY] Audio Glitch in Matlab > > This bug is quite present in Windows. The solution is to not use the > defaul= > t system driver, but an ASIO supported soundcard. This is also recommended > = > for any sync play/rec situations, as the default Windows driver does not > as= > sure good or repeatable synchronization. > > -Brian FG Katz > -- > Brian FG Katz, Ph.D > Audio & Acoustique > LIMSI-CNRS > BP 133 > F91403 Orsay > France > tel. (+33) 01 69 85 81 55 > fax. (+33) 01.69.85.80.88 > e-mail Brian.Katz@xxxxxxxx<mailto:Brian.Katz@xxxxxxxx> <mailto: > Brian.Katz@xxxxxxxx= > imsi.fr> > web_theme: http://www.limsi.fr/Scientifique/aa/thmsonesp/ > web_group: http://www.limsi.fr/Scientifique/aa/ > > > > De : AUDITORY - Research in Auditory Perception [mailto: > AUDITORY@xxxxxxxx= > LL.CA] De la part de Patrick Zurek > Envoy=E9 : lundi 17 octobre 2011 09:57 > =C0 : AUDITORY@xxxxxxxx > Objet : [AUDITORY] Audio Glitch in Matlab > > I'm writing to notify list readers of a problem playing audio using Matlab. > > The problem is that brief signals are truncated, and it happens using any > o= > f the common commands for playing audio (wavplay, sound, and the play > metho= > d of the audioplayer object). > > I can't specify the exact conditions under which the truncation occurs. > How= > ever, with a sample rate of 44.1 kHz, signals shorter than about 500 msec > a= > re truncated. I haven't looked much at other sample rates. > > A simple work-around for the problem is to pad the end of the signal with > a= > sufficient number of zeros that truncation occurs during the zero > segment.= > I've found that at least 2000 zeros need to be added to assure no > truncati= > on of a 10-msec signal (with a sample rate of 44.1kHz). > > I've brought this problem to the attention of The Mathworks. They > confirmed= > the problem, which they attribute to a bug in their driver. > > The Mathworks also informed me that the problem has been solved in their > la= > test release (R2011b) for playing using audioplayer, but not necessarily > fo= > r the other audio commands. I've confirmed this in very limited tests. > > The following is a piece of code that you can use to observe the > truncation= > . It creates a 100-msec, 1-kHz sine wave, applies a hanning window, and > the= > n plays it first with zero-padding and then without. You should be able to > = > hear the click at the end of the second tone, which is not present on the > f= > irst. If not, you can see it on an oscilloscope. > > %%%%%%%%%%%%%%%%%%%% > fs =3D 44100; > f =3D 1000; > T =3D 0.1; > nPad =3D 2000; > > nS =3D round(fs*T); > > y =3D sin(2.*pi*f/fs*(1:nS)'); > w =3D .5*(1 - cos(2*pi*(1:nS)'/(nS+1))); > y =3D w.*y; > yPad =3D [y; zeros(nPad,1)]; > > wavplay(yPad, fs, 'sync') > pause(0.5) > wavplay(y, fs, 'sync') > %%%%%%%%%%%%%%%%%%%%% > > -- > > Patrick M. Zurek > > President > > > > Sensimetrics Corporation > > 14 Summer St. > > Suite 403 > > Malden, MA 02148 > > Tel: 781-399-0858 x237 > > Fax: 781-399-0853 > > email: pat@xxxxxxxx<mailto:pat@xxxxxxxx> > > web: www.sens.com<http://www.sens.com> > > ________________________________ > The information contained in this message may be confidential and legally > p= > rotected under applicable law. The message is intended solely for the > addre= > ssee(s). If you are not the intended recipient, you are hereby notified > tha= > t any use, forwarding, dissemination, or reproduction of this message is > st= > rictly prohibited and may be unlawful. If you are not the intended > recipien= > t, please contact the sender by return e-mail and destroy all copies of > the= > original message. > > --_000_E4FB19A270B2AE4E99E35D8BF51CEA3FC8FD0DCEFCNLCLUEXM03con_ > Content-Type: text/html; charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > <html> > <head> > <meta http-equiv=3D"Content-Type" content=3D"text/html; > charset=3Diso-8859-= > 1"> > <meta name=3D"Generator" content=3D"Microsoft Word 12 (filtered medium)"> > <style><!-- > /* Font Definitions */ > @xxxxxxxx > {font-family:Wingdings; > panose-1:5 0 0 0 0 0 0 0 0 0;} > @xxxxxxxx > {font-family:Wingdings; > panose-1:5 0 0 0 0 0 0 0 0 0;} > @xxxxxxxx > {font-family:Calibri; > panose-1:2 15 5 2 2 2 4 3 2 4;} > @xxxxxxxx > {font-family:Tahoma; > panose-1:2 11 6 4 3 5 4 4 2 4;} > @xxxxxxxx > {font-family:Consolas; > panose-1:2 11 6 9 2 2 4 3 2 4;} > /* Style Definitions */ > p.MsoNormal, li.MsoNormal, div.MsoNormal > {margin:0cm; > margin-bottom:.0001pt; > font-size:12.0pt; > font-family:"Times New Roman","serif"; > color:black;} > a:link, span.MsoHyperlink > {mso-style-priority:99; > color:blue; > text-decoration:underline;} > a:visited, span.MsoHyperlinkFollowed > {mso-style-priority:99; > color:purple; > text-decoration:underline;} > pre > {mso-style-priority:99; > mso-style-link:"HTML Preformatted Char"; > margin:0cm; > margin-bottom:.0001pt; > font-size:10.0pt; > font-family:"Courier New"; > color:black;} > p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph > {mso-style-priority:34; > margin-top:0cm; > margin-right:0cm; > margin-bottom:0cm; > margin-left:36.0pt; > margin-bottom:.0001pt; > font-size:12.0pt; > font-family:"Times New Roman","serif"; > color:black;} > span.HTMLPreformattedChar > {mso-style-name:"HTML Preformatted Char"; > mso-style-priority:99; > mso-style-link:"HTML Preformatted"; > font-family:Consolas; > color:black;} > p.PrformatHTML, li.PrformatHTML, div.PrformatHTML > {mso-style-name:"Pr=E9format=E9 HTML"; > mso-style-link:"Pr=E9format=E9 HTML Car"; > margin:0cm; > margin-bottom:.0001pt; > font-size:12.0pt; > font-family:"Times New Roman","serif"; > color:black;} > span.PrformatHTMLCar > {mso-style-name:"Pr=E9format=E9 HTML Car"; > mso-style-priority:99; > mso-style-link:"Pr=E9format=E9 HTML"; > font-family:Consolas; > color:black;} > span.EmailStyle21 > {mso-style-type:personal; > font-family:"Calibri","sans-serif"; > color:#1F497D;} > span.EmailStyle22 > {mso-style-type:personal-reply; > font-family:"Calibri","sans-serif"; > color:#1F497D;} > .MsoChpDefault > {mso-style-type:export-only; > font-size:10.0pt;} > @xxxxxxxx WordSection1 > {size:612.0pt 792.0pt; > margin:70.85pt 70.85pt 70.85pt 70.85pt;} > div.WordSection1 > {page:WordSection1;} > /* List Definitions */ > @xxxxxxxx l0 > {mso-list-id:926965819; > mso-list-type:hybrid; > mso-list-template-ids:344066808 1943972264 67698691 67698693 > 67698689 6769= > 8691 67698693 67698689 67698691 67698693;} > @xxxxxxxx l0:level1 > {mso-level-start-at:0; > mso-level-number-format:bullet; > mso-level-text:-; > mso-level-tab-stop:none; > mso-level-number-position:left; > text-indent:-18.0pt; > font-family:"Calibri","sans-serif"; > mso-fareast-font-family:Calibri; > mso-bidi-font-family:"Times New Roman";} > ol > {margin-bottom:0cm;} > ul > {margin-bottom:0cm;} > --></style><!--[if gte mso 9]><xml> > <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> > </xml><![endif]--><!--[if gte mso 9]><xml> > <o:shapelayout v:ext=3D"edit"> > <o:idmap v:ext=3D"edit" data=3D"1" /> > </o:shapelayout></xml><![endif]--> > </head> > <body bgcolor=3D"white" lang=3D"EN-US" link=3D"blue" vlink=3D"purple"> > <div class=3D"WordSection1"> > <p class=3D"MsoNormal"><span > style=3D"font-size:11.0pt;font-family:&quot;Ca= > libri&quot;,&quot;sans-serif&quot;;color:#1F497D">It is also possible to > us= > e PortAudio / pa_wavplay to make use of the ASIO4ALL drivers with existing > = > non-asio hardware.<o:p></o:p></span></p> > <p class=3D"MsoNormal"><span > style=3D"font-size:11.0pt;font-family:&quot;Ca= > > libri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span><= > /p> > <p class=3D"MsoNormal"><a href=3D"http://www.portaudio.com/"> > http://www.por= > taudio.com/</a><span > style=3D"font-size:11.0pt;font-family:&quot;Calibri&qu= > ot;,&quot;sans-serif&quot;;color:#1F497D"><o:p></o:p></span></p> > <p class=3D"MsoNormal"><a href=3D" > http://www.mathworks.com/matlabcentral/fi= > leexchange/4017">http://www.mathworks.com/matlabcentral/fileexchange/4017 > </= > a><span > style=3D"font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;san= > s-serif&quot;;color:#1F497D"><o:p></o:p></span></p> > <p class=3D"MsoNormal"><a href=3D"http://www.asio4all.com/"> > http://www.asio= > 4all.com/</a><span > style=3D"font-size:11.0pt;font-family:&quot;Calibri&quot= > ;,&quot;sans-serif&quot;;color:#1F497D"><o:p></o:p></span></p> > <p class=3D"MsoNormal"><span > style=3D"font-size:11.0pt;font-family:&quot;Ca= > > libri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span><= > /p> > <p class=3D"MsoNormal"><span > style=3D"font-size:11.0pt;font-family:&quot;Ca= > > libri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span><= > /p> > <p class=3D"MsoNormal"><span > style=3D"font-size:11.0pt;font-family:&quot;Ca= > libri&quot;,&quot;sans-serif&quot;;color:#1F497D">Sam > Jelfs<o:p></o:p></spa= > n></p> > <p class=3D"MsoNormal"><span > style=3D"font-size:11.0pt;font-family:&quot;Ca= > > libri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span><= > /p> > <div> > <div style=3D"border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm > = > 0cm 0cm"> > <p class=3D"MsoNormal"><b><span > style=3D"font-size:10.0pt;font-family:&quot= > > ;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext">From:</span></b><spa= > n > style=3D"font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif= > &quot;;color:windowtext"> AUDITORY - Research in Auditory Perception > [mailt= > o:AUDITORY@xxxxxxxx > <b>On Behalf Of </b>Brian FG Katz<br> > <b>Sent:</b> Monday 17 October 2011 16:36<br> > <b>To:</b> AUDITORY@xxxxxxxx<br> > <b>Subject:</b> Re: [AUDITORY] Audio Glitch in Matlab<o:p></o:p></span></p> > </div> > </div> > <p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p> > <p class=3D"MsoNormal"><span > style=3D"font-size:11.0pt;font-family:&quot;Ca= > libri&quot;,&quot;sans-serif&quot;;color:#1F497D">This bug is quite > present= > in Windows. The solution is to not use the default system driver, but an > A= > SIO supported soundcard. This is also recommended for any > sync play/rec situations, as the default Windows driver does not assure > go= > od or repeatable synchronization. > <o:p></o:p></span></p> > <p class=3D"MsoNormal"><span > style=3D"font-size:11.0pt;font-family:&quot;Ca= > > libri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span><= > /p> > <p class=3D"MsoNormal"><span > style=3D"font-size:11.0pt;font-family:&quot;Ca= > libri&quot;,&quot;sans-serif&quot;;color:#1F497D">-Brian FG > Katz<o:p></o:p>= > </span></p> > <div> > <p class=3D"MsoNormal"><span lang=3D"FR" > style=3D"font-size:10.0pt;font-fam= > > ily:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">--<o:p></o:p></= > span></p> > <p class=3D"MsoNormal"><span lang=3D"FR" > style=3D"font-size:10.0pt;font-fam= > ily:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">Brian FG Katz, > = > Ph.D<o:p></o:p></span></p> > <p class=3D"MsoNormal"><span lang=3D"FR" > style=3D"font-size:10.0pt;font-fam= > ily:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">Audio &amp; > Aco= > ustique<o:p></o:p></span></p> > <p class=3D"MsoNormal"><span > style=3D"font-size:10.0pt;font-family:&quot;Ar= > > ial&quot;,&quot;sans-serif&quot;;color:#1F497D">LIMSI-CNRS<o:p></o:p></span= > ></p> > <p class=3D"MsoNormal"><span > style=3D"font-size:10.0pt;font-family:&quot;Ar= > ial&quot;,&quot;sans-serif&quot;;color:#1F497D">BP > 133<o:p></o:p></span></p= > > > <p class=3D"MsoNormal"><span > style=3D"font-size:10.0pt;font-family:&quot;Ar= > ial&quot;,&quot;sans-serif&quot;;color:#1F497D">F91403 > Orsay<o:p></o:p></sp= > an></p> > <p class=3D"MsoNormal"><span > style=3D"font-size:10.0pt;font-family:&quot;Ar= > > ial&quot;,&quot;sans-serif&quot;;color:#1F497D">France<o:p></o:p></span></p= > > > <p class=3D"MsoNormal"><span > style=3D"font-size:10.0pt;font-family:&quot;Ar= > ial&quot;,&quot;sans-serif&quot;;color:#1F497D">tel. (&#43;33) 01 69 85 81 > = > 55<o:p></o:p></span></p> > <p class=3D"MsoNormal"><span > style=3D"font-size:10.0pt;font-family:&quot;Ar= > ial&quot;,&quot;sans-serif&quot;;color:#1F497D">fax. (&#43;33) > 01.69.85.80.= > 88<o:p></o:p></span></p> > <p class=3D"MsoNormal"><span > style=3D"font-size:10.0pt;font-family:&quot;Ar= > ial&quot;,&quot;sans-serif&quot;;color:#1F497D">e-mail > </span><span lang=3D"FR" > style=3D"font-size:10.0pt;font-family:&quot;Arial&= > quot;,&quot;sans-serif&quot;;color:#1F497D"><a href=3D"mailto: > Brian.Katz@xxxxxxxx= > msi.fr"><span lang=3D"EN-US">Brian.Katz@xxxxxxxx</span></a></span><span > sty= > > le=3D"font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;= > ;color:#1F497D"> > &lt;</span><span lang=3D"FR" > style=3D"font-size:10.0pt;font-family:&quot;A= > rial&quot;,&quot;sans-serif&quot;;color:#1F497D"><a href=3D"mailto: > Brian.Ka= > tz@xxxxxxxx"><span lang=3D"EN-US">mailto:Brian.Katz@xxxxxxxx > </span></a></sp= > an><span > style=3D"font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans= > -serif&quot;;color:#1F497D">&gt;<o:p></o:p></span></p> > <p class=3D"MsoNormal"><span > style=3D"font-size:10.0pt;font-family:&quot;Ar= > ial&quot;,&quot;sans-serif&quot;;color:#1F497D">web_theme: > </span><span lang=3D"FR" > style=3D"font-size:10.0pt;font-family:&quot;Arial&= > quot;,&quot;sans-serif&quot;;color:#1F497D"><a href=3D" > http://www.limsi.fr/= > Scientifique/aa/thmsonesp/"><span lang=3D"EN-US"> > http://www.limsi.fr/Scient= > ifique/aa/thmsonesp/</span></a></span><span > style=3D"font-size:10.0pt;font-= > > family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p></o:p><= > /span></p> > <p class=3D"MsoNormal"><span > style=3D"font-size:10.0pt;font-family:&quot;Ar= > ial&quot;,&quot;sans-serif&quot;;color:#1F497D">web_group: > </span><span lang=3D"FR" > style=3D"font-size:10.0pt;font-family:&quot;Arial&= > quot;,&quot;sans-serif&quot;;color:#1F497D"><a href=3D" > http://www.limsi.fr/= > Scientifique/aa/"><span lang=3D"EN-US"> > http://www.limsi.fr/Scientifique/aa/= > </span></a></span><span > style=3D"font-size:10.0pt;font-family:&quot;Arial&q= > uot;,&quot;sans-serif&quot;;color:#1F497D"><o:p></o:p></span></p> > <p class=3D"MsoNormal"><span > style=3D"font-size:10.0pt;font-family:&quot;Ar= > > ial&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p= > > > <p class=3D"MsoNormal"><span > style=3D"font-size:10.0pt;font-family:&quot;Ar= > > ial&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p= > > > </div> > <p class=3D"MsoNormal"><span > style=3D"font-size:11.0pt;font-family:&quot;Ca= > > libri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span><= > /p> > <div> > <div style=3D"border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm > = > 0cm 0cm"> > <p class=3D"MsoNormal"><b><span lang=3D"FR" > style=3D"font-size:10.0pt;font-= > > family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext">De&nbsp;= > :</span></b><span lang=3D"FR" > style=3D"font-size:10.0pt;font-family:&quot;T= > ahoma&quot;,&quot;sans-serif&quot;;color:windowtext"> AUDITORY - Research > i= > n Auditory Perception > [mailto:AUDITORY@xxxxxxxx <b>De la part de</b> Patrick Zurek<br> > <b>Envoy=E9&nbsp;:</b> lundi 17 octobre 2011 09:57<br> > <b>=C0&nbsp;:</b> AUDITORY@xxxxxxxx<br> > <b>Objet&nbsp;:</b> [AUDITORY] Audio Glitch in Matlab<o:p></o:p></span></p> > </div> > </div> > <p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p> > <p class=3D"MsoNormal" style=3D"margin-bottom:12.0pt"><span > style=3D"font-f= > amily:&quot;Calibri&quot;,&quot;sans-serif&quot;">I'm writing to notify > lis= > t readers of a problem playing audio using Matlab. > <br> > <br> > The problem is that brief signals are truncated, and it happens using any > o= > f the common commands for playing audio (wavplay, sound, and the play > metho= > d of the audioplayer object).<br> > <br> > I can't specify the exact conditions under which the truncation occurs. > How= > ever, with a sample rate of 44.1 kHz, signals shorter than about 500 msec > a= > re truncated. I haven't looked much at other sample rates.<br> > <br> > A simple work-around for the problem is to pad the end of the signal with > a= > sufficient number of zeros that truncation occurs during the zero > segment.= > I've found that at least 2000 zeros need to be added to assure no > truncati= > on of a 10-msec signal (with a sample > rate of 44.1kHz).<br> > <br> > I've brought this problem to the attention of The Mathworks. They > confirmed= > the problem, which they attribute to a bug in their driver. > <br> > <br> > The Mathworks also informed me that the problem has been solved in their > la= > test release (R2011b) for playing using audioplayer, but not necessarily > fo= > r the other audio commands. I've confirmed this in very limited tests. > <br> > <br> > The following is a piece of code that you can use to observe the > truncation= > . It creates a 100-msec, 1-kHz sine wave, applies a hanning window, and > the= > n plays it first with zero-padding and then without. You should be able to > = > hear the click at the end of the > second tone, which is not present on the first. If not, you can see it on > = > an oscilloscope.<br> > <br> > %%%%%%%%%%%%%%%%%%%%<br> > fs =3D 44100;<br> > f =3D 1000; <br> > T =3D 0.1;<br> > nPad =3D 2000;<br> > <br> > nS =3D round(fs*T);<br> > <br> > y =3D sin(2.*pi*f/fs*(1:nS)');<br> > w =3D .5*(1 - cos(2*pi*(1:nS)'/(nS&#43;1)));<br> > y =3D w.*y;<br> > yPad =3D [y; zeros(nPad,1)];<br> > <br> > wavplay(yPad, fs, 'sync')<br> > pause(0.5)<br> > wavplay(y, fs, 'sync')<br> > %%%%%%%%%%%%%%%%%%%%%</span><o:p></o:p></p> > <pre>-- <o:p></o:p></pre> > <pre>Patrick M. Zurek<o:p></o:p></pre> > <pre>President <o:p></o:p></pre> > <pre><o:p>&nbsp;</o:p></pre> > <pre>Sensimetrics Corporation<o:p></o:p></pre> > <pre>14 Summer St.<o:p></o:p></pre> > <pre>Suite 403<o:p></o:p></pre> > <pre>Malden, MA 02148<o:p></o:p></pre> > <pre>Tel: 781-399-0858 x237<o:p></o:p></pre> > <pre>Fax: 781-399-0853<o:p></o:p></pre> > <pre>email: <a href=3D"mailto:pat@xxxxxxxx">pat@xxxxxxxx > </a><o:p></o:p></pr= > e> > <pre>web: <a href=3D"http://www.sens.com">www.sens.com > </a><o:p></o:p></pre> > </div> > <br> > <hr> > <font face=3D"Arial" color=3D"Gray" size=3D"1">The information contained > in= > this message may be confidential and legally protected under applicable > la= > w. The message is intended solely for the addressee(s). If you are not the > = > intended recipient, you are hereby notified > that any use, forwarding, dissemination, or reproduction of this message > i= > s strictly prohibited and may be unlawful. If you are not the intended > reci= > pient, please contact the sender by return e-mail and destroy all copies > of= > the original message.<br> > </font> > </body> > </html> > > --_000_E4FB19A270B2AE4E99E35D8BF51CEA3FC8FD0DCEFCNLCLUEXM03con_-- > > ------------------------------ > > Date: Mon, 17 Oct 2011 17:21:23 +0100 > From: Etienne Gaudrain <egaudrain.cam@xxxxxxxx> > Subject: Re: Audio Glitch in Matlab > > --0015175d03cc7857e604af80ffa9 > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > > Hi, > > We also had some clicking and truncating issues when using directly the > default (WDM) Windows audio drivers. > Like Brian we solved the problem by using ASIO drivers. You can tap > directl= > y > into the ASIO drivers from Matlab using the Playrec ( > http://www.playrec.co.uk/) toolbox, based on Portaudio (the audio library > behind Audacity). > > And most to our astonishment we discovered that we only needed to > initializ= > e > the card using Playrec, and then everything was fine even when using the > standard Matlab functions (sound, audioplay...). > > So basically, we do: > playrec('init', 44100, 1, -1); > > Then we can call sound(x, fs)... etc... with no clicking and no > truncating... > > Maybe the ASIO driver sets the card in a state that is more sensible than > the default state set by the WDM, like putting sensible buffer lengths... > something like that. > > The trick works on Windows XP with even older versions of Matlab, and with > E-MU and Asus sound cards. > Haven't tried on Windows 7, and this is probably different as the sound > system is different. > > -Etienne > > --=20 > Etienne Gaudrain, PhD > MRC Cognition and Brain Sciences Unit > 15 Chaucer Road > Cambridge, CB2 7EF > United-Kingdom > +44 1223 355 294, ext. 645 > > > On 17 October 2011 15:35, Brian FG Katz <brian.katz@xxxxxxxx> wrote: > > > This bug is quite present in Windows. The solution is to not use the > > default system driver, but an ASIO supported soundcard. This is also > > recommended for any sync play/rec situations, as the default Windows > driv= > er > > does not assure good or repeatable synchronization. **** > > > > ** ** > > > > -Brian FG Katz**** > > > > --**** > > > > Brian FG Katz, Ph.D**** > > > > Audio & Acoustique**** > > > > LIMSI-CNRS**** > > > > BP 133**** > > > > F91403 Orsay**** > > > > France**** > > > > tel. (+33) 01 69 85 81 55**** > > > > fax. (+33) 01.69.85.80.88**** > > > > e-mail Brian.Katz@xxxxxxxx <mailto:Brian.Katz@xxxxxxxx > <Brian.Katz@xxxxxxxx= > r> > > >**** > > > > web_theme: http://www.limsi.fr/Scientifique/aa/thmsonesp/**** > > > > web_group: http://www.limsi.fr/Scientifique/aa/**** > > > > ** ** > > > > ** ** > > > > ** ** > > > > *De :* AUDITORY - Research in Auditory Perception [mailto: > > AUDITORY@xxxxxxxx *De la part de* Patrick Zurek > > *Envoy=C3=A9 :* lundi 17 octobre 2011 09:57 > > *=C3=80 :* AUDITORY@xxxxxxxx > > *Objet :* [AUDITORY] Audio Glitch in Matlab**** > > > > ** ** > > > > I'm writing to notify list readers of a problem playing audio using > Matla= > b. > > > > > > The problem is that brief signals are truncated, and it happens using any > > of the common commands for playing audio (wavplay, sound, and the play > > method of the audioplayer object). > > > > I can't specify the exact conditions under which the truncation occurs. > > However, with a sample rate of 44.1 kHz, signals shorter than about 500 > m= > sec > > are truncated. I haven't looked much at other sample rates. > > > > A simple work-around for the problem is to pad the end of the signal > with= > a > > sufficient number of zeros that truncation occurs during the zero > segment= > . > > I've found that at least 2000 zeros need to be added to assure no > truncat= > ion > > of a 10-msec signal (with a sample rate of 44.1kHz). > > > > I've brought this problem to the attention of The Mathworks. They > confirm= > ed > > the problem, which they attribute to a bug in their driver. > > > > The Mathworks also informed me that the problem has been solved in their > > latest release (R2011b) for playing using audioplayer, but not > necessaril= > y > > for the other audio commands. I've confirmed this in very limited tests. > > > > The following is a piece of code that you can use to observe the > > truncation. It creates a 100-msec, 1-kHz sine wave, applies a hanning > > window, and then plays it first with zero-padding and then without. You > > should be able to hear the click at the end of the second tone, which is > = > not > > present on the first. If not, you can see it on an oscilloscope. > > > > %%%%%%%%%%%%%%%%%%%% > > fs =3D 44100; > > f =3D 1000; > > T =3D 0.1; > > nPad =3D 2000; > > > > nS =3D round(fs*T); > > > > y =3D sin(2.*pi*f/fs*(1:nS)'); > > w =3D .5*(1 - cos(2*pi*(1:nS)'/(nS+1))); > > y =3D w.*y; > > yPad =3D [y; zeros(nPad,1)]; > > > > wavplay(yPad, fs, 'sync') > > pause(0.5) > > wavplay(y, fs, 'sync') > > %%%%%%%%%%%%%%%%%%%%% > > > > **** > > > > -- **** > > > > Patrick M. Zurek**** > > > > President **** > > > > ** ** > > > > Sensimetrics Corporation**** > > > > 14 Summer St.**** > > > > Suite 403**** > > > > Malden, MA 02148**** > > > > Tel: 781-399-0858 x237**** > > > > Fax: 781-399-0853**** > > > > email: pat@xxxxxxxx**** > > > > web: www.sens.com**** > > > > > > --0015175d03cc7857e604af80ffa9 > Content-Type: text/html; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > > <span class=3D"Apple-style-span" style=3D"color: rgb(80, 0, 80); > font-famil= > y: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, > 255)= > ; ">Hi,=C2=A0<br><br>We also had some clicking and truncating issues when > u= > sing directly the default (WDM) Windows audio drivers.=C2=A0<br> > Like Brian we solved the problem by using ASIO drivers. You can tap > directl= > y into the ASIO drivers from Matlab using the Playrec (<a href=3D" > http://ww= > w.playrec.co.uk/" target=3D"_blank" style=3D"color: rgb(0, 0, 204); > ">http:= > //www.playrec.co.uk/</a>) toolbox, based on Portaudio (the audio library > be= > hind Audacity).=C2=A0<br> > <div class=3D"im" style=3D"color: rgb(80, 0, 80); "><br>And most to our > ast= > onishment we discovered that we only needed to initialize the card using > Pl= > ayrec, and then everything was fine even when using the standard Matlab > fun= > ctions (sound, audioplay...).=C2=A0<br> > <br>So basically, we do:=C2=A0<br>playrec(&#39;init&#39;, 44100, 1, > -1);=C2= > =A0<br><br>Then we can call sound(x, fs)... etc... with no clicking and no > = > truncating...=C2=A0<br><br>Maybe the ASIO driver sets the card in a state > t= > hat is more sensible than the default state set by the WDM, like putting > se= > nsible buffer lengths... something like that.=C2=A0<br> > <br>The trick works on Windows XP with even older versions of Matlab, and > w= > ith E-MU and Asus sound cards.=C2=A0<br>Haven&#39;t tried on Windows 7, > and= > this is probably different as the sound system is > different.=C2=A0<br><br>= > -Etienne=C2=A0<br> > <br><div><span>--=C2=A0<br></span>Etienne Gaudrain, PhD<br>MRC Cognition > an= > d Brain Sciences Unit<br>15 Chaucer Road<br>Cambridge, CB2 > 7EF<br>United-Ki= > ngdom<br><a href=3D"tel:%2B44%201223%20355%20294%2C%20ext.%20645" > value=3D"= > +441223355294" target=3D"_blank" style=3D"color: rgb(0, 0, 204); ">+44 > 1223= > 355 294, ext. 645</a>=C2=A0<br> > </div><div><br></div></div></span><br><div class=3D"gmail_quote">On 17 > Octo= > ber 2011 15:35, Brian FG Katz <span dir=3D"ltr">&lt;<a href=3D"mailto: > brian= > .katz@xxxxxxxx">brian.katz@xxxxxxxx</a>&gt;</span> wrote:<br><blockquote > cl= > ass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc > solid;p= > adding-left:1ex;"> > > <div bgcolor=3D"white" lang=3D"EN-US" link=3D"blue" > vlink=3D"purple"><div><= > p class=3D"MsoNormal"><span style=3D"font-size:11.0pt;color:#1F497D">This > b= > ug is quite present in Windows. The solution is to not use the default > syst= > em driver, but an ASIO supported soundcard. This is also recommended for > an= > y sync play/rec situations, as the default Windows driver does not assure > g= > ood or repeatable synchronization. <u></u><u></u></span></p> > <p class=3D"MsoNormal"><span > style=3D"font-size:11.0pt;color:#1F497D"><u></= > u>=C2=A0<u></u></span></p><p class=3D"MsoNormal"><span > style=3D"font-size:1= > 1.0pt;color:#1F497D">-Brian FG Katz<u></u><u></u></span></p><div><p class= > =3D"MsoNormal"> > <span lang=3D"FR" > style=3D"font-size:10.0pt;color:#1F497D">--<u></u><u></u>= > </span></p><p class=3D"MsoNormal"><span lang=3D"FR" > style=3D"font-size:10.0= > pt;color:#1F497D">Brian FG Katz, Ph.D<u></u><u></u></span></p><p > class=3D"M= > soNormal"> > <span lang=3D"FR" style=3D"font-size:10.0pt;color:#1F497D">Audio &amp; > Acou= > stique<u></u><u></u></span></p><p class=3D"MsoNormal"><span > style=3D"font-s= > ize:10.0pt;color:#1F497D">LIMSI-CNRS<u></u><u></u></span></p><p > class=3D"Ms= > oNormal"> > <span style=3D"font-size:10.0pt;color:#1F497D">BP > 133<u></u><u></u></span><= > /p><p class=3D"MsoNormal"><span > style=3D"font-size:10.0pt;color:#1F497D">F9= > 1403 Orsay<u></u><u></u></span></p><p class=3D"MsoNormal"><span > style=3D"fo= > nt-size:10.0pt;color:#1F497D">France<u></u><u></u></span></p> > <p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;color:#1F497D">tel. > = > <a href=3D"tel:%28%2B33%29%2001%2069%2085%2081%2055" > value=3D"+33169858155"= > target=3D"_blank">(+33) 01 69 85 81 55</a><u></u><u></u></span></p><p > clas= > s=3D"MsoNormal"> > <span style=3D"font-size:10.0pt;color:#1F497D">fax. <a > href=3D"tel:%28%2B33= > %29%2001.69.85.80.88" value=3D"+33169858088" target=3D"_blank">(+33) > 01.69.= > 85.80.88</a><u></u><u></u></span></p><p class=3D"MsoNormal"><span > style=3D"= > font-size:10.0pt;color:#1F497D">e-mail </span><span lang=3D"FR" > style=3D"fo= > nt-size:10.0pt;color:#1F497D"><a href=3D"mailto:Brian.Katz@xxxxxxxx" > target= > =3D"_blank"><span lang=3D"EN-US" style=3D"color:blue">Brian.Katz@xxxxxxxx > </= > span></a></span><span style=3D"font-size:10.0pt;color:#1F497D"> > &lt;</span>= > <span lang=3D"FR" style=3D"font-size:10.0pt;color:#1F497D"><a > href=3D"mailt= > o:Brian.Katz@xxxxxxxx" target=3D"_blank"><span lang=3D"EN-US" > style=3D"colo= > r:blue">mailto:Brian.Katz@xxxxxxxx</span></a></span><span > style=3D"font-siz= > e:10.0pt;color:#1F497D">&gt;<u></u><u></u></span></p> > <p class=3D"MsoNormal"><span > style=3D"font-size:10.0pt;color:#1F497D">web_t= > heme: </span><span lang=3D"FR" style=3D"font-size:10.0pt;color:#1F497D"><a > = > href=3D"http://www.limsi.fr/Scientifique/aa/thmsonesp/" > target=3D"_blank"><= > span lang=3D"EN-US" style=3D"color:blue"> > http://www.limsi.fr/Scientifique/a= > a/thmsonesp/</span></a></span><span > style=3D"font-size:10.0pt;color:#1F497D= > "><u></u><u></u></span></p> > <p class=3D"MsoNormal"><span > style=3D"font-size:10.0pt;color:#1F497D">web_g= > roup: </span><span lang=3D"FR" style=3D"font-size:10.0pt;color:#1F497D"><a > = > href=3D"http://www.limsi.fr/Scientifique/aa/" target=3D"_blank"><span > lang= > =3D"EN-US" style=3D"color:blue">http://www.limsi.fr/Scientifique/aa/ > </span>= > </a></span><span > style=3D"font-size:10.0pt;color:#1F497D"><u></u><u></u></s= > pan></p> > <p class=3D"MsoNormal"><span > style=3D"font-size:10.0pt;color:#1F497D"><u></= > u>=C2=A0<u></u></span></p><p class=3D"MsoNormal"><span > style=3D"font-size:1= > 0.0pt;color:#1F497D"><u></u>=C2=A0<u></u></span></p></div><p > class=3D"MsoNo= > rmal"><span > style=3D"font-size:11.0pt;color:#1F497D"><u></u>=C2=A0<u></u></= > span></p> > <div><div style=3D"border:none;border-top:solid #B5C4DF > 1.0pt;padding:3.0pt= > 0cm 0cm 0cm"><p class=3D"MsoNormal"><b><span lang=3D"FR" > style=3D"font-siz= > e:10.0pt;color:windowtext">De=C2=A0:</span></b><span lang=3D"FR" > style=3D"f= > ont-size:10.0pt;color:windowtext"> AUDITORY - Research in Auditory > Percepti= > on [mailto:<a href=3D"mailto:AUDITORY@xxxxxxxx" > target=3D"_blank">AU= > DITORY@xxxxxxxx</a>] <b>De la part de</b> Patrick Zurek<br> > <b>Envoy=C3=A9=C2=A0:</b> lundi 17 octobre 2011 > 09:57<br><b>=C3=80=C2=A0:</= > b> <a href=3D"mailto:AUDITORY@xxxxxxxx" > target=3D"_blank">AUDITORY@xxxxxxxx= > ISTS.MCGILL.CA</a><br><b>Objet=C2=A0:</b> [AUDITORY] Audio Glitch in > Matlab= > <u></u><u></u></span></p> > </div></div><div><div></div><div class=3D"h5"><p > class=3D"MsoNormal"><u></u= > >=C2=A0<u></u></p><p class=3D"MsoNormal"><span>I&#39;m writing to notify > li= > st readers of a problem playing audio using Matlab. <br><br>The problem is > = > that brief signals are truncated, and it happens using any of the common > co= > mmands for playing audio (wavplay, sound, and the play method of the > audiop= > layer object).<br> > <br>I can&#39;t specify the exact conditions under which the truncation > occ= > urs. However, with a sample rate of 44.1 kHz, signals shorter than about > 50= > 0 msec are truncated. I haven&#39;t looked much at other sample rates.<br> > <br>A simple work-around for the problem is to pad the end of the signal > wi= > th a sufficient number of zeros that truncation occurs during the zero > segm= > ent. I&#39;ve found that at least 2000 zeros need to be added to assure no > = > truncation of a 10-msec signal (with a sample rate of 44.1kHz).<br> > <br>I&#39;ve brought this problem to the attention of The Mathworks. They > c= > onfirmed the problem, which they attribute to a bug in their driver. > <br><b= > r>The Mathworks also informed me that the problem has been solved in their > = > latest release (R2011b) for playing using audioplayer, but not necessarily > = > for the other audio commands. I&#39;ve confirmed this in very limited > tests= > . <br> > <br>The following is a piece of code that you can use to observe the > trunca= > tion. It creates a 100-msec, 1-kHz sine wave, applies a hanning window, > and= > then plays it first with zero-padding and then without. You should be > able= > to hear the click at the end of the second tone, which is not present on > t= > he first. If not, you can see it on an oscilloscope.<br> > <br>%%%%%%%%%%%%%%%%%%%%<br>fs =3D 44100;<br>f =3D 1000; <br>T =3D > 0.1;<br>= > nPad =3D 2000;<br><br>nS =3D round(fs*T);<br><br>y =3D > sin(2.*pi*f/fs*(1:nS= > )&#39;);<br>w =3D .5*(1 - cos(2*pi*(1:nS)&#39;/(nS+1)));<br>y =3D > w.*y;<br>= > yPad =3D [y; zeros(nPad,1)];<br> > <br>wavplay(yPad, fs, &#39;sync&#39;)<br>pause(0.5)<br>wavplay(y, fs, > &#39;= > > sync&#39;)<br>%%%%%%%%%%%%%%%%%%%%%</span><br><br><u></u><u></u></p><pre>--= > <u></u><u></u></pre><pre>Patrick M. > Zurek<u></u><u></u></pre><pre>Presiden= > t <u></u><u></u></pre> > <pre><u></u>=C2=A0<u></u></pre><pre>Sensimetrics > Corporation<u></u><u></u><= > /pre><pre>14 Summer St.<u></u><u></u></pre><pre>Suite > 403<u></u><u></u></pr= > e><pre>Malden, MA 02148<u></u><u></u></pre><pre>Tel: <a > href=3D"tel:781-399= > -0858%20x237" value=3D"+17813990858" target=3D"_blank">781-399-0858 > x237</a= > ><u></u><u></u></pre> > <pre>Fax: <a href=3D"tel:781-399-0853" value=3D"+17813990853" > target=3D"_bl= > ank">781-399-0853</a><u></u><u></u></pre><pre>email: <a href=3D"mailto: > pat@xxxxxxxx= > sens.com" target=3D"_blank">pat@xxxxxxxx</a><u></u><u></u></pre><pre>web: > <= > a href=3D"http://www.sens.com" target=3D"_blank">www.sens.com > </a><u></u><u>= > </u></pre> > </div></div></div></div></blockquote></div><br> > > --0015175d03cc7857e604af80ffa9-- > > ------------------------------ > > End of AUDITORY Digest - 14 Oct 2011 to 17 Oct 2011 - Special issue > (#2011-238) > > ******************************************************************************* > -- Vijaya Kumar Narne PhD, India --20cf307d00fa6013d504af88eca5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Subject: Audio Glitch in Matlab</div><div><br></div><= div>The=A0truncation=A0of the auditory signals less than 500 ms was also se= en in windows 7 and MATLAB version 10. =A0I have even noticed this kind of = problems in Adobe Audition software. I have not used ASIO sound card. I am = not sure about other sound playing softwares.</div> <div><br></div><div>Vijaya Kumar Narne PhD</div><div>Lecturer in Audiology<= /div><div>AIISH</div><div>Mysore</div><div><br></div><div><br></div>Date: = =A0 =A0Mon, 17 Oct 2011 09:57:17 -0400<br>From: =A0 =A0Patrick Zurek &lt;<a= href=3D"mailto:pat@xxxxxxxx">pat@xxxxxxxx</a>&gt;<br> Subject: Audio Glitch in Matlab<br><br>This is a multi-part message in MIME= format.<br>--------------030103020706040808060701<br>Content-Type: text/pl= ain; charset=3DISO-8859-1; format=3Dflowed<br>Content-Transfer-Encoding: 7b= it<br> <br>I&#39;m writing to notify list readers of a problem playing audio using= Matlab.<br><br>The problem is that brief signals are truncated, and it hap= pens using<br>any of the common commands for playing audio (wavplay, sound,= and the<br> play method of the audioplayer object).<br><br>I can&#39;t specify the exac= t conditions under which the truncation occurs.<br>However, with a sample r= ate of 44.1 kHz, signals shorter than about 500<br>msec are truncated. I ha= ven&#39;t looked much at other sample rates.<br> <br>A simple work-around for the problem is to pad the end of the signal<br= >with a sufficient number of zeros that truncation occurs during the zero<b= r>segment. I&#39;ve found that at least 2000 zeros need to be added to assu= re<br> no truncation of a 10-msec signal (with a sample rate of 44.1kHz).<br><br>I= &#39;ve brought this problem to the attention of The Mathworks. They<br>con= firmed the problem, which they attribute to a bug in their driver.<br><br> The Mathworks also informed me that the problem has been solved in their<br= >latest release (R2011b) for playing using audioplayer, but not<br>necessar= ily for the other audio commands. I&#39;ve confirmed this in very<br>limite= d tests.<br> <br>The following is a piece of code that you can use to observe the<br>tru= ncation. It creates a 100-msec, 1-kHz sine wave, applies a hanning<br>windo= w, and then plays it first with zero-padding and then without. You<br>shoul= d be able to hear the click at the end of the second tone, which is<br> not present on the first. If not, you can see it on an oscilloscope.<br><br= >%%%%%%%%%%%%%%%%%%%%<br>fs =3D 44100;<br>f =3D 1000;<br>T =3D 0.1;<br>nPad= =3D 2000;<br><br>nS =3D round(fs*T);<br><br>y =3D sin(2.*pi*f/fs*(1:nS)&#3= 9;);<br> w =3D .5*(1 - cos(2*pi*(1:nS)&#39;/(nS+1)));<br>y =3D w.*y;<br>yPad =3D [y;= zeros(nPad,1)];<br><br>wavplay(yPad, fs, &#39;sync&#39;)<br>pause(0.5)<br>= wavplay(y, fs, &#39;sync&#39;)<br>%%%%%%%%%%%%%%%%%%%%%<br><br>--<br>Patric= k M. Zurek<br> President<br><br>Sensimetrics Corporation<br>14 Summer St.<br>Suite 403<br>= Malden, MA 02148<br>Tel: 781-399-0858 x237<br>Fax: 781-399-0853<br>email:= =A0<a href=3D"mailto:pat@xxxxxxxx">pat@xxxxxxxx</a><br>web:=A0<a href=3D"ht= tp://www.sens.com/" target=3D"_blank">www.sens.com</a><br> <div class=3D"gmail_quote">On Mon, Oct 17, 2011 at 10:02 PM, AUDITORY autom= atic digest system <span dir=3D"ltr">&lt;<a href=3D"mailto:LISTSERV@xxxxxxxx= cgill.ca">LISTSERV@xxxxxxxx</a>&gt;</span> wrote:<br><blockquote cla= ss=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pa= dding-left:1ex;"> There are 6 messages totalling 1517 lines in this issue.<br> <br> Topics in this special issue:<br> <br> =A01. CFP: Special Issue on Speech Separation and Recognition in Multisour= ce<br> =A0 =A0 Environments<br> =A02. Audio Glitch in Matlab (5)<br> <br> ----------------------------------------------------------------------<br> <br> Date: =A0 =A0Mon, 17 Oct 2011 12:29:02 +0100<br> From: =A0 =A0jon &lt;<a href=3D"mailto:j.barker@xxxxxxxx">j.barker@xxxxxxxx= S.SHEF.AC.UK</a>&gt;<br> Subject: CFP: Special Issue on Speech Separation and Recognition in Multiso= urce Environments<br> <br> --Apple-Mail=3D_EDC2B160-FC49-4860-979B-9662B080E0E5<br> Content-Transfer-Encoding: quoted-printable<br> Content-Type: text/plain;<br> =A0 =A0 =A0 =A0charset=3Dwindows-1252<br> <br> [Apologies for multiple postings]<br> <br> =A0+++++++++++++++++++++++++++++++++++++++++++<br> <br> =A0 =A0 =A0COMPUTER SPEECH AND LANGUAGE<br> =A0 =A0 =A0<a href=3D"http://www.elsevier.com/locate/csl" target=3D"_blank= ">http://www.elsevier.com/locate/csl</a><br> <br> =A0 =A0 =A0Special issue on<br> =A0 =A0 =A0SPEECH SEPARATION AND RECOGNITION IN MULTISOURCE ENVIRONMENTS<b= r> <br> =A0 =A0 =A0Submission Deadline: =A0NOVEMBER 30, 2011<br> <br> +++++++++++++++++++++++++++++++++++++++++++<br> <br> One of the chief difficulties of building distant-microphone speech =3D<br> recognition systems for use in everyday applications is that the noise =3D<= br> background is typically `multisource&#39;. A speech recognition system =3D<= br> designed to operate in a family home, for example, must contend with =3D<br= > competing noise from televisions and radios, children playing, vacuum =3D<b= r> cleaners, and outdoors noises from open windows. Despite their =3D<br> complexity, such environments contain structure that can be learnt and =3D<= br> exploited using advanced source separation, machine learning and speech =3D= <br> recognition techniques such as those presented at the 1st International =3D= <br> Workshop on Machine Listening in Multisource Environments (CHiME 2011). =3D= <br> <a href=3D"http://spandh.dcs.shef.ac.uk/projects/chime/workshop/" target=3D= "_blank">http://spandh.dcs.shef.ac.uk/projects/chime/workshop/</a><br> <br> This special issue solicits papers describing advances in speech =3D<br> separation and recognition in multisource noise environments, including =3D= <br> theoretical developments, algorithms or systems.<br> <br> Examples of topics relevant to the special issue include:<br> =3D95 multiple speaker localization, beamforming and source separation,<br> =3D95 hearing inspired approaches to multisource processing,<br> =3D95 background noise tracking and modelling,<br> =3D95 noise-robust speech decoding,<br> =3D95 model combination approaches to robust speech recognition,<br> =3D95 datasets, toolboxes and other resources for multisource speech =3D<br= > separation and recognition.<br> <br> <br> SUBMISSION INSTRUCTIONS:<br> Manuscript submissions shall be made through the Elsevier Editorial =3D<br> System (EES) at<br> <a href=3D"http://ees.elsevier.com/csl/" target=3D"_blank">http://ees.elsev= ier.com/csl/</a><br> Once logged in, click on =3D93Submit New Manuscript=3D94 then select =3D<br= > =3D93Special Issue: Multisource Environments=3D94 in the =3D93Choose Articl= e =3D<br> Type=3D94 dropdown menu.<br> <br> <br> IMPORTANT DATES:<br> November 30, 2011: Paper submission<br> March 30, 2012: First review<br> May 30, 2012: Revised submission<br> July 30, 2012: Second review<br> August 30, 2012: Camera-ready submission<br> <br> <br> We are looking forward to your submission!<br> <br> <br> Jon Barker, University of Sheffield, UK<br> Emmanuel Vincent, INRIA, France<br> <br> ---=3D20<br> <br> <br> --Apple-Mail=3D_EDC2B160-FC49-4860-979B-9662B080E0E5<br> Content-Transfer-Encoding: quoted-printable<br> Content-Type: text/html;<br> =A0 =A0 =A0 =A0charset=3Dwindows-1252<br> <br> &lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body style=3D3D&quot;word-wrap: br= eak-word; =3D<br> -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; =3D<br> &quot;&gt;[Apologies for multiple =3D<br> postings]&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;++++++++++++= +++++++++++++++++++++++++++=3D<br> ++++&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&amp;nbsp; &amp;nbsp; &amp= ;nbsp; COMPUTER SPEECH AND =3D<br> LANGUAGE&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;a =3D<br> href=3D3D&quot;<a href=3D"http://www.elsevier.com/locate/csl" target=3D"_bl= ank">http://www.elsevier.com/locate/csl</a>&quot;&gt;<a href=3D"http://www.= elsevier.com/locate=3D" target=3D"_blank">http://www.elsevier.com/locate=3D= </a><br> /csl&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Special = issue on&lt;div&gt;&amp;nbsp; &amp;nbsp; =3D<br> &amp;nbsp; SPEECH SEPARATION AND RECOGNITION IN MULTISOURCE =3D<br> ENVIRONMENTS&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Submission= Deadline: =3D<br> &amp;nbsp;NOVEMBER 30, =3D<br> 2011&lt;/div&gt;&lt;div&gt;&lt;br&gt;++++++++++++++++++++++++++++++++++++++= +++++&lt;br&gt;&lt;br&gt;One =3D<br> of the chief difficulties of building distant-microphone speech =3D<br> recognition systems for use in everyday applications is that the noise =3D<= br> background is typically `multisource&#39;. A speech recognition system =3D<= br> designed to operate in a family home, for example, must contend with =3D<br= > competing noise from televisions and radios, children playing, vacuum =3D<b= r> cleaners, and outdoors noises from open windows. Despite their =3D<br> complexity, such environments contain structure that can be learnt and =3D<= br> exploited using advanced source separation, machine learning and speech =3D= <br> recognition techniques such as those presented at the 1st International =3D= <br> Workshop on Machine Listening in Multisource Environments (CHiME =3D<br> 2011).&amp;nbsp;&lt;a =3D<br> href=3D3D&quot;<a href=3D"http://spandh.dcs.shef.ac.uk/projects/chime/works= hop/" target=3D"_blank">http://spandh.dcs.shef.ac.uk/projects/chime/worksho= p/</a>&quot;&gt;<a href=3D"http://span" target=3D"_blank">http://span</a>= =3D<br> <a href=3D"http://dh.dcs.shef.ac.uk/projects/chime/workshop/" target=3D"_bl= ank">dh.dcs.shef.ac.uk/projects/chime/workshop/</a>&lt;/a&gt;&lt;br&gt;&lt;= br&gt;This special issue =3D<br> solicits papers describing advances in speech separation and recognition = =3D<br> in multisource noise environments, including theoretical developments, =3D<= br> algorithms or systems.&lt;br&gt;&lt;br&gt;Examples of topics relevant to th= e special =3D<br> issue include:&lt;br&gt;=3D95 multiple speaker localization, beamforming an= d =3D<br> source separation,&lt;br&gt;=3D95 hearing inspired approaches to multisourc= e =3D<br> processing,&lt;br&gt;=3D95 background noise tracking and modelling,&lt;br&g= t;=3D95 =3D<br> noise-robust speech decoding,&lt;br&gt;=3D95 model combination approaches t= o =3D<br> robust speech recognition,&lt;br&gt;=3D95 datasets, toolboxes and other =3D= <br> resources for multisource speech separation and =3D<br> recognition.&lt;br&gt;&lt;br&gt;&lt;br&gt;SUBMISSION INSTRUCTIONS:&lt;br&gt= ;Manuscript =3D<br> submissions shall be made through the Elsevier Editorial System (EES) =3D<b= r> at&lt;br&gt;&lt;a =3D<br> href=3D3D&quot;<a href=3D"http://ees.elsevier.com/csl/" target=3D"_blank">h= ttp://ees.elsevier.com/csl/</a>&quot;&gt;<a href=3D"http://ees.elsevier.com= /csl/" target=3D"_blank">http://ees.elsevier.com/csl/</a>&lt;/a&gt;&lt;br&g= t;=3D<br> Once logged in, click on =3D93Submit New Manuscript=3D94 then select =3D<br= > =3D93Special Issue: Multisource Environments=3D94 in the =3D93Choose Articl= e =3D<br> Type=3D94 dropdown menu.&lt;br&gt;&lt;br&gt;&lt;br&gt;IMPORTANT DATES:&lt;b= r&gt;November 30, 2011: =3D<br> Paper submission&lt;br&gt;March 30, 2012: First review&lt;br&gt;May 30, 201= 2: =3D<br> Revised submission&lt;br&gt;July 30, 2012: Second review&lt;br&gt;August 30= , 2012: =3D<br> Camera-ready submission&lt;br&gt;&lt;br&gt;&lt;br&gt;We are looking forward= to your =3D<br> submission!&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&g= t;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Jon Barker, =3D<br> University of Sheffield, UK&lt;br&gt;Emmanuel Vincent, INRIA, =3D<br> France&lt;br&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;---&amp;nbsp;&lt;div&gt;&l= t;span class=3D3D&quot;Apple-style-span&quot; =3D<br> style=3D3D&quot;border-collapse: separate; color: rgb(0, 0, 0); font-family= : =3D<br> Helvetica; font-size: medium; font-style: normal; font-variant: normal; =3D= <br> font-weight: normal; letter-spacing: normal; line-height: normal; =3D<br> orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; = =3D<br> widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; =3D<b= r> -webkit-border-vertical-spacing: 0px; =3D<br> -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =3D<br> auto; -webkit-text-stroke-width: 0px; &quot;&gt;&lt;span class=3D3D&quot;Ap= ple-style-span&quot; =3D<br> style=3D3D&quot;border-collapse: separate; color: rgb(0, 0, 0); font-family= : =3D<br> Helvetica; font-size: medium; font-style: normal; font-variant: normal; =3D= <br> font-weight: normal; letter-spacing: normal; line-height: normal; =3D<br> orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; = =3D<br> widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; =3D<b= r> -webkit-border-vertical-spacing: 0px; =3D<br> -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =3D<br> auto; -webkit-text-stroke-width: 0px; &quot;&gt;&lt;div style=3D3D&quot;wor= d-wrap: =3D<br> break-word; -webkit-nbsp-mode: space; -webkit-line-break: =3D<br> after-white-space; &quot;&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div= &gt;&lt;/div&gt;&lt;div&gt;<br> &lt;span class=3D3D&quot;Apple-style-span&quot; style=3D3D&quot;border-coll= apse: separate; =3D<br> color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; =3D<br> font-style: normal; font-variant: normal; font-weight: normal; =3D<br> letter-spacing: normal; line-height: normal; orphans: 2; text-align: =3D<br= > auto; text-indent: 0px; text-transform: none; white-space: normal; =3D<br> widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; =3D<b= r> -webkit-border-vertical-spacing: 0px; =3D<br> -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =3D<br> auto; -webkit-text-stroke-width: 0px; &quot;&gt;&lt;span class=3D3D&quot;Ap= ple-style-span&quot; =3D<br> style=3D3D&quot;border-collapse: separate; color: rgb(0, 0, 0); font-family= : =3D<br> Helvetica; font-size: medium; font-style: normal; font-variant: normal; =3D= <br> font-weight: normal; letter-spacing: normal; line-height: normal; =3D<br> orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; = =3D<br> widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; =3D<b= r> -webkit-border-vertical-spacing: 0px; =3D<br> -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =3D<br> auto; -webkit-text-stroke-width: 0px; &quot;&gt;&lt;div style=3D3D&quot;wor= d-wrap: =3D<br> break-word; -webkit-nbsp-mode: space; -webkit-line-break: =3D<br> after-white-space; =3D<br> &quot;&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/sp= an&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;=3D<br> <br> --Apple-Mail=3D_EDC2B160-FC49-4860-979B-9662B080E0E5--<br> <br> ------------------------------<br> <br> Date: =A0 =A0Mon, 17 Oct 2011 09:57:17 -0400<br> From: =A0 =A0Patrick Zurek &lt;<a href=3D"mailto:pat@xxxxxxxx">pat@xxxxxxxx= </a>&gt;<br> Subject: Audio Glitch in Matlab<br> <br> This is a multi-part message in MIME format.<br> --------------030103020706040808060701<br> Content-Type: text/plain; charset=3DISO-8859-1; format=3Dflowed<br> Content-Transfer-Encoding: 7bit<br> <br> I&#39;m writing to notify list readers of a problem playing audio using Mat= lab.<br> <br> The problem is that brief signals are truncated, and it happens using<br> any of the common commands for playing audio (wavplay, sound, and the<br> play method of the audioplayer object).<br> <br> I can&#39;t specify the exact conditions under which the truncation occurs.= <br> However, with a sample rate of 44.1 kHz, signals shorter than about 500<br> msec are truncated. I haven&#39;t looked much at other sample rates.<br> <br> A simple work-around for the problem is to pad the end of the signal<br> with a sufficient number of zeros that truncation occurs during the zero<br= > segment. I&#39;ve found that at least 2000 zeros need to be added to assure= <br> no truncation of a 10-msec signal (with a sample rate of 44.1kHz).<br> <br> I&#39;ve brought this problem to the attention of The Mathworks. They<br> confirmed the problem, which they attribute to a bug in their driver.<br> <br> The Mathworks also informed me that the problem has been solved in their<br= > latest release (R2011b) for playing using audioplayer, but not<br> necessarily for the other audio commands. I&#39;ve confirmed this in very<b= r> limited tests.<br> <br> The following is a piece of code that you can use to observe the<br> truncation. It creates a 100-msec, 1-kHz sine wave, applies a hanning<br> window, and then plays it first with zero-padding and then without. You<br> should be able to hear the click at the end of the second tone, which is<br= > not present on the first. If not, you can see it on an oscilloscope.<br> <br> %%%%%%%%%%%%%%%%%%%%<br> fs =3D 44100;<br> f =3D 1000;<br> T =3D 0.1;<br> nPad =3D 2000;<br> <br> nS =3D round(fs*T);<br> <br> y =3D sin(2.*pi*f/fs*(1:nS)&#39;);<br> w =3D .5*(1 - cos(2*pi*(1:nS)&#39;/(nS+1)));<br> y =3D w.*y;<br> yPad =3D [y; zeros(nPad,1)];<br> <br> wavplay(yPad, fs, &#39;sync&#39;)<br> pause(0.5)<br> wavplay(y, fs, &#39;sync&#39;)<br> %%%%%%%%%%%%%%%%%%%%%<br> <br> --<br> Patrick M. Zurek<br> President<br> <br> Sensimetrics Corporation<br> 14 Summer St.<br> Suite 403<br> Malden, MA 02148<br> Tel: 781-399-0858 x237<br> Fax: 781-399-0853<br> email: <a href=3D"mailto:pat@xxxxxxxx">pat@xxxxxxxx</a><br> web: <a href=3D"http://www.sens.com" target=3D"_blank">www.sens.com</a><br> <br> <br> --------------030103020706040808060701<br> Content-Type: text/html; charset=3DISO-8859-1<br> Content-Transfer-Encoding: 7bit<br> <br> &lt;html&gt;<br> =A0&lt;head&gt;<br> <br> =A0 =A0&lt;meta http-equiv=3D&quot;content-type&quot; content=3D&quot;text= /html; charset=3DISO-8859-1&quot;&gt;<br> =A0&lt;/head&gt;<br> =A0&lt;body bgcolor=3D&quot;#FFFFFF&quot; text=3D&quot;#000000&quot;&gt;<b= r> =A0 =A0&lt;font face=3D&quot;Calibri&quot;&gt;I&#39;m writing to notify li= st readers of a problem<br> =A0 =A0 =A0playing audio using Matlab. &lt;br&gt;<br> =A0 =A0 =A0&lt;br&gt;<br> =A0 =A0 =A0The problem is that brief signals are truncated, and it happens= <br> =A0 =A0 =A0using any of the common commands for playing audio (wavplay,<br= > =A0 =A0 =A0sound, and the play method of the audioplayer object).&lt;br&gt= ;<br> =A0 =A0 =A0&lt;br&gt;<br> =A0 =A0 =A0I can&#39;t specify the exact conditions under which the trunca= tion<br> =A0 =A0 =A0occurs. However, with a sample rate of 44.1 kHz, signals shorte= r<br> =A0 =A0 =A0than about 500 msec are truncated. I haven&#39;t looked much at= other<br> =A0 =A0 =A0sample rates.&lt;br&gt;<br> =A0 =A0 =A0&lt;br&gt;<br> =A0 =A0 =A0A simple work-around for the problem is to pad the end of the<b= r> =A0 =A0 =A0signal with a sufficient number of zeros that truncation occurs= <br> =A0 =A0 =A0during the zero segment. I&#39;ve found that at least 2000 zero= s need<br> =A0 =A0 =A0to be added to assure no truncation of a 10-msec signal (with a= <br> =A0 =A0 =A0sample rate of 44.1kHz).&lt;br&gt;<br> =A0 =A0 =A0&lt;br&gt;<br> =A0 =A0 =A0I&#39;ve brought this problem to the attention of The Mathworks= . They<br> =A0 =A0 =A0confirmed the problem, which they attribute to a bug in their<b= r> =A0 =A0 =A0driver. &lt;br&gt;<br> =A0 =A0 =A0&lt;br&gt;<br> =A0 =A0 =A0The Mathworks also informed me that the problem has been solved= in<br> =A0 =A0 =A0their latest release (R2011b) for playing using audioplayer, bu= t<br> =A0 =A0 =A0not necessarily for the other audio commands. I&#39;ve confirme= d this<br> =A0 =A0 =A0in very limited tests. &lt;br&gt;<br> =A0 =A0 =A0&lt;br&gt;<br> =A0 =A0 =A0The following is a piece of code that you can use to observe th= e<br> =A0 =A0 =A0truncation. It creates a 100-msec, 1-kHz sine wave, applies a<b= r> =A0 =A0 =A0hanning window, and then plays it first with zero-padding and t= hen<br> =A0 =A0 =A0without. You should be able to hear the click at the end of the= <br> =A0 =A0 =A0second tone, which is not present on the first. If not, you can= <br> =A0 =A0 =A0see it on an oscilloscope.&lt;br&gt;<br> =A0 =A0 =A0&lt;br&gt;<br> =A0 =A0 =A0%%%%%%%%%%%%%%%%%%%%&lt;br&gt;<br> =A0 =A0 =A0fs =3D 44100;&lt;br&gt;<br> =A0 =A0 =A0f =3D 1000; &lt;br&gt;<br> =A0 =A0 =A0T =3D 0.1;&lt;br&gt;<br> =A0 =A0 =A0nPad =3D 2000;&lt;br&gt;<br> =A0 =A0 =A0&lt;br&gt;<br> =A0 =A0 =A0nS =3D round(fs*T);&lt;br&gt;<br> =A0 =A0 =A0&lt;br&gt;<br> =A0 =A0 =A0y =3D sin(2.*pi*f/fs*(1:nS)&#39;);&lt;br&gt;<br> =A0 =A0 =A0w =3D .5*(1 - cos(2*pi*(1:nS)&#39;/(nS+1)));&lt;br&gt;<br> =A0 =A0 =A0y =3D w.*y;&lt;br&gt;<br> =A0 =A0 =A0yPad =3D [y; zeros(nPad,1)];&lt;br&gt;<br> =A0 =A0 =A0&lt;br&gt;<br> =A0 =A0 =A0wavplay(yPad, fs, &#39;sync&#39;)&lt;br&gt;<br> =A0 =A0 =A0pause(0.5)&lt;br&gt;<br> =A0 =A0 =A0wavplay(y, fs, &#39;sync&#39;)&lt;br&gt;<br> =A0 =A0 =A0%%%%%%%%%%%%%%%%%%%%%&lt;/font&gt;&lt;br&gt;<br> =A0 =A0&lt;pre class=3D&quot;moz-signature&quot; cols=3D&quot;72&quot;&gt;= --<br> Patrick M. Zurek<br> President<br> <br> Sensimetrics Corporation<br> 14 Summer St.<br> Suite 403<br> Malden, MA 02148<br> Tel: 781-399-0858 x237<br> Fax: 781-399-0853<br> email: &lt;a class=3D&quot;moz-txt-link-abbreviated&quot; href=3D&quot;mail= to:<a href=3D"mailto:pat@xxxxxxxx">pat@xxxxxxxx</a>&quot;&gt;<a href=3D"mai= lto:pat@xxxxxxxx">pat@xxxxxxxx</a>&lt;/a&gt;<br> web: &lt;a class=3D&quot;moz-txt-link-abbreviated&quot; href=3D&quot;<a hre= f=3D"http://www.sens.com" target=3D"_blank">http://www.sens.com</a>&quot;&g= t;<a href=3D"http://www.sens.com" target=3D"_blank">www.sens.com</a>&lt;/a&= gt;&lt;/pre&gt;<br> =A0&lt;/body&gt;<br> &lt;/html&gt;<br> <br> --------------030103020706040808060701--<br> <br> ------------------------------<br> <br> Date: =A0 =A0Mon, 17 Oct 2011 10:35:49 -0400<br> From: =A0 =A0Brian FG Katz &lt;<a href=3D"mailto:brian.katz@xxxxxxxx">brian= .katz@xxxxxxxx</a>&gt;<br> Subject: Re: Audio Glitch in Matlab<br> <br> This is a multipart message in MIME format.<br> <br> ------=3D_NextPart_000_0084_01CC8CB8.8AAFF440<br> Content-Type: text/plain;<br> =A0 =A0 =A0 =A0charset=3D&quot;iso-8859-1&quot;<br> Content-Transfer-Encoding: quoted-printable<br> <br> This bug is quite present in Windows. The solution is to not use the =3D<br= > default<br> system driver, but an ASIO supported soundcard. This is also recommended = =3D<br> for<br> any sync play/rec situations, as the default Windows driver does not =3D<br= > assure<br> good or repeatable synchronization.=3D20<br> <br> =3D20<br> <br> -Brian FG Katz<br> <br> --<br> <br> Brian FG Katz, Ph.D<br> <br> Audio &amp; Acoustique<br> <br> LIMSI-CNRS<br> <br> BP 133<br> <br> F91403 Orsay<br> <br> France<br> <br> tel. (+33) 01 69 85 81 55<br> <br> fax. (+33) 01.69.85.80.88<br> <br> e-mail =A0&lt;mailto:<a href=3D"mailto:Brian.Katz@xxxxxxxx">Brian.Katz@xxxxxxxx= i.fr</a>&gt; <a href=3D"mailto:Brian.Katz@xxxxxxxx">Brian.Katz@xxxxxxxx</a>= &lt;<br> &lt;mailto:<a href=3D"mailto:Brian.Katz@xxxxxxxx">Brian.Katz@xxxxxxxx</a>&g= t; mailto:<a href=3D"mailto:Brian.Katz@xxxxxxxx">Brian.Katz@xxxxxxxx</a>&gt= ;<br> <br> web_theme: =A0&lt;<a href=3D"http://www.limsi.fr/Scientifique/aa/thmsonesp/= " target=3D"_blank">http://www.limsi.fr/Scientifique/aa/thmsonesp/</a>&gt;<= br> <a href=3D"http://www.limsi.fr/Scientifique/aa/thmsonesp/" target=3D"_blank= ">http://www.limsi.fr/Scientifique/aa/thmsonesp/</a><br> <br> web_group: =A0&lt;<a href=3D"http://www.limsi.fr/Scientifique/aa/" target= =3D"_blank">http://www.limsi.fr/Scientifique/aa/</a>&gt;<br> <a href=3D"http://www.limsi.fr/Scientifique/aa/" target=3D"_blank">http://w= ww.limsi.fr/Scientifique/aa/</a><br> <br> =3D20<br> <br> =3D20<br> <br> =3D20<br> <br> De : AUDITORY - Research in Auditory Perception<br> [mailto:<a href=3D"mailto:AUDITORY@xxxxxxxx">AUDITORY@xxxxxxxx= A</a>] De la part de Patrick Zurek<br> Envoy=3DE9 : lundi 17 octobre 2011 09:57<br> =3DC0 : <a href=3D"mailto:AUDITORY@xxxxxxxx">AUDITORY@xxxxxxxx= A</a><br> Objet : [AUDITORY] Audio Glitch in Matlab<br> <br> =3D20<br> <br> I&#39;m writing to notify list readers of a problem playing audio using =3D= <br> Matlab.=3D20<br> <br> The problem is that brief signals are truncated, and it happens using =3D<b= r> any of<br> the common commands for playing audio (wavplay, sound, and the play =3D<br> method<br> of the audioplayer object).<br> <br> I can&#39;t specify the exact conditions under which the truncation occurs.= <br> However, with a sample rate of 44.1 kHz, signals shorter than about 500 =3D= <br> msec<br> are truncated. I haven&#39;t looked much at other sample rates.<br> <br> A simple work-around for the problem is to pad the end of the signal =3D<br= > with a<br> sufficient number of zeros that truncation occurs during the zero =3D<br> segment.<br> I&#39;ve found that at least 2000 zeros need to be added to assure no =3D<b= r> truncation<br> of a 10-msec signal (with a sample rate of 44.1kHz).<br> <br> I&#39;ve brought this problem to the attention of The Mathworks. They =3D<b= r> confirmed<br> the problem, which they attribute to a bug in their driver.=3D20<br> <br> The Mathworks also informed me that the problem has been solved in their<br= > latest release (R2011b) for playing using audioplayer, but not =3D<br> necessarily<br> for the other audio commands. I&#39;ve confirmed this in very limited tests= . =3D<br> <br> <br> The following is a piece of code that you can use to observe the =3D<br> truncation.<br> It creates a 100-msec, 1-kHz sine wave, applies a hanning window, and =3D<b= r> then<br> plays it first with zero-padding and then without. You should be able to<br= > hear the click at the end of the second tone, which is not present on =3D<b= r> the<br> first. If not, you can see it on an oscilloscope.<br> <br> %%%%%%%%%%%%%%%%%%%%<br> fs =3D3D 44100;<br> f =3D3D 1000;=3D20<br> T =3D3D 0.1;<br> nPad =3D3D 2000;<br> <br> nS =3D3D round(fs*T);<br> <br> y =3D3D sin(2.*pi*f/fs*(1:nS)&#39;);<br> w =3D3D .5*(1 - cos(2*pi*(1:nS)&#39;/(nS+1)));<br> y =3D3D w.*y;<br> yPad =3D3D [y; zeros(nPad,1)];<br> <br> wavplay(yPad, fs, &#39;sync&#39;)<br> pause(0.5)<br> wavplay(y, fs, &#39;sync&#39;)<br> %%%%%%%%%%%%%%%%%%%%%<br> <br> <br> <br> --=3D20<br> Patrick M. Zurek<br> President=3D20<br> =3D20<br> Sensimetrics Corporation<br> 14 Summer St.<br> Suite 403<br> Malden, MA 02148<br> Tel: 781-399-0858 x237<br> Fax: 781-399-0853<br> email: <a href=3D"mailto:pat@xxxxxxxx">pat@xxxxxxxx</a><br> web: <a href=3D"http://www.sens.com" target=3D"_blank">www.sens.com</a><br> <br> ------=3D_NextPart_000_0084_01CC8CB8.8AAFF440<br> Content-Type: text/html;<br> =A0 =A0 =A0 =A0charset=3D&quot;iso-8859-1&quot;<br> Content-Transfer-Encoding: quoted-printable<br> <br> &lt;META HTTP-EQUIV=3D3D&quot;Content-Type&quot; CONTENT=3D3D&quot;text/htm= l; =3D<br> charset=3D3Diso-8859-1&quot;&gt;<br> &lt;html xmlns:v=3D3D&quot;urn:schemas-microsoft-com:vml&quot; =3D<br> xmlns:o=3D3D&quot;urn:schemas-microsoft-com:office:office&quot; =3D<br> xmlns:w=3D3D&quot;urn:schemas-microsoft-com:office:word&quot; =3D<br> xmlns:m=3D3D&quot;<a href=3D"http://schemas.microsoft.com/office/2004/12/om= ml" target=3D"_blank">http://schemas.microsoft.com/office/2004/12/omml</a>&= quot; =3D<br> xmlns=3D3D&quot;<a href=3D"http://www.w3.org/TR/REC-html40" target=3D"_blan= k">http://www.w3.org/TR/REC-html40</a>&quot;&gt;&lt;head&gt;&lt;meta name= =3D3DGenerator =3D<br> content=3D3D&quot;Microsoft Word 14 (filtered medium)&quot;&gt;&lt;style&gt= ;&lt;!--<br> /* Font Definitions */<br> @xxxxxxxx<br> =A0 =A0 =A0 =A0{font-family:Calibri;<br> =A0 =A0 =A0 =A0panose-1:2 15 5 2 2 2 4 3 2 4;}<br> @xxxxxxxx<br> =A0 =A0 =A0 =A0{font-family:Tahoma;<br> =A0 =A0 =A0 =A0panose-1:2 11 6 4 3 5 4 4 2 4;}<br> @xxxxxxxx<br> =A0 =A0 =A0 =A0{font-family:Consolas;<br> =A0 =A0 =A0 =A0panose-1:2 11 6 9 2 2 4 3 2 4;}<br> /* Style Definitions */<br> p.MsoNormal, li.MsoNormal, div.MsoNormal<br> =A0 =A0 =A0 =A0{margin:0cm;<br> =A0 =A0 =A0 =A0margin-bottom:.0001pt;<br> =A0 =A0 =A0 =A0font-size:12.0pt;<br> =A0 =A0 =A0 =A0font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;<= br> =A0 =A0 =A0 =A0color:black;}<br> a:link, span.MsoHyperlink<br> =A0 =A0 =A0 =A0{mso-style-priority:99;<br> =A0 =A0 =A0 =A0color:blue;<br> =A0 =A0 =A0 =A0text-decoration:underline;}<br> a:visited, span.MsoHyperlinkFollowed<br> =A0 =A0 =A0 =A0{mso-style-priority:99;<br> =A0 =A0 =A0 =A0color:purple;<br> =A0 =A0 =A0 =A0text-decoration:underline;}<br> pre<br> =A0 =A0 =A0 =A0{mso-style-priority:99;<br> =A0 =A0 =A0 =A0mso-style-link:&quot;Pr=3DE9format=3DE9 HTML Car&quot;;<br> =A0 =A0 =A0 =A0margin:0cm;<br> =A0 =A0 =A0 =A0margin-bottom:.0001pt;<br> =A0 =A0 =A0 =A0font-size:10.0pt;<br> =A0 =A0 =A0 =A0font-family:&quot;Courier New&quot;;<br> =A0 =A0 =A0 =A0color:black;}<br> span.PrformatHTMLCar<br> =A0 =A0 =A0 =A0{mso-style-name:&quot;Pr=3DE9format=3DE9 HTML Car&quot;;<br= > =A0 =A0 =A0 =A0mso-style-priority:99;<br> =A0 =A0 =A0 =A0mso-style-link:&quot;Pr=3DE9format=3DE9 HTML&quot;;<br> =A0 =A0 =A0 =A0font-family:Consolas;<br> =A0 =A0 =A0 =A0color:black;}<br> span.EmailStyle19<br> =A0 =A0 =A0 =A0{mso-style-type:personal-reply;<br> =A0 =A0 =A0 =A0font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;<br> =A0 =A0 =A0 =A0color:#1F497D;}<br> .MsoChpDefault<br> =A0 =A0 =A0 =A0{mso-style-type:export-only;<br> =A0 =A0 =A0 =A0font-size:10.0pt;}<br> @xxxxxxxx WordSection1<br> =A0 =A0 =A0 =A0{size:612.0pt 792.0pt;<br> =A0 =A0 =A0 =A0margin:70.85pt 70.85pt 70.85pt 70.85pt;}<br> div.WordSection1<br> =A0 =A0 =A0 =A0{page:WordSection1;}<br> --&gt;&lt;/style&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;<br> &lt;o:shapedefaults v:ext=3D3D&quot;edit&quot; spidmax=3D3D&quot;1026&quot;= /&gt;<br> &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;<br> &lt;o:shapelayout v:ext=3D3D&quot;edit&quot;&gt;<br> &lt;o:idmap v:ext=3D3D&quot;edit&quot; data=3D3D&quot;1&quot; /&gt;<br> &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;&lt;/head&gt;&lt;body b= gcolor=3D3Dwhite =3D<br> lang=3D3DEN-US link=3D3Dblue vlink=3D3Dpurple&gt;&lt;div class=3D3DWordSect= ion1&gt;&lt;p =3D<br> class=3D3DMsoNormal&gt;&lt;span =3D<br> style=3D3D&#39;font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-= serif&quot;;color:#1F497=3D<br> D&#39;&gt;This bug is quite present in Windows. The solution is to not use = the =3D<br> default system driver, but an ASIO supported soundcard. This is also =3D<br= > recommended for any sync play/rec situations, as the default Windows =3D<br= > driver does not assure good or repeatable synchronization. =3D<br> &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=3D3DMsoNormal&gt;= &lt;span =3D<br> style=3D3D&#39;font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-= serif&quot;;color:#1F497=3D<br> D&#39;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p cla= ss=3D3DMsoNormal&gt;&lt;span =3D<br> style=3D3D&#39;font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-= serif&quot;;color:#1F497=3D<br> D&#39;&gt;-Brian FG Katz&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;d= iv&gt;&lt;p class=3D3DMsoNormal&gt;&lt;span =3D<br> lang=3D3DFR =3D<br> style=3D3D&#39;font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-se= rif&quot;;color:#1F497D&#39;=3D<br> &gt;--&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=3D3DMsoNorm= al&gt;&lt;span lang=3D3DFR =3D<br> style=3D3D&#39;font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-se= rif&quot;;color:#1F497D&#39;=3D<br> &gt;Brian FG Katz, Ph.D&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p = class=3D3DMsoNormal&gt;&lt;span =3D<br> lang=3D3DFR =3D<br> style=3D3D&#39;font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-se= rif&quot;;color:#1F497D&#39;=3D<br> &gt;Audio &amp;amp; Acoustique&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt= ;&lt;p class=3D3DMsoNormal&gt;&lt;span =3D<br> style=3D3D&#39;font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-se= rif&quot;;color:#1F497D&#39;=3D<br> &gt;LIMSI-CNRS&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=3D3= DMsoNormal&gt;&lt;span =3D<br> style=3D3D&#39;font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-se= rif&quot;;color:#1F497D&#39;=3D<br> &gt;BP 133&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=3D3DMso= Normal&gt;&lt;span =3D<br> style=3D3D&#39;font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-se= rif&quot;;color:#1F497D&#39;=3D<br> &gt;F91403 Orsay&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class= =3D3DMsoNormal&gt;&lt;span =3D<br> style=3D3D&#39;font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-se= rif&quot;;color:#1F497D&#39;=3D<br> &gt;France&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=3D3DMso= Normal&gt;&lt;span =3D<br> style=3D3D&#39;font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-se= rif&quot;;color:#1F497D&#39;=3D<br> &gt;tel. (+33) 01 69 85 81 55&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;= &lt;p =3D<br> class=3D3DMsoNormal&gt;&lt;span =3D<br> style=3D3D&#39;font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-se= rif&quot;;color:#1F497D&#39;=3D<br> &gt;fax. (+33) 01.69.85.80.88&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;= &lt;p =3D<br> class=3D3DMsoNormal&gt;&lt;span =3D<br> style=3D3D&#39;font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-se= rif&quot;;color:#1F497D&#39;=3D<br> &gt;e-mail &lt;/span&gt;&lt;span lang=3D3DFR =3D<br> style=3D3D&#39;font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-se= rif&quot;;color:#1F497D&#39;=3D<br> &gt;&lt;a href=3D3D&quot;mailto:<a href=3D"mailto:Brian.Katz@xxxxxxxx">Bria= n.Katz@xxxxxxxx</a>&quot;&gt;&lt;span lang=3D3DEN-US =3D<br> style=3D3D&#39;color:blue&#39;&gt;<a href=3D"mailto:Brian.Katz@xxxxxxxx">Br= ian.Katz@xxxxxxxx</a>&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span =3D<br> style=3D3D&#39;font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-se= rif&quot;;color:#1F497D&#39;=3D<br> &gt; &amp;lt;&lt;/span&gt;&lt;span lang=3D3DFR =3D<br> style=3D3D&#39;font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-se= rif&quot;;color:#1F497D&#39;=3D<br> &gt;&lt;a href=3D3D&quot;mailto:<a href=3D"mailto:Brian.Katz@xxxxxxxx">Bria= n.Katz@xxxxxxxx</a>&quot;&gt;&lt;span lang=3D3DEN-US =3D<br> style=3D3D&#39;color:blue&#39;&gt;mailto:<a href=3D"mailto:Brian.Katz@xxxxxxxx= .fr">Brian.Katz@xxxxxxxx</a>&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span = =3D<br> style=3D3D&#39;font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-se= rif&quot;;color:#1F497D&#39;=3D<br> &gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=3D3DM= soNormal&gt;&lt;span =3D<br> style=3D3D&#39;font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-se= rif&quot;;color:#1F497D&#39;=3D<br> &gt;web_theme: &lt;/span&gt;&lt;span lang=3D3DFR =3D<br> style=3D3D&#39;font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-se= rif&quot;;color:#1F497D&#39;=3D<br> &gt;&lt;a href=3D3D&quot;<a href=3D"http://www.limsi.fr/Scientifique/aa/thm= sonesp/" target=3D"_blank">http://www.limsi.fr/Scientifique/aa/thmsonesp/</= a>&quot;&gt;&lt;span =3D<br> lang=3D3DEN-US =3D<br> style=3D3D&#39;color:blue&#39;&gt;<a href=3D"http://www.limsi.fr/Scientifiq= ue/aa/thmsonesp/" target=3D"_blank">http://www.limsi.fr/Scientifique/aa/thm= sonesp/</a>&lt;/span=3D<br> &gt;&lt;/a&gt;&lt;/span&gt;&lt;span =3D<br> style=3D3D&#39;font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-se= rif&quot;;color:#1F497D&#39;=3D<br> &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=3D3DMsoNormal= &gt;&lt;span =3D<br> style=3D3D&#39;font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-se= rif&quot;;color:#1F497D&#39;=3D<br> &gt;web_group: &lt;/span&gt;&lt;span lang=3D3DFR =3D<br> style=3D3D&#39;font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-se= rif&quot;;color:#1F497D&#39;=3D<br> &gt;&lt;a href=3D3D&quot;<a href=3D"http://www.limsi.fr/Scientifique/aa/" t= arget=3D"_blank">http://www.limsi.fr/Scientifique/aa/</a>&quot;&gt;&lt;span= lang=3D3DEN-US =3D<br> style=3D3D&#39;color:blue&#39;&gt;<a href=3D"http://www.limsi.fr/Scientifiq= ue/aa/" target=3D"_blank">http://www.limsi.fr/Scientifique/aa/</a>&lt;/span= &gt;&lt;/a&gt;&lt;/spa=3D<br> n&gt;&lt;span =3D<br> style=3D3D&#39;font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-se= rif&quot;;color:#1F497D&#39;=3D<br> &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=3D3DMsoNormal= &gt;&lt;span =3D<br> style=3D3D&#39;font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-se= rif&quot;;color:#1F497D&#39;=3D<br> &gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=3D3= DMsoNormal&gt;&lt;span =3D<br> style=3D3D&#39;font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-se= rif&quot;;color:#1F497D&#39;=3D<br> &gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt= ;p class=3D3DMsoNormal&gt;&lt;span =3D<br> style=3D3D&#39;font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-= serif&quot;;color:#1F497=3D<br> D&#39;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div&g= t;&lt;div =3D<br> style=3D3D&#39;border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm= =3D<br> 0cm 0cm&#39;&gt;&lt;p class=3D3DMsoNormal&gt;&lt;b&gt;&lt;span lang=3D3DFR = =3D<br> style=3D3D&#39;font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-s= erif&quot;;color:windowt=3D<br> ext&#39;&gt;De&amp;nbsp;:&lt;/span&gt;&lt;/b&gt;&lt;span lang=3D3DFR =3D<br= > style=3D3D&#39;font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-s= erif&quot;;color:windowt=3D<br> ext&#39;&gt; AUDITORY - Research in Auditory Perception =3D<br> [mailto:<a href=3D"mailto:AUDITORY@xxxxxxxx">AUDITORY@xxxxxxxx= A</a>] &lt;b&gt;De la part de&lt;/b&gt; Patrick =3D<br> Zurek&lt;br&gt;&lt;b&gt;Envoy=3DE9&amp;nbsp;:&lt;/b&gt; lundi 17 octobre 20= 11 =3D<br> 09:57&lt;br&gt;&lt;b&gt;=3DC0&amp;nbsp;:&lt;/b&gt; =3D<br> <a href=3D"mailto:AUDITORY@xxxxxxxx">AUDITORY@xxxxxxxx</a>&lt= ;br&gt;&lt;b&gt;Objet&amp;nbsp;:&lt;/b&gt; [AUDITORY] Audio Glitch =3D<br> in Matlab&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div= &gt;&lt;p =3D<br> class=3D3DMsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;&lt;p cla= ss=3D3DMsoNormal&gt;&lt;span =3D<br> style=3D3D&#39;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;&#39;&= gt;I&#39;m writing to notify list =3D<br> readers of a problem playing audio using Matlab. &lt;br&gt;&lt;br&gt;The pr= oblem is =3D<br> that brief signals are truncated, and it happens using any of the common = =3D<br> commands for playing audio (wavplay, sound, and the play method of the =3D<= br> audioplayer object).&lt;br&gt;&lt;br&gt;I can&#39;t specify the exact condi= tions under =3D<br> which the truncation occurs. However, with a sample rate of 44.1 kHz, =3D<b= r> signals shorter than about 500 msec are truncated. I haven&#39;t looked muc= h =3D<br> at other sample rates.&lt;br&gt;&lt;br&gt;A simple work-around for the prob= lem is to =3D<br> pad the end of the signal with a sufficient number of zeros that =3D<br> truncation occurs during the zero segment. I&#39;ve found that at least 200= 0 =3D<br> zeros need to be added to assure no truncation of a 10-msec signal (with = =3D<br> a sample rate of 44.1kHz).&lt;br&gt;&lt;br&gt;I&#39;ve brought this problem= to the =3D<br> attention of The Mathworks. They confirmed the problem, which they =3D<br> attribute to a bug in their driver. &lt;br&gt;&lt;br&gt;The Mathworks also = informed =3D<br> me that the problem has been solved in their latest release (R2011b) for = =3D<br> playing using audioplayer, but not necessarily for the other audio =3D<br> commands. I&#39;ve confirmed this in very limited tests. &lt;br&gt;&lt;br&g= t;The =3D<br> following is a piece of code that you can use to observe the truncation. = =3D<br> It creates a 100-msec, 1-kHz sine wave, applies a hanning window, and =3D<b= r> then plays it first with zero-padding and then without. You should be =3D<b= r> able to hear the click at the end of the second tone, which is not =3D<br> present on the first. If not, you can see it on an =3D<br> oscilloscope.&lt;br&gt;&lt;br&gt;%%%%%%%%%%%%%%%%%%%%&lt;br&gt;fs =3D3D 441= 00;&lt;br&gt;f =3D3D =3D<br> 1000; &lt;br&gt;T =3D3D 0.1;&lt;br&gt;nPad =3D3D 2000;&lt;br&gt;&lt;br&gt;n= S =3D3D =3D<br> round(fs*T);&lt;br&gt;&lt;br&gt;y =3D3D sin(2.*pi*f/fs*(1:nS)&#39;);&lt;br&= gt;w =3D3D .5*(1 - =3D<br> cos(2*pi*(1:nS)&#39;/(nS+1)));&lt;br&gt;y =3D3D w.*y;&lt;br&gt;yPad =3D3D [= y; =3D<br> zeros(nPad,1)];&lt;br&gt;&lt;br&gt;wavplay(yPad, fs, =3D<br> &#39;sync&#39;)&lt;br&gt;pause(0.5)&lt;br&gt;wavplay(y, fs, =3D<br> &#39;sync&#39;)&lt;br&gt;%%%%%%%%%%%%%%%%%%%%%&lt;/span&gt;&lt;br&gt;&lt;br= &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;pre&gt;-- =3D<br> &lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;Patrick M. Zurek&lt;o:p&gt;&l= t;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;President =3D<br> &lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p= &gt;&lt;/pre&gt;&lt;pre&gt;Sensimetrics =3D<br> Corporation&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;14 Summer =3D<br> St.&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;Suite 403&lt;o:p&gt;&lt;/o= :p&gt;&lt;/pre&gt;&lt;pre&gt;Malden, MA =3D<br> 02148&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;Tel: 781-399-0858 =3D<br= > x237&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;Fax: 781-399-0853&lt;o:p&= gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;email: =3D<br> &lt;a =3D<br> href=3D3D&quot;mailto:<a href=3D"mailto:pat@xxxxxxxx">pat@xxxxxxxx</a>&quot= ;&gt;<a href=3D"mailto:pat@xxxxxxxx">pat@xxxxxxxx</a>&lt;/a&gt;&lt;o:p&gt;&= lt;/o:p&gt;&lt;/pre&gt;&lt;pre&gt;web: =3D<br> &lt;a =3D<br> href=3D3D&quot;<a href=3D"http://www.sens.com" target=3D"_blank">http://www= .sens.com</a>&quot;&gt;<a href=3D"http://www.sens.com" target=3D"_blank">ww= w.sens.com</a>&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;&lt;/div&gt;&lt;= /bod=3D<br> y&gt;&lt;/html&gt;<br> ------=3D_NextPart_000_0084_01CC8CB8.8AAFF440--<br> <br> ------------------------------<br> <br> Date: =A0 =A0Mon, 17 Oct 2011 11:28:33 -0400<br> From: =A0 =A0Joachim Thiemann &lt;<a href=3D"mailto:joachim.thiemann@xxxxxxxx= COM">joachim.thiemann@xxxxxxxx</a>&gt;<br> Subject: Re: Audio Glitch in Matlab<br> <br> On Mon, Oct 17, 2011 at 09:57, Patrick Zurek &lt;<a href=3D"mailto:pat@xxxxxxxx= .com">pat@xxxxxxxx</a>&gt; wrote:<br> &gt; I&#39;m writing to notify list readers of a problem playing audio usin= g Matlab.<br> <br> I don&#39;t know if the bug you&#39;re referring to is Windows-specific; bu= t<br> the &quot;sound&quot; command on Linux used to have ... issues. (possibly<b= r> related to the JVM and the OSS/ALSA/whatever is used now transition)<br> <br> I wrote a small almost trivial workaround (see<br> <a href=3D"http://signalsprocessed.blogspot.com/2011/02/playing-sounds-from= -matlab-on-unix.html" target=3D"_blank">http://signalsprocessed.blogspot.co= m/2011/02/playing-sounds-from-matlab-on-unix.html</a>)<br> that would simply write the sound to disk then play it from there:<br> <br> function [ ] =3D usound( w, fs )<br> %USOUND Plays sound on ALSA-based linux machines or macs<br> <br> if nargin &lt; 2<br> =A0 =A0fs =3D 16000;<br> end<br> <br> filename =3D [&#39;/tmp/&#39; getenv(&#39;USER&#39;) &#39;_matplay.wav&#39;= ];<br> wavwrite( w, fs, filename );<br> if ismac<br> =A0 =A0eval([&#39;!afplay &#39; filename &#39; &amp;&#39;]);<br> else<br> =A0 =A0eval([&#39;!aplay &#39; filename &#39; &amp;&#39;]);<br> end<br> <br> On a modern machine, the overhead is not perceptible: /tmp should be<br> in RAM anyways.<br> <br> Note this also doesn&#39;t block, so you can continue working while the<br> sound is playing (IIRC - this code is a bit old :-)<br> <br> Joe.<br> <br> --<br> Joachim Thiemann :: <a href=3D"http://www.tsp.ece.mcgill.ca/~jthiem1" targe= t=3D"_blank">http://www.tsp.ece.mcgill.ca/~jthiem1</a><br> <br> ------------------------------<br> <br> Date: =A0 =A0Mon, 17 Oct 2011 17:52:09 +0200<br> From: =A0 =A0&quot;Jelfs, Sam&quot; &lt;<a href=3D"mailto:sam.jelfs@xxxxxxxx= .COM">sam.jelfs@xxxxxxxx</a>&gt;<br> Subject: Re: Audio Glitch in Matlab<br> <br> --_000_E4FB19A270B2AE4E99E35D8BF51CEA3FC8FD0DCEFCNLCLUEXM03con_<br> Content-Type: text/plain; charset=3D&quot;iso-8859-1&quot;<br> Content-Transfer-Encoding: quoted-printable<br> <br> It is also possible to use PortAudio / pa_wavplay to make use of the ASIO4A= =3D<br> LL drivers with existing non-asio hardware.<br> <br> <a href=3D"http://www.portaudio.com/" target=3D"_blank">http://www.portaudi= o.com/</a><br> <a href=3D"http://www.mathworks.com/matlabcentral/fileexchange/4017" target= =3D"_blank">http://www.mathworks.com/matlabcentral/fileexchange/4017</a><br= > <a href=3D"http://www.asio4all.com/" target=3D"_blank">http://www.asio4all.= com/</a><br> <br> <br> Sam Jelfs<br> <br> From: AUDITORY - Research in Auditory Perception [mailto:<a href=3D"mailto:= AUDITORY@xxxxxxxx">AUDITORY@xxxxxxxx</a>=3D<br> <a href=3D"http://ILL.CA" target=3D"_blank">ILL.CA</a>] On Behalf Of Brian = FG Katz<br> Sent: Monday 17 October 2011 16:36<br> To: <a href=3D"mailto:AUDITORY@xxxxxxxx">AUDITORY@xxxxxxxx</a= ><br> Subject: Re: [AUDITORY] Audio Glitch in Matlab<br> <br> This bug is quite present in Windows. The solution is to not use the defaul= =3D<br> t system driver, but an ASIO supported soundcard. This is also recommended = =3D<br> for any sync play/rec situations, as the default Windows driver does not as= =3D<br> sure good or repeatable synchronization.<br> <br> -Brian FG Katz<br> --<br> Brian FG Katz, Ph.D<br> Audio &amp; Acoustique<br> LIMSI-CNRS<br> BP 133<br> F91403 Orsay<br> France<br> tel. (+33) 01 69 85 81 55<br> fax. (+33) 01.69.85.80.88<br> e-mail <a href=3D"mailto:Brian.Katz@xxxxxxxx">Brian.Katz@xxxxxxxx</a>&lt;ma= ilto:<a href=3D"mailto:Brian.Katz@xxxxxxxx">Brian.Katz@xxxxxxxx</a>&gt; &lt= ;mailto:<a href=3D"mailto:Brian.Katz@xxxxxxxx">Brian.Katz@xxxxxxxx</a>=3D<br> <a href=3D"http://imsi.fr" target=3D"_blank">imsi.fr</a>&gt;<br> web_theme: <a href=3D"http://www.limsi.fr/Scientifique/aa/thmsonesp/" targe= t=3D"_blank">http://www.limsi.fr/Scientifique/aa/thmsonesp/</a><br> web_group: <a href=3D"http://www.limsi.fr/Scientifique/aa/" target=3D"_blan= k">http://www.limsi.fr/Scientifique/aa/</a><br> <br> <br> <br> De : AUDITORY - Research in Auditory Perception [mailto:<a href=3D"mailto:A= UDITORY@xxxxxxxx">AUDITORY@xxxxxxxx</a>=3D<br> <a href=3D"http://LL.CA" target=3D"_blank">LL.CA</a>] De la part de Patrick= Zurek<br> Envoy=3DE9 : lundi 17 octobre 2011 09:57<br> =3DC0 : <a href=3D"mailto:AUDITORY@xxxxxxxx">AUDITORY@xxxxxxxx= A</a><br> Objet : [AUDITORY] Audio Glitch in Matlab<br> <br> I&#39;m writing to notify list readers of a problem playing audio using Mat= lab.<br> <br> The problem is that brief signals are truncated, and it happens using any o= =3D<br> f the common commands for playing audio (wavplay, sound, and the play metho= =3D<br> d of the audioplayer object).<br> <br> I can&#39;t specify the exact conditions under which the truncation occurs.= How=3D<br> ever, with a sample rate of 44.1 kHz, signals shorter than about 500 msec a= =3D<br> re truncated. I haven&#39;t looked much at other sample rates.<br> <br> A simple work-around for the problem is to pad the end of the signal with a= =3D<br> =A0sufficient number of zeros that truncation occurs during the zero segmen= t.=3D<br> =A0I&#39;ve found that at least 2000 zeros need to be added to assure no tr= uncati=3D<br> on of a 10-msec signal (with a sample rate of 44.1kHz).<br> <br> I&#39;ve brought this problem to the attention of The Mathworks. They confi= rmed=3D<br> =A0the problem, which they attribute to a bug in their driver.<br> <br> The Mathworks also informed me that the problem has been solved in their la= =3D<br> test release (R2011b) for playing using audioplayer, but not necessarily fo= =3D<br> r the other audio commands. I&#39;ve confirmed this in very limited tests.<= br> <br> The following is a piece of code that you can use to observe the truncation= =3D<br> . It creates a 100-msec, 1-kHz sine wave, applies a hanning window, and the= =3D<br> n plays it first with zero-padding and then without. You should be able to = =3D<br> hear the click at the end of the second tone, which is not present on the f= =3D<br> irst. If not, you can see it on an oscilloscope.<br> <br> %%%%%%%%%%%%%%%%%%%%<br> fs =3D3D 44100;<br> f =3D3D 1000;<br> T =3D3D 0.1;<br> nPad =3D3D 2000;<br> <br> nS =3D3D round(fs*T);<br> <br> y =3D3D sin(2.*pi*f/fs*(1:nS)&#39;);<br> w =3D3D .5*(1 - cos(2*pi*(1:nS)&#39;/(nS+1)));<br> y =3D3D w.*y;<br> yPad =3D3D [y; zeros(nPad,1)];<br> <br> wavplay(yPad, fs, &#39;sync&#39;)<br> pause(0.5)<br> wavplay(y, fs, &#39;sync&#39;)<br> %%%%%%%%%%%%%%%%%%%%%<br> <br> --<br> <br> Patrick M. Zurek<br> <br> President<br> <br> <br> <br> Sensimetrics Corporation<br> <br> 14 Summer St.<br> <br> Suite 403<br> <br> Malden, MA 02148<br> <br> Tel: 781-399-0858 x237<br> <br> Fax: 781-399-0853<br> <br> email: <a href=3D"mailto:pat@xxxxxxxx">pat@xxxxxxxx</a>&lt;mailto:<a href= =3D"mailto:pat@xxxxxxxx">pat@xxxxxxxx</a>&gt;<br> <br> web: <a href=3D"http://www.sens.com" target=3D"_blank">www.sens.com</a>&lt;= <a href=3D"http://www.sens.com" target=3D"_blank">http://www.sens.com</a>&g= t;<br> <br> ________________________________<br> The information contained in this message may be confidential and legally p= =3D<br> rotected under applicable law. The message is intended solely for the addre= =3D<br> ssee(s). If you are not the intended recipient, you are hereby notified tha= =3D<br> t any use, forwarding, dissemination, or reproduction of this message is st= =3D<br> rictly prohibited and may be unlawful. If you are not the intended recipien= =3D<br> t, please contact the sender by return e-mail and destroy all copies of the= =3D<br> =A0original message.<br> <br> --_000_E4FB19A270B2AE4E99E35D8BF51CEA3FC8FD0DCEFCNLCLUEXM03con_<br> Content-Type: text/html; charset=3D&quot;iso-8859-1&quot;<br> Content-Transfer-Encoding: quoted-printable<br> <br> &lt;html&gt;<br> &lt;head&gt;<br> &lt;meta http-equiv=3D3D&quot;Content-Type&quot; content=3D3D&quot;text/htm= l; charset=3D3Diso-8859-=3D<br> 1&quot;&gt;<br> &lt;meta name=3D3D&quot;Generator&quot; content=3D3D&quot;Microsoft Word 12= (filtered medium)&quot;&gt;<br> &lt;style&gt;&lt;!--<br> /* Font Definitions */<br> @xxxxxxxx<br> =A0 =A0 =A0 =A0{font-family:Wingdings;<br> =A0 =A0 =A0 =A0panose-1:5 0 0 0 0 0 0 0 0 0;}<br> @xxxxxxxx<br> =A0 =A0 =A0 =A0{font-family:Wingdings;<br> =A0 =A0 =A0 =A0panose-1:5 0 0 0 0 0 0 0 0 0;}<br> @xxxxxxxx<br> =A0 =A0 =A0 =A0{font-family:Calibri;<br> =A0 =A0 =A0 =A0panose-1:2 15 5 2 2 2 4 3 2 4;}<br> @xxxxxxxx<br> =A0 =A0 =A0 =A0{font-family:Tahoma;<br> =A0 =A0 =A0 =A0panose-1:2 11 6 4 3 5 4 4 2 4;}<br> @xxxxxxxx<br> =A0 =A0 =A0 =A0{font-family:Consolas;<br> =A0 =A0 =A0 =A0panose-1:2 11 6 9 2 2 4 3 2 4;}<br> /* Style Definitions */<br> p.MsoNormal, li.MsoNormal, div.MsoNormal<br> =A0 =A0 =A0 =A0{margin:0cm;<br> =A0 =A0 =A0 =A0margin-bottom:.0001pt;<br> =A0 =A0 =A0 =A0font-size:12.0pt;<br> =A0 =A0 =A0 =A0font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;<= br> =A0 =A0 =A0 =A0color:black;}<br> a:link, span.MsoHyperlink<br> =A0 =A0 =A0 =A0{mso-style-priority:99;<br> =A0 =A0 =A0 =A0color:blue;<br> =A0 =A0 =A0 =A0text-decoration:underline;}<br> a:visited, span.MsoHyperlinkFollowed<br> =A0 =A0 =A0 =A0{mso-style-priority:99;<br> =A0 =A0 =A0 =A0color:purple;<br> =A0 =A0 =A0 =A0text-decoration:underline;}<br> pre<br> =A0 =A0 =A0 =A0{mso-style-priority:99;<br> =A0 =A0 =A0 =A0mso-style-link:&quot;HTML Preformatted Char&quot;;<br> =A0 =A0 =A0 =A0margin:0cm;<br> =A0 =A0 =A0 =A0margin-bottom:.0001pt;<br> =A0 =A0 =A0 =A0font-size:10.0pt;<br> =A0 =A0 =A0 =A0font-family:&quot;Courier New&quot;;<br> =A0 =A0 =A0 =A0color:black;}<br> p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph<br> =A0 =A0 =A0 =A0{mso-style-priority:34;<br> =A0 =A0 =A0 =A0margin-top:0cm;<br> =A0 =A0 =A0 =A0margin-right:0cm;<br> =A0 =A0 =A0 =A0margin-bottom:0cm;<br> =A0 =A0 =A0 =A0margin-left:36.0pt;<br> =A0 =A0 =A0 =A0margin-bottom:.0001pt;<br> =A0 =A0 =A0 =A0font-size:12.0pt;<br> =A0 =A0 =A0 =A0font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;<= br> =A0 =A0 =A0 =A0color:black;}<br> span.HTMLPreformattedChar<br> =A0 =A0 =A0 =A0{mso-style-name:&quot;HTML Preformatted Char&quot;;<br> =A0 =A0 =A0 =A0mso-style-priority:99;<br> =A0 =A0 =A0 =A0mso-style-link:&quot;HTML Preformatted&quot;;<br> =A0 =A0 =A0 =A0font-family:Consolas;<br> =A0 =A0 =A0 =A0color:black;}<br> p.PrformatHTML, li.PrformatHTML, div.PrformatHTML<br> =A0 =A0 =A0 =A0{mso-style-name:&quot;Pr=3DE9format=3DE9 HTML&quot;;<br> =A0 =A0 =A0 =A0mso-style-link:&quot;Pr=3DE9format=3DE9 HTML Car&quot;;<br> =A0 =A0 =A0 =A0margin:0cm;<br> =A0 =A0 =A0 =A0margin-bottom:.0001pt;<br> =A0 =A0 =A0 =A0font-size:12.0pt;<br> =A0 =A0 =A0 =A0font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;<= br> =A0 =A0 =A0 =A0color:black;}<br> span.PrformatHTMLCar<br> =A0 =A0 =A0 =A0{mso-style-name:&quot;Pr=3DE9format=3DE9 HTML Car&quot;;<br= > =A0 =A0 =A0 =A0mso-style-priority:99;<br> =A0 =A0 =A0 =A0mso-style-link:&quot;Pr=3DE9format=3DE9 HTML&quot;;<br> =A0 =A0 =A0 =A0font-family:Consolas;<br> =A0 =A0 =A0 =A0color:black;}<br> span.EmailStyle21<br> =A0 =A0 =A0 =A0{mso-style-type:personal;<br> =A0 =A0 =A0 =A0font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;<br> =A0 =A0 =A0 =A0color:#1F497D;}<br> span.EmailStyle22<br> =A0 =A0 =A0 =A0{mso-style-type:personal-reply;<br> =A0 =A0 =A0 =A0font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;<br> =A0 =A0 =A0 =A0color:#1F497D;}<br> .MsoChpDefault<br> =A0 =A0 =A0 =A0{mso-style-type:export-only;<br> =A0 =A0 =A0 =A0font-size:10.0pt;}<br> @xxxxxxxx WordSection1<br> =A0 =A0 =A0 =A0{size:612.0pt 792.0pt;<br> =A0 =A0 =A0 =A0margin:70.85pt 70.85pt 70.85pt 70.85pt;}<br> div.WordSection1<br> =A0 =A0 =A0 =A0{page:WordSection1;}<br> /* List Definitions */<br> @xxxxxxxx l0<br> =A0 =A0 =A0 =A0{mso-list-id:926965819;<br> =A0 =A0 =A0 =A0mso-list-type:hybrid;<br> =A0 =A0 =A0 =A0mso-list-template-ids:344066808 1943972264 67698691 6769869= 3 67698689 6769=3D<br> 8691 67698693 67698689 67698691 67698693;}<br> @xxxxxxxx l0:level1<br> =A0 =A0 =A0 =A0{mso-level-start-at:0;<br> =A0 =A0 =A0 =A0mso-level-number-format:bullet;<br> =A0 =A0 =A0 =A0mso-level-text:-;<br> =A0 =A0 =A0 =A0mso-level-tab-stop:none;<br> =A0 =A0 =A0 =A0mso-level-number-position:left;<br> =A0 =A0 =A0 =A0text-indent:-18.0pt;<br> =A0 =A0 =A0 =A0font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;<br> =A0 =A0 =A0 =A0mso-fareast-font-family:Calibri;<br> =A0 =A0 =A0 =A0mso-bidi-font-family:&quot;Times New Roman&quot;;}<br> ol<br> =A0 =A0 =A0 =A0{margin-bottom:0cm;}<br> ul<br> =A0 =A0 =A0 =A0{margin-bottom:0cm;}<br> --&gt;&lt;/style&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;<br> &lt;o:shapedefaults v:ext=3D3D&quot;edit&quot; spidmax=3D3D&quot;1026&quot;= /&gt;<br> &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;<br> &lt;o:shapelayout v:ext=3D3D&quot;edit&quot;&gt;<br> &lt;o:idmap v:ext=3D3D&quot;edit&quot; data=3D3D&quot;1&quot; /&gt;<br> &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;<br> &lt;/head&gt;<br> &lt;body bgcolor=3D3D&quot;white&quot; lang=3D3D&quot;EN-US&quot; link=3D3D= &quot;blue&quot; vlink=3D3D&quot;purple&quot;&gt;<br> &lt;div class=3D3D&quot;WordSection1&quot;&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size= :11.0pt;font-family:&amp;quot;Ca=3D<br> libri&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;It is= also possible to us=3D<br> e PortAudio / pa_wavplay to make use of the ASIO4ALL drivers with existing = =3D<br> non-asio hardware.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size= :11.0pt;font-family:&amp;quot;Ca=3D<br> libri&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;&lt;o= :p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;=3D<br> /p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;a href=3D3D&quot;<a href=3D"ht= tp://www.portaudio.com/" target=3D"_blank">http://www.portaudio.com/</a>&qu= ot;&gt;<a href=3D"http://www.por" target=3D"_blank">http://www.por</a>=3D<b= r> <a href=3D"http://taudio.com/" target=3D"_blank">taudio.com/</a>&lt;/a&gt;&= lt;span style=3D3D&quot;font-size:11.0pt;font-family:&amp;quot;Calibri&amp;= qu=3D<br> ot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;&lt;o:p&gt;&lt;/o= :p&gt;&lt;/span&gt;&lt;/p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;a href=3D3D&quot;<a href=3D"ht= tp://www.mathworks.com/matlabcentral/fi=3D leexchange/4017" target=3D"_blank">http://www.mathworks.com/matlabcentral/f= i=3D<br> leexchange/4017</a>&quot;&gt;<a href=3D"http://www.mathworks.com/matlabcent= ral/fileexchange/4017" target=3D"_blank">http://www.mathworks.com/matlabcen= tral/fileexchange/4017</a>&lt;/=3D<br> a&gt;&lt;span style=3D3D&quot;font-size:11.0pt;font-family:&amp;quot;Calibr= i&amp;quot;,&amp;quot;san=3D<br> s-serif&amp;quot;;color:#1F497D&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&g= t;&lt;/p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;a href=3D3D&quot;<a href=3D"ht= tp://www.asio4all.com/" target=3D"_blank">http://www.asio4all.com/</a>&quot= ;&gt;<a href=3D"http://www.asio" target=3D"_blank">http://www.asio</a>=3D<b= r> <a href=3D"http://4all.com/" target=3D"_blank">4all.com/</a>&lt;/a&gt;&lt;s= pan style=3D3D&quot;font-size:11.0pt;font-family:&amp;quot;Calibri&amp;quot= =3D<br> ;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;&lt;o:p&gt;&lt;/o:p= &gt;&lt;/span&gt;&lt;/p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size= :11.0pt;font-family:&amp;quot;Ca=3D<br> libri&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;&lt;o= :p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;=3D<br> /p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size= :11.0pt;font-family:&amp;quot;Ca=3D<br> libri&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;&lt;o= :p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;=3D<br> /p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size= :11.0pt;font-family:&amp;quot;Ca=3D<br> libri&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;Sam J= elfs&lt;o:p&gt;&lt;/o:p&gt;&lt;/spa=3D<br> n&gt;&lt;/p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size= :11.0pt;font-family:&amp;quot;Ca=3D<br> libri&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;&lt;o= :p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;=3D<br> /p&gt;<br> &lt;div&gt;<br> &lt;div style=3D3D&quot;border:none;border-top:solid #B5C4DF 1.0pt;padding:= 3.0pt 0cm =3D<br> 0cm 0cm&quot;&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=3D3D&quot;= font-size:10.0pt;font-family:&amp;quot=3D<br> ;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:windowtext&quot;&gt;= From:&lt;/span&gt;&lt;/b&gt;&lt;spa=3D<br> n style=3D3D&quot;font-size:10.0pt;font-family:&amp;quot;Tahoma&amp;quot;,&= amp;quot;sans-serif=3D<br> &amp;quot;;color:windowtext&quot;&gt; AUDITORY - Research in Auditory Perce= ption [mailt=3D<br> <a href=3D"mailto:o%3AAUDITORY@xxxxxxxx">o:AUDITORY@xxxxxxxx<= /a>]<br> &lt;b&gt;On Behalf Of &lt;/b&gt;Brian FG Katz&lt;br&gt;<br> &lt;b&gt;Sent:&lt;/b&gt; Monday 17 October 2011 16:36&lt;br&gt;<br> &lt;b&gt;To:&lt;/b&gt; <a href=3D"mailto:AUDITORY@xxxxxxxx">AUDITORY= @xxxxxxxx</a>&lt;br&gt;<br> &lt;b&gt;Subject:&lt;/b&gt; Re: [AUDITORY] Audio Glitch in Matlab&lt;o:p&gt= ;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;<br> &lt;/div&gt;<br> &lt;/div&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&= lt;/p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size= :11.0pt;font-family:&amp;quot;Ca=3D<br> libri&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;This = bug is quite present=3D<br> =A0in Windows. The solution is to not use the default system driver, but an= A=3D<br> SIO supported soundcard. This is also recommended for any<br> =A0sync play/rec situations, as the default Windows driver does not assure = go=3D<br> od or repeatable synchronization.<br> &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size= :11.0pt;font-family:&amp;quot;Ca=3D<br> libri&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;&lt;o= :p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;=3D<br> /p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size= :11.0pt;font-family:&amp;quot;Ca=3D<br> libri&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;-Bria= n FG Katz&lt;o:p&gt;&lt;/o:p&gt;=3D<br> &lt;/span&gt;&lt;/p&gt;<br> &lt;div&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span lang=3D3D&quot;FR&quot; s= tyle=3D3D&quot;font-size:10.0pt;font-fam=3D<br> ily:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&= quot;&gt;--&lt;o:p&gt;&lt;/o:p&gt;&lt;/=3D<br> span&gt;&lt;/p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span lang=3D3D&quot;FR&quot; s= tyle=3D3D&quot;font-size:10.0pt;font-fam=3D<br> ily:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&= quot;&gt;Brian FG Katz, =3D<br> Ph.D&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span lang=3D3D&quot;FR&quot; s= tyle=3D3D&quot;font-size:10.0pt;font-fam=3D<br> ily:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&= quot;&gt;Audio &amp;amp; Aco=3D<br> ustique&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size= :10.0pt;font-family:&amp;quot;Ar=3D<br> ial&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;LIMSI-C= NRS&lt;o:p&gt;&lt;/o:p&gt;&lt;/span=3D<br> &gt;&lt;/p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size= :10.0pt;font-family:&amp;quot;Ar=3D<br> ial&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;BP 133&= lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p=3D<br> &gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size= :10.0pt;font-family:&amp;quot;Ar=3D<br> ial&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;F91403 = Orsay&lt;o:p&gt;&lt;/o:p&gt;&lt;/sp=3D<br> an&gt;&lt;/p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size= :10.0pt;font-family:&amp;quot;Ar=3D<br> ial&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;France&= lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p=3D<br> &gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size= :10.0pt;font-family:&amp;quot;Ar=3D<br> ial&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;tel. (&= amp;#43;33) 01 69 85 81 =3D<br> 55&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size= :10.0pt;font-family:&amp;quot;Ar=3D<br> ial&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;fax. (&= amp;#43;33) 01.69.85.80.=3D<br> 88&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size= :10.0pt;font-family:&amp;quot;Ar=3D<br> ial&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;e-mail<= br> &lt;/span&gt;&lt;span lang=3D3D&quot;FR&quot; style=3D3D&quot;font-size:10.= 0pt;font-family:&amp;quot;Arial&amp;=3D<br> quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;&lt;a href=3D3D= &quot;mailto:<a href=3D"mailto:Brian.Katz@xxxxxxxx">Brian.Katz@xxxxxxxx</a>=3D<br> <a href=3D"http://msi.fr" target=3D"_blank">msi.fr</a>&quot;&gt;&lt;span la= ng=3D3D&quot;EN-US&quot;&gt;<a href=3D"mailto:Brian.Katz@xxxxxxxx">Brian.Ka= tz@xxxxxxxx</a>&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span sty=3D<br> le=3D3D&quot;font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;qu= ot;sans-serif&amp;quot;=3D<br> ;color:#1F497D&quot;&gt;<br> =A0&amp;lt;&lt;/span&gt;&lt;span lang=3D3D&quot;FR&quot; style=3D3D&quot;fo= nt-size:10.0pt;font-family:&amp;quot;A=3D<br> rial&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;&lt;a = href=3D3D&quot;mailto:<a href=3D"mailto:Brian.Ka">Brian.Ka</a>=3D<br> <a href=3D"mailto:tz@xxxxxxxx">tz@xxxxxxxx</a>&quot;&gt;&lt;span lang=3D3D&= quot;EN-US&quot;&gt;mailto:<a href=3D"mailto:Brian.Katz@xxxxxxxx">Brian.Kat= z@xxxxxxxx</a>&lt;/span&gt;&lt;/a&gt;&lt;/sp=3D<br> an&gt;&lt;span style=3D3D&quot;font-size:10.0pt;font-family:&amp;quot;Arial= &amp;quot;,&amp;quot;sans=3D<br> -serif&amp;quot;;color:#1F497D&quot;&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;= /span&gt;&lt;/p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size= :10.0pt;font-family:&amp;quot;Ar=3D<br> ial&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;web_the= me:<br> &lt;/span&gt;&lt;span lang=3D3D&quot;FR&quot; style=3D3D&quot;font-size:10.= 0pt;font-family:&amp;quot;Arial&amp;=3D<br> quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;&lt;a href=3D3D= &quot;<a href=3D"http://www.limsi.fr/=3D Scientifique/aa/thmsonesp/" target=3D"_blank">http://www.limsi.fr/=3D<br> Scientifique/aa/thmsonesp/</a>&quot;&gt;&lt;span lang=3D3D&quot;EN-US&quot;= &gt;<a href=3D"http://www.limsi.fr/Scient=3D ifique/aa/thmsonesp/" target=3D"_blank">http://www.limsi.fr/Scient=3D<br> ifique/aa/thmsonesp/</a>&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style= =3D3D&quot;font-size:10.0pt;font-=3D<br> family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#1F49= 7D&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;=3D<br> /span&gt;&lt;/p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size= :10.0pt;font-family:&amp;quot;Ar=3D<br> ial&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;web_gro= up:<br> &lt;/span&gt;&lt;span lang=3D3D&quot;FR&quot; style=3D3D&quot;font-size:10.= 0pt;font-family:&amp;quot;Arial&amp;=3D<br> quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;&lt;a href=3D3D= &quot;<a href=3D"http://www.limsi.fr/=3D Scientifique/aa/" target=3D"_blank">http://www.limsi.fr/=3D<br> Scientifique/aa/</a>&quot;&gt;&lt;span lang=3D3D&quot;EN-US&quot;&gt;<a hre= f=3D"http://www.limsi.fr/Scientifique/aa/=3D" target=3D"_blank">http://www.= limsi.fr/Scientifique/aa/=3D</a><br> &lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style=3D3D&quot;font-size:10.0= pt;font-family:&amp;quot;Arial&amp;q=3D<br> uot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;&lt;o:p&gt;&lt;/= o:p&gt;&lt;/span&gt;&lt;/p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size= :10.0pt;font-family:&amp;quot;Ar=3D<br> ial&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;&lt;o:p= &gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p=3D<br> &gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size= :10.0pt;font-family:&amp;quot;Ar=3D<br> ial&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;&lt;o:p= &gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p=3D<br> &gt;<br> &lt;/div&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size= :11.0pt;font-family:&amp;quot;Ca=3D<br> libri&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#1F497D&quot;&gt;&lt;o= :p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;=3D<br> /p&gt;<br> &lt;div&gt;<br> &lt;div style=3D3D&quot;border:none;border-top:solid #B5C4DF 1.0pt;padding:= 3.0pt 0cm =3D<br> 0cm 0cm&quot;&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=3D3D&quot;F= R&quot; style=3D3D&quot;font-size:10.0pt;font-=3D<br> family:&amp;quot;Tahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:wind= owtext&quot;&gt;De&amp;nbsp;=3D<br> :&lt;/span&gt;&lt;/b&gt;&lt;span lang=3D3D&quot;FR&quot; style=3D3D&quot;fo= nt-size:10.0pt;font-family:&amp;quot;T=3D<br> ahoma&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:windowtext&quot;&gt; A= UDITORY - Research i=3D<br> n Auditory Perception<br> =A0[mailto:<a href=3D"mailto:AUDITORY@xxxxxxxx">AUDITORY@xxxxxxxx= L.CA</a>] &lt;b&gt;De la part de&lt;/b&gt; Patrick Zurek&lt;br&gt;<br> &lt;b&gt;Envoy=3DE9&amp;nbsp;:&lt;/b&gt; lundi 17 octobre 2011 09:57&lt;br&= gt;<br> &lt;b&gt;=3DC0&amp;nbsp;:&lt;/b&gt; <a href=3D"mailto:AUDITORY@xxxxxxxx= .CA">AUDITORY@xxxxxxxx</a>&lt;br&gt;<br> &lt;b&gt;Objet&amp;nbsp;:&lt;/b&gt; [AUDITORY] Audio Glitch in Matlab&lt;o:= p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;<br> &lt;/div&gt;<br> &lt;/div&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&= lt;/p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot; style=3D3D&quot;margin-bottom:12.0pt&= quot;&gt;&lt;span style=3D3D&quot;font-f=3D<br> amily:&amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;&quot;&gt;I= &#39;m writing to notify lis=3D<br> t readers of a problem playing audio using Matlab.<br> &lt;br&gt;<br> &lt;br&gt;<br> The problem is that brief signals are truncated, and it happens using any o= =3D<br> f the common commands for playing audio (wavplay, sound, and the play metho= =3D<br> d of the audioplayer object).&lt;br&gt;<br> &lt;br&gt;<br> I can&#39;t specify the exact conditions under which the truncation occurs.= How=3D<br> ever, with a sample rate of 44.1 kHz, signals shorter than about 500 msec a= =3D<br> re truncated. I haven&#39;t looked much at other sample rates.&lt;br&gt;<br= > &lt;br&gt;<br> A simple work-around for the problem is to pad the end of the signal with a= =3D<br> =A0sufficient number of zeros that truncation occurs during the zero segmen= t.=3D<br> =A0I&#39;ve found that at least 2000 zeros need to be added to assure no tr= uncati=3D<br> on of a 10-msec signal (with a sample<br> =A0rate of 44.1kHz).&lt;br&gt;<br> &lt;br&gt;<br> I&#39;ve brought this problem to the attention of The Mathworks. They confi= rmed=3D<br> =A0the problem, which they attribute to a bug in their driver.<br> &lt;br&gt;<br> &lt;br&gt;<br> The Mathworks also informed me that the problem has been solved in their la= =3D<br> test release (R2011b) for playing using audioplayer, but not necessarily fo= =3D<br> r the other audio commands. I&#39;ve confirmed this in very limited tests.<= br> &lt;br&gt;<br> &lt;br&gt;<br> The following is a piece of code that you can use to observe the truncation= =3D<br> . It creates a 100-msec, 1-kHz sine wave, applies a hanning window, and the= =3D<br> n plays it first with zero-padding and then without. You should be able to = =3D<br> hear the click at the end of the<br> =A0second tone, which is not present on the first. If not, you can see it o= n =3D<br> an oscilloscope.&lt;br&gt;<br> &lt;br&gt;<br> %%%%%%%%%%%%%%%%%%%%&lt;br&gt;<br> fs =3D3D 44100;&lt;br&gt;<br> f =3D3D 1000; &lt;br&gt;<br> T =3D3D 0.1;&lt;br&gt;<br> nPad =3D3D 2000;&lt;br&gt;<br> &lt;br&gt;<br> nS =3D3D round(fs*T);&lt;br&gt;<br> &lt;br&gt;<br> y =3D3D sin(2.*pi*f/fs*(1:nS)&#39;);&lt;br&gt;<br> w =3D3D .5*(1 - cos(2*pi*(1:nS)&#39;/(nS&amp;#43;1)));&lt;br&gt;<br> y =3D3D w.*y;&lt;br&gt;<br> yPad =3D3D [y; zeros(nPad,1)];&lt;br&gt;<br> &lt;br&gt;<br> wavplay(yPad, fs, &#39;sync&#39;)&lt;br&gt;<br> pause(0.5)&lt;br&gt;<br> wavplay(y, fs, &#39;sync&#39;)&lt;br&gt;<br> %%%%%%%%%%%%%%%%%%%%%&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;<br> &lt;pre&gt;-- &lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;<br> &lt;pre&gt;Patrick M. Zurek&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;<br> &lt;pre&gt;President &lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;<br> &lt;pre&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/pre&gt;<br> &lt;pre&gt;Sensimetrics Corporation&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;<br> &lt;pre&gt;14 Summer St.&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;<br> &lt;pre&gt;Suite 403&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;<br> &lt;pre&gt;Malden, MA 02148&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;<br> &lt;pre&gt;Tel: 781-399-0858 x237&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;<br> &lt;pre&gt;Fax: 781-399-0853&lt;o:p&gt;&lt;/o:p&gt;&lt;/pre&gt;<br> &lt;pre&gt;email: &lt;a href=3D3D&quot;mailto:<a href=3D"mailto:pat@xxxxxxxx= m">pat@xxxxxxxx</a>&quot;&gt;<a href=3D"mailto:pat@xxxxxxxx">pat@xxxxxxxx</= a>&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/pr=3D<br> e&gt;<br> &lt;pre&gt;web: &lt;a href=3D3D&quot;<a href=3D"http://www.sens.com" target= =3D"_blank">http://www.sens.com</a>&quot;&gt;<a href=3D"http://www.sens.com= " target=3D"_blank">www.sens.com</a>&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p= re&gt;<br> &lt;/div&gt;<br> &lt;br&gt;<br> &lt;hr&gt;<br> &lt;font face=3D3D&quot;Arial&quot; color=3D3D&quot;Gray&quot; size=3D3D&qu= ot;1&quot;&gt;The information contained in=3D<br> =A0this message may be confidential and legally protected under applicable = la=3D<br> w. The message is intended solely for the addressee(s). If you are not the = =3D<br> intended recipient, you are hereby notified<br> =A0that any use, forwarding, dissemination, or reproduction of this message= i=3D<br> s strictly prohibited and may be unlawful. If you are not the intended reci= =3D<br> pient, please contact the sender by return e-mail and destroy all copies of= =3D<br> =A0the original message.&lt;br&gt;<br> &lt;/font&gt;<br> &lt;/body&gt;<br> &lt;/html&gt;<br> <br> --_000_E4FB19A270B2AE4E99E35D8BF51CEA3FC8FD0DCEFCNLCLUEXM03con_--<br> <br> ------------------------------<br> <br> Date: =A0 =A0Mon, 17 Oct 2011 17:21:23 +0100<br> From: =A0 =A0Etienne Gaudrain &lt;<a href=3D"mailto:egaudrain.cam@xxxxxxxx= ">egaudrain.cam@xxxxxxxx</a>&gt;<br> Subject: Re: Audio Glitch in Matlab<br> <br> --0015175d03cc7857e604af80ffa9<br> Content-Type: text/plain; charset=3DUTF-8<br> Content-Transfer-Encoding: quoted-printable<br> <br> Hi,<br> <br> We also had some clicking and truncating issues when using directly the<br> default (WDM) Windows audio drivers.<br> Like Brian we solved the problem by using ASIO drivers. You can tap directl= =3D<br> y<br> into the ASIO drivers from Matlab using the Playrec (<br> <a href=3D"http://www.playrec.co.uk/" target=3D"_blank">http://www.playrec.= co.uk/</a>) toolbox, based on Portaudio (the audio library<br> behind Audacity).<br> <br> And most to our astonishment we discovered that we only needed to initializ= =3D<br> e<br> the card using Playrec, and then everything was fine even when using the<br= > standard Matlab functions (sound, audioplay...).<br> <br> So basically, we do:<br> playrec(&#39;init&#39;, 44100, 1, -1);<br> <br> Then we can call sound(x, fs)... etc... with no clicking and no<br> truncating...<br> <br> Maybe the ASIO driver sets the card in a state that is more sensible than<b= r> the default state set by the WDM, like putting sensible buffer lengths...<b= r> something like that.<br> <br> The trick works on Windows XP with even older versions of Matlab, and with<= br> E-MU and Asus sound cards.<br> Haven&#39;t tried on Windows 7, and this is probably different as the sound= <br> system is different.<br> <br> -Etienne<br> <br> --=3D20<br> Etienne Gaudrain, PhD<br> MRC Cognition and Brain Sciences Unit<br> 15 Chaucer Road<br> Cambridge, CB2 7EF<br> United-Kingdom<br> +44 1223 355 294, ext. 645<br> <br> <br> On 17 October 2011 15:35, Brian FG Katz &lt;<a href=3D"mailto:brian.katz@xxxxxxxx= msi.fr">brian.katz@xxxxxxxx</a>&gt; wrote:<br> <br> &gt; This bug is quite present in Windows. The solution is to not use the<b= r> &gt; default system driver, but an ASIO supported soundcard. This is also<b= r> &gt; recommended for any sync play/rec situations, as the default Windows d= riv=3D<br> er<br> &gt; does not assure good or repeatable synchronization. ****<br> &gt;<br> &gt; ** **<br> &gt;<br> &gt; -Brian FG Katz****<br> &gt;<br> &gt; --****<br> &gt;<br> &gt; Brian FG Katz, Ph.D****<br> &gt;<br> &gt; Audio &amp; Acoustique****<br> &gt;<br> &gt; LIMSI-CNRS****<br> &gt;<br> &gt; BP 133****<br> &gt;<br> &gt; F91403 Orsay****<br> &gt;<br> &gt; France****<br> &gt;<br> &gt; tel. (+33) 01 69 85 81 55****<br> &gt;<br> &gt; fax. (+33) 01.69.85.80.88****<br> &gt;<br> &gt; e-mail <a href=3D"mailto:Brian.Katz@xxxxxxxx">Brian.Katz@xxxxxxxx</a> = &lt;mailto:<a href=3D"mailto:Brian.Katz@xxxxxxxx">Brian.Katz@xxxxxxxx</a>&l= t;Brian.Katz@xxxxxxxx=3D<br> r&gt;<br> &gt; &gt;****<br> &gt;<br> &gt; web_theme: <a href=3D"http://www.limsi.fr/Scientifique/aa/thmsonesp/**= **" target=3D"_blank">http://www.limsi.fr/Scientifique/aa/thmsonesp/****</a= ><br> &gt;<br> &gt; web_group: <a href=3D"http://www.limsi.fr/Scientifique/aa/****" target= =3D"_blank">http://www.limsi.fr/Scientifique/aa/****</a><br> &gt;<br> &gt; ** **<br> &gt;<br> &gt; ** **<br> &gt;<br> &gt; ** **<br> &gt;<br> &gt; *De :* AUDITORY - Research in Auditory Perception [mailto:<br> &gt; <a href=3D"mailto:AUDITORY@xxxxxxxx">AUDITORY@xxxxxxxx</= a>] *De la part de* Patrick Zurek<br> &gt; *Envoy=3DC3=3DA9 :* lundi 17 octobre 2011 09:57<br> &gt; *=3DC3=3D80 :* <a href=3D"mailto:AUDITORY@xxxxxxxx">AUDITORY@xxxxxxxx= STS.MCGILL.CA</a><br> &gt; *Objet :* [AUDITORY] Audio Glitch in Matlab****<br> &gt;<br> &gt; ** **<br> &gt;<br> &gt; I&#39;m writing to notify list readers of a problem playing audio usin= g Matla=3D<br> b.<br> &gt;<br> &gt;<br> &gt; The problem is that brief signals are truncated, and it happens using = any<br> &gt; of the common commands for playing audio (wavplay, sound, and the play= <br> &gt; method of the audioplayer object).<br> &gt;<br> &gt; I can&#39;t specify the exact conditions under which the truncation oc= curs.<br> &gt; However, with a sample rate of 44.1 kHz, signals shorter than about 50= 0 m=3D<br> sec<br> &gt; are truncated. I haven&#39;t looked much at other sample rates.<br> &gt;<br> &gt; A simple work-around for the problem is to pad the end of the signal w= ith=3D<br> =A0a<br> &gt; sufficient number of zeros that truncation occurs during the zero segm= ent=3D<br> .<br> &gt; I&#39;ve found that at least 2000 zeros need to be added to assure no = truncat=3D<br> ion<br> &gt; of a 10-msec signal (with a sample rate of 44.1kHz).<br> &gt;<br> &gt; I&#39;ve brought this problem to the attention of The Mathworks. They = confirm=3D<br> ed<br> &gt; the problem, which they attribute to a bug in their driver.<br> &gt;<br> &gt; The Mathworks also informed me that the problem has been solved in the= ir<br> &gt; latest release (R2011b) for playing using audioplayer, but not necessa= ril=3D<br> y<br> &gt; for the other audio commands. I&#39;ve confirmed this in very limited = tests.<br> &gt;<br> &gt; The following is a piece of code that you can use to observe the<br> &gt; truncation. It creates a 100-msec, 1-kHz sine wave, applies a hanning<= br> &gt; window, and then plays it first with zero-padding and then without. Yo= u<br> &gt; should be able to hear the click at the end of the second tone, which = is =3D<br> not<br> &gt; present on the first. If not, you can see it on an oscilloscope.<br> &gt;<br> &gt; %%%%%%%%%%%%%%%%%%%%<br> &gt; fs =3D3D 44100;<br> &gt; f =3D3D 1000;<br> &gt; T =3D3D 0.1;<br> &gt; nPad =3D3D 2000;<br> &gt;<br> &gt; nS =3D3D round(fs*T);<br> &gt;<br> &gt; y =3D3D sin(2.*pi*f/fs*(1:nS)&#39;);<br> &gt; w =3D3D .5*(1 - cos(2*pi*(1:nS)&#39;/(nS+1)));<br> &gt; y =3D3D w.*y;<br> &gt; yPad =3D3D [y; zeros(nPad,1)];<br> &gt;<br> &gt; wavplay(yPad, fs, &#39;sync&#39;)<br> &gt; pause(0.5)<br> &gt; wavplay(y, fs, &#39;sync&#39;)<br> &gt; %%%%%%%%%%%%%%%%%%%%%<br> &gt;<br> &gt; ****<br> &gt;<br> &gt; -- ****<br> &gt;<br> &gt; Patrick M. Zurek****<br> &gt;<br> &gt; President ****<br> &gt;<br> &gt; ** **<br> &gt;<br> &gt; Sensimetrics Corporation****<br> &gt;<br> &gt; 14 Summer St.****<br> &gt;<br> &gt; Suite 403****<br> &gt;<br> &gt; Malden, MA 02148****<br> &gt;<br> &gt; Tel: 781-399-0858 x237****<br> &gt;<br> &gt; Fax: 781-399-0853****<br> &gt;<br> &gt; email: <a href=3D"mailto:pat@xxxxxxxx">pat@xxxxxxxx</a>****<br> &gt;<br> &gt; web: <a href=3D"http://www.sens.com" target=3D"_blank">www.sens.com</a= >****<br> &gt;<br> &gt;<br> <br> --0015175d03cc7857e604af80ffa9<br> Content-Type: text/html; charset=3DUTF-8<br> Content-Transfer-Encoding: quoted-printable<br> <br> &lt;span class=3D3D&quot;Apple-style-span&quot; style=3D3D&quot;color: rgb(= 80, 0, 80); font-famil=3D<br> y: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255)= =3D<br> ; &quot;&gt;Hi,=3DC2=3DA0&lt;br&gt;&lt;br&gt;We also had some clicking and = truncating issues when u=3D<br> sing directly the default (WDM) Windows audio drivers.=3DC2=3DA0&lt;br&gt;<= br> Like Brian we solved the problem by using ASIO drivers. You can tap directl= =3D<br> y into the ASIO drivers from Matlab using the Playrec (&lt;a href=3D3D&quot= ;<a href=3D"http://ww" target=3D"_blank">http://ww</a>=3D<br> <a href=3D"http://w.playrec.co.uk/" target=3D"_blank">w.playrec.co.uk/</a>&= quot; target=3D3D&quot;_blank&quot; style=3D3D&quot;color: rgb(0, 0, 204); = &quot;&gt;http:=3D<br> //<a href=3D"http://www.playrec.co.uk/" target=3D"_blank">www.playrec.co.uk= /</a>&lt;/a&gt;) toolbox, based on Portaudio (the audio library be=3D<br> hind Audacity).=3DC2=3DA0&lt;br&gt;<br> &lt;div class=3D3D&quot;im&quot; style=3D3D&quot;color: rgb(80, 0, 80); &qu= ot;&gt;&lt;br&gt;And most to our ast=3D<br> onishment we discovered that we only needed to initialize the card using Pl= =3D<br> ayrec, and then everything was fine even when using the standard Matlab fun= =3D<br> ctions (sound, audioplay...).=3DC2=3DA0&lt;br&gt;<br> &lt;br&gt;So basically, we do:=3DC2=3DA0&lt;br&gt;playrec(&amp;#39;init&amp= ;#39;, 44100, 1, -1);=3DC2=3D<br> =3DA0&lt;br&gt;&lt;br&gt;Then we can call sound(x, fs)... etc... with no cl= icking and no =3D<br> truncating...=3DC2=3DA0&lt;br&gt;&lt;br&gt;Maybe the ASIO driver sets the c= ard in a state t=3D<br> hat is more sensible than the default state set by the WDM, like putting se= =3D<br> nsible buffer lengths... something like that.=3DC2=3DA0&lt;br&gt;<br> &lt;br&gt;The trick works on Windows XP with even older versions of Matlab,= and w=3D<br> ith E-MU and Asus sound cards.=3DC2=3DA0&lt;br&gt;Haven&amp;#39;t tried on = Windows 7, and=3D<br> =A0this is probably different as the sound system is different.=3DC2=3DA0&l= t;br&gt;&lt;br&gt;=3D<br> -Etienne=3DC2=3DA0&lt;br&gt;<br> &lt;br&gt;&lt;div&gt;&lt;span&gt;--=3DC2=3DA0&lt;br&gt;&lt;/span&gt;Etienne= Gaudrain, PhD&lt;br&gt;MRC Cognition an=3D<br> d Brain Sciences Unit&lt;br&gt;15 Chaucer Road&lt;br&gt;Cambridge, CB2 7EF&= lt;br&gt;United-Ki=3D<br> ngdom&lt;br&gt;&lt;a href=3D3D&quot;tel:%2B44%201223%20355%20294%2C%20ext.%= 20645&quot; value=3D3D&quot;=3D<br> +441223355294&quot; target=3D3D&quot;_blank&quot; style=3D3D&quot;color: rg= b(0, 0, 204); &quot;&gt;+44 1223=3D<br> =A0355 294, ext. 645&lt;/a&gt;=3DC2=3DA0&lt;br&gt;<br> &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;b= r&gt;&lt;div class=3D3D&quot;gmail_quote&quot;&gt;On 17 Octo=3D<br> ber 2011 15:35, Brian FG Katz &lt;span dir=3D3D&quot;ltr&quot;&gt;&amp;lt;&= lt;a href=3D3D&quot;mailto:<a href=3D"mailto:brian">brian</a>=3D<br> .<a href=3D"mailto:katz@xxxxxxxx">katz@xxxxxxxx</a>&quot;&gt;<a href=3D"mai= lto:brian.katz@xxxxxxxx">brian.katz@xxxxxxxx</a>&lt;/a&gt;&amp;gt;&lt;/span= &gt; wrote:&lt;br&gt;&lt;blockquote cl=3D<br> ass=3D3D&quot;gmail_quote&quot; style=3D3D&quot;margin:0 0 0 .8ex;border-le= ft:1px #ccc solid;p=3D<br> adding-left:1ex;&quot;&gt;<br> <br> &lt;div bgcolor=3D3D&quot;white&quot; lang=3D3D&quot;EN-US&quot; link=3D3D&= quot;blue&quot; vlink=3D3D&quot;purple&quot;&gt;&lt;div&gt;&lt;=3D<br> p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size:11.= 0pt;color:#1F497D&quot;&gt;This b=3D<br> ug is quite present in Windows. The solution is to not use the default syst= =3D<br> em driver, but an ASIO supported soundcard. This is also recommended for an= =3D<br> y sync play/rec situations, as the default Windows driver does not assure g= =3D<br> ood or repeatable synchronization. &lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&l= t;/span&gt;&lt;/p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size= :11.0pt;color:#1F497D&quot;&gt;&lt;u&gt;&lt;/=3D<br> u&gt;=3DC2=3DA0&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=3D3D&q= uot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size:1=3D<br> 1.0pt;color:#1F497D&quot;&gt;-Brian FG Katz&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;= /u&gt;&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;p class=3D<br> =3D3D&quot;MsoNormal&quot;&gt;<br> &lt;span lang=3D3D&quot;FR&quot; style=3D3D&quot;font-size:10.0pt;color:#1F= 497D&quot;&gt;--&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;=3D<br> &lt;/span&gt;&lt;/p&gt;&lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span la= ng=3D3D&quot;FR&quot; style=3D3D&quot;font-size:10.0=3D<br> pt;color:#1F497D&quot;&gt;Brian FG Katz, Ph.D&lt;u&gt;&lt;/u&gt;&lt;u&gt;&l= t;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=3D3D&quot;M=3D<br> soNormal&quot;&gt;<br> &lt;span lang=3D3D&quot;FR&quot; style=3D3D&quot;font-size:10.0pt;color:#1F= 497D&quot;&gt;Audio &amp;amp; Acou=3D<br> stique&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p cl= ass=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-s=3D<br> ize:10.0pt;color:#1F497D&quot;&gt;LIMSI-CNRS&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt= ;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=3D3D&quot;Ms=3D<br> oNormal&quot;&gt;<br> &lt;span style=3D3D&quot;font-size:10.0pt;color:#1F497D&quot;&gt;BP 133&lt;= u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;=3D<br> /p&gt;&lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;fon= t-size:10.0pt;color:#1F497D&quot;&gt;F9=3D<br> 1403 Orsay&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;= p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;fo=3D<br> nt-size:10.0pt;color:#1F497D&quot;&gt;France&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt= ;/u&gt;&lt;/span&gt;&lt;/p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size= :10.0pt;color:#1F497D&quot;&gt;tel. =3D<br> &lt;a href=3D3D&quot;tel:%28%2B33%29%2001%2069%2085%2081%2055&quot; value= =3D3D&quot;+33169858155&quot;=3D<br> =A0target=3D3D&quot;_blank&quot;&gt;(+33) 01 69 85 81 55&lt;/a&gt;&lt;u&gt;= &lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p clas=3D<br> s=3D3D&quot;MsoNormal&quot;&gt;<br> &lt;span style=3D3D&quot;font-size:10.0pt;color:#1F497D&quot;&gt;fax. &lt;a= href=3D3D&quot;tel:%28%2B33=3D<br> %29%2001.69.85.80.88&quot; value=3D3D&quot;+33169858088&quot; target=3D3D&q= uot;_blank&quot;&gt;(+33) 01.69.=3D<br> 85.80.88&lt;/a&gt;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p= &gt;&lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;=3D<b= r> font-size:10.0pt;color:#1F497D&quot;&gt;e-mail &lt;/span&gt;&lt;span lang= =3D3D&quot;FR&quot; style=3D3D&quot;fo=3D<br> nt-size:10.0pt;color:#1F497D&quot;&gt;&lt;a href=3D3D&quot;mailto:<a href= =3D"mailto:Brian.Katz@xxxxxxxx">Brian.Katz@xxxxxxxx</a>&quot; target=3D<br> =3D3D&quot;_blank&quot;&gt;&lt;span lang=3D3D&quot;EN-US&quot; style=3D3D&q= uot;color:blue&quot;&gt;<a href=3D"mailto:Brian.Katz@xxxxxxxx">Brian.Katz@xxxxxxxx= imsi.fr</a>&lt;/=3D<br> span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style=3D3D&quot;font-size:10.0pt;co= lor:#1F497D&quot;&gt; &amp;lt;&lt;/span&gt;=3D<br> &lt;span lang=3D3D&quot;FR&quot; style=3D3D&quot;font-size:10.0pt;color:#1F= 497D&quot;&gt;&lt;a href=3D3D&quot;mailt=3D<br> <a href=3D"mailto:o%3ABrian.Katz@xxxxxxxx">o:Brian.Katz@xxxxxxxx</a>&quot; = target=3D3D&quot;_blank&quot;&gt;&lt;span lang=3D3D&quot;EN-US&quot; style= =3D3D&quot;colo=3D<br> r:blue&quot;&gt;mailto:<a href=3D"mailto:Brian.Katz@xxxxxxxx">Brian.Katz@xxxxxxxx= msi.fr</a>&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style=3D3D&quot;font= -siz=3D<br> e:10.0pt;color:#1F497D&quot;&gt;&amp;gt;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&= gt;&lt;/span&gt;&lt;/p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size= :10.0pt;color:#1F497D&quot;&gt;web_t=3D<br> heme: &lt;/span&gt;&lt;span lang=3D3D&quot;FR&quot; style=3D3D&quot;font-si= ze:10.0pt;color:#1F497D&quot;&gt;&lt;a =3D<br> href=3D3D&quot;<a href=3D"http://www.limsi.fr/Scientifique/aa/thmsonesp/" t= arget=3D"_blank">http://www.limsi.fr/Scientifique/aa/thmsonesp/</a>&quot; t= arget=3D3D&quot;_blank&quot;&gt;&lt;=3D<br> span lang=3D3D&quot;EN-US&quot; style=3D3D&quot;color:blue&quot;&gt;<a href= =3D"http://www.limsi.fr/Scientifique/a=3D a/thmsonesp/" target=3D"_blank">http://www.limsi.fr/Scientifique/a=3D<br> a/thmsonesp/</a>&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style=3D3D&quo= t;font-size:10.0pt;color:#1F497D=3D<br> &quot;&gt;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size= :10.0pt;color:#1F497D&quot;&gt;web_g=3D<br> roup: &lt;/span&gt;&lt;span lang=3D3D&quot;FR&quot; style=3D3D&quot;font-si= ze:10.0pt;color:#1F497D&quot;&gt;&lt;a =3D<br> href=3D3D&quot;<a href=3D"http://www.limsi.fr/Scientifique/aa/" target=3D"_= blank">http://www.limsi.fr/Scientifique/aa/</a>&quot; target=3D3D&quot;_bla= nk&quot;&gt;&lt;span lang=3D<br> =3D3D&quot;EN-US&quot; style=3D3D&quot;color:blue&quot;&gt;<a href=3D"http:= //www.limsi.fr/Scientifique/aa/" target=3D"_blank">http://www.limsi.fr/Scie= ntifique/aa/</a>&lt;/span&gt;=3D<br> &lt;/a&gt;&lt;/span&gt;&lt;span style=3D3D&quot;font-size:10.0pt;color:#1F4= 97D&quot;&gt;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/s=3D<br> pan&gt;&lt;/p&gt;<br> &lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size= :10.0pt;color:#1F497D&quot;&gt;&lt;u&gt;&lt;/=3D<br> u&gt;=3DC2=3DA0&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=3D3D&q= uot;MsoNormal&quot;&gt;&lt;span style=3D3D&quot;font-size:1=3D<br> 0.0pt;color:#1F497D&quot;&gt;&lt;u&gt;&lt;/u&gt;=3DC2=3DA0&lt;u&gt;&lt;/u&g= t;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;p class=3D3D&quot;MsoNo=3D<br> rmal&quot;&gt;&lt;span style=3D3D&quot;font-size:11.0pt;color:#1F497D&quot;= &gt;&lt;u&gt;&lt;/u&gt;=3DC2=3DA0&lt;u&gt;&lt;/u&gt;&lt;/=3D<br> span&gt;&lt;/p&gt;<br> &lt;div&gt;&lt;div style=3D3D&quot;border:none;border-top:solid #B5C4DF 1.0= pt;padding:3.0pt=3D<br> =A00cm 0cm 0cm&quot;&gt;&lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;b&gt;&= lt;span lang=3D3D&quot;FR&quot; style=3D3D&quot;font-siz=3D<br> e:10.0pt;color:windowtext&quot;&gt;De=3DC2=3DA0:&lt;/span&gt;&lt;/b&gt;&lt;= span lang=3D3D&quot;FR&quot; style=3D3D&quot;f=3D<br> ont-size:10.0pt;color:windowtext&quot;&gt; AUDITORY - Research in Auditory = Percepti=3D<br> on [mailto:&lt;a href=3D3D&quot;mailto:<a href=3D"mailto:AUDITORY@xxxxxxxx= ILL.CA">AUDITORY@xxxxxxxx</a>&quot; target=3D3D&quot;_blank&quot;&gt= ;AU=3D<br> <a href=3D"mailto:DITORY@xxxxxxxx">DITORY@xxxxxxxx</a>&lt;/a&= gt;] &lt;b&gt;De la part de&lt;/b&gt; Patrick Zurek&lt;br&gt;<br> &lt;b&gt;Envoy=3DC3=3DA9=3DC2=3DA0:&lt;/b&gt; lundi 17 octobre 2011 09:57&l= t;br&gt;&lt;b&gt;=3DC3=3D80=3DC2=3DA0:&lt;/=3D<br> b&gt; &lt;a href=3D3D&quot;mailto:<a href=3D"mailto:AUDITORY@xxxxxxxx= A">AUDITORY@xxxxxxxx</a>&quot; target=3D3D&quot;_blank&quot;&gt;AUDI= TORY@xxxxxxxx=3D<br> <a href=3D"http://ISTS.MCGILL.CA" target=3D"_blank">ISTS.MCGILL.CA</a>&lt;/= a&gt;&lt;br&gt;&lt;b&gt;Objet=3DC2=3DA0:&lt;/b&gt; [AUDITORY] Audio Glitch = in Matlab=3D<br> &lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;<br> &lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=3D3= D&quot;h5&quot;&gt;&lt;p class=3D3D&quot;MsoNormal&quot;&gt;&lt;u&gt;&lt;/u= =3D<br> &gt;=3DC2=3DA0&lt;u&gt;&lt;/u&gt;&lt;/p&gt;&lt;p class=3D3D&quot;MsoNormal&= quot;&gt;&lt;span&gt;I&amp;#39;m writing to notify li=3D<br> st readers of a problem playing audio using Matlab. &lt;br&gt;&lt;br&gt;The= problem is =3D<br> that brief signals are truncated, and it happens using any of the common co= =3D<br> mmands for playing audio (wavplay, sound, and the play method of the audiop= =3D<br> layer object).&lt;br&gt;<br> &lt;br&gt;I can&amp;#39;t specify the exact conditions under which the trun= cation occ=3D<br> urs. However, with a sample rate of 44.1 kHz, signals shorter than about 50= =3D<br> 0 msec are truncated. I haven&amp;#39;t looked much at other sample rates.&= lt;br&gt;<br> &lt;br&gt;A simple work-around for the problem is to pad the end of the sig= nal wi=3D<br> th a sufficient number of zeros that truncation occurs during the zero segm= =3D<br> ent. I&amp;#39;ve found that at least 2000 zeros need to be added to assure= no =3D<br> truncation of a 10-msec signal (with a sample rate of 44.1kHz).&lt;br&gt;<b= r> &lt;br&gt;I&amp;#39;ve brought this problem to the attention of The Mathwor= ks. They c=3D<br> onfirmed the problem, which they attribute to a bug in their driver. &lt;br= &gt;&lt;b=3D<br> r&gt;The Mathworks also informed me that the problem has been solved in the= ir =3D<br> latest release (R2011b) for playing using audioplayer, but not necessarily = =3D<br> for the other audio commands. I&amp;#39;ve confirmed this in very limited t= ests=3D<br> . &lt;br&gt;<br> &lt;br&gt;The following is a piece of code that you can use to observe the = trunca=3D<br> tion. It creates a 100-msec, 1-kHz sine wave, applies a hanning window, and= =3D<br> =A0then plays it first with zero-padding and then without. You should be ab= le=3D<br> =A0to hear the click at the end of the second tone, which is not present on= t=3D<br> he first. If not, you can see it on an oscilloscope.&lt;br&gt;<br> &lt;br&gt;%%%%%%%%%%%%%%%%%%%%&lt;br&gt;fs =3D3D 44100;&lt;br&gt;f =3D3D 10= 00; &lt;br&gt;T =3D3D 0.1;&lt;br&gt;=3D<br> nPad =3D3D 2000;&lt;br&gt;&lt;br&gt;nS =3D3D round(fs*T);&lt;br&gt;&lt;br&g= t;y =3D3D sin(2.*pi*f/fs*(1:nS=3D<br> )&amp;#39;);&lt;br&gt;w =3D3D .5*(1 - cos(2*pi*(1:nS)&amp;#39;/(nS+1)));&lt= ;br&gt;y =3D3D w.*y;&lt;br&gt;=3D<br> yPad =3D3D [y; zeros(nPad,1)];&lt;br&gt;<br> &lt;br&gt;wavplay(yPad, fs, &amp;#39;sync&amp;#39;)&lt;br&gt;pause(0.5)&lt;= br&gt;wavplay(y, fs, &amp;#39;=3D<br> sync&amp;#39;)&lt;br&gt;%%%%%%%%%%%%%%%%%%%%%&lt;/span&gt;&lt;br&gt;&lt;br&= gt;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/p&gt;&lt;pre&gt;--=3D<br> =A0&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/pre&gt;&lt;pre&gt;Patrick M. = Zurek&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/pre&gt;&lt;pre&gt;Presiden= =3D<br> t &lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/pre&gt;<br> &lt;pre&gt;&lt;u&gt;&lt;/u&gt;=3DC2=3DA0&lt;u&gt;&lt;/u&gt;&lt;/pre&gt;&lt;= pre&gt;Sensimetrics Corporation&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;= =3D<br> /pre&gt;&lt;pre&gt;14 Summer St.&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/= pre&gt;&lt;pre&gt;Suite 403&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/pr=3D= <br> e&gt;&lt;pre&gt;Malden, MA 02148&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/= pre&gt;&lt;pre&gt;Tel: &lt;a href=3D3D&quot;tel:781-399=3D<br> -0858%20x237&quot; value=3D3D&quot;+17813990858&quot; target=3D3D&quot;_bla= nk&quot;&gt;781-399-0858 x237&lt;/a=3D<br> &gt;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/pre&gt;<br> &lt;pre&gt;Fax: &lt;a href=3D3D&quot;tel:781-399-0853&quot; value=3D3D&quot= ;+17813990853&quot; target=3D3D&quot;_bl=3D<br> ank&quot;&gt;781-399-0853&lt;/a&gt;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&l= t;/pre&gt;&lt;pre&gt;email: &lt;a href=3D3D&quot;mailto:<a href=3D"mailto:p= at@xxxxxxxx">pat@xxxxxxxx</a>=3D<br> <a href=3D"http://sens.com" target=3D"_blank">sens.com</a>&quot; target=3D3= D&quot;_blank&quot;&gt;<a href=3D"mailto:pat@xxxxxxxx">pat@xxxxxxxx</a>&lt;= /a&gt;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/pre&gt;&lt;pre&gt;web: &lt= ;=3D<br> a href=3D3D&quot;<a href=3D"http://www.sens.com" target=3D"_blank">http://w= ww.sens.com</a>&quot; target=3D3D&quot;_blank&quot;&gt;<a href=3D"http://ww= w.sens.com" target=3D"_blank">www.sens.com</a>&lt;/a&gt;&lt;u&gt;&lt;/u&gt;= &lt;u&gt;=3D<br> &lt;/u&gt;&lt;/pre&gt;<br> &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div= &gt;&lt;br&gt;<br> <br> --0015175d03cc7857e604af80ffa9--<br> <br> ------------------------------<br> <br> End of AUDITORY Digest - 14 Oct 2011 to 17 Oct 2011 - Special issue (#2011-= 238)<br> ***************************************************************************= ****<br> </blockquote></div><br><br clear=3D"all"><div><br></div>-- <br>Vijaya Kumar= Narne PhD,<br>India<br><br> </div> --20cf307d00fa6013d504af88eca5--


This message came from the mail archive
/var/www/postings/2011/
maintained by:
DAn Ellis <dpwe@ee.columbia.edu>
Electrical Engineering Dept., Columbia University