Subject: Re: Trasients when playing silence with Matlab From: Sylvain Choisel <SYC@xxxxxxxx> Date: Fri, 8 Feb 2008 08:55:29 +0100 List-Archive:<http://lists.mcgill.ca/scripts/wa.exe?LIST=AUDITORY>This is a multipart message in MIME format. --=_alternative 002B8809C12573E9_= Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Enrique, If you want to exclude the possibility that these clicks come from Windows = (if that is the OS you are using), I suggest you try the user-contributed function=20 "pa=5Fwavplay" that makes=20 use of the ASIO drivers. It has the advantage of bypassing the Windows=20 sound mixer.=20 You can find this function here: http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=3D= 4017&objectType=3Dfile Another source of clicks is a change of sampling frequency, that will=20 cause the soundcard=20 to loose the clock for a short while. Check the clock settings in the=20 sound card's control panel, you can monitor the current sampling frequency, and see if it changes at=20 the same time as you hear the click.=20 Best regards, Sylvain AUDITORY - Research in Auditory Perception <AUDITORY@xxxxxxxx>=20 wrote on 07/02/2008 17:25:40: > Dear Enrique, >=20 > the issue your are experiencing may come from many things. I would=20 > suggest you to try with a different soundcard first to discard the=20 > soundcard issue. >=20 > Then, Matlab does not handle sound cards directly, but rather uses some=20 > OS calls. So your issue may also come from your operating system (Linux, = > Mac OS X, ...). If you replicate the same behavior with a different=20 > soundcard, I would suggest to contact Matlab support directly with a=20 > complete description of your issue with code, they usually answer in a=20 > day or two. >=20 > That said, I know that the command "sound" is very brittle on many OSes. = > You can try the "audioplayer" that uses JAVA calls and may behave better = > for your purpose (type "doc audioplayer" in your Matlab command prompt=20 > for usage). >=20 > Cheers, >=20 > Mathieu Lagrange > Lopez-Poveda, Enrique A. a =E9crit : > > Dear friends, > > > > Here is a technical question on a problem that is driving us crazy. > > > > We want to play sounds from Matlab through an RME Fireface 400 sound=20 > > card. The problem is that when we play a "silence" interval (array of=20 > > zeros) we can hear (and even record) a clear transient at the onset of = > > the =5Fsilence=5F signal. We would very much like to get rid of that on= set=20 > > transient. Any cues as to how to get rid of it? > > > > Thank you so much in advance. > > > > - Enrique > > > > Enrique A. Lopez-Poveda, Ph.D. > > Instituto de Neurociencias de Castilla y Le=F3n > > Universidad de Salamanca > > Av. Alfonso X El Sabio S/N, 37007 Salamanca, Spain. > > Phone: (+34) 923 294 500 ext. 1957 > > Fax: (+34) 923 294 750 > > E-mail: ealopezpoveda@xxxxxxxx > > http://web.usal.es/~ealopezpoveda/=20 >=20 --=_alternative 002B8809C12573E9_= Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable <br><font size=3D2 face=3D"sans-serif">Enrique,</font> <br> <br><font size=3D2 face=3D"sans-serif">If you want to exclude the possibili= ty that these clicks come from Windows (if that is the OS</font> <br><font size=3D2 face=3D"sans-serif">you are using), I suggest you try the user-contributed function "pa=5Fwavplay" that makes </font> <br><font size=3D2 face=3D"sans-serif">use of the ASIO drivers. It has the advantage of bypassing the Windows sound mixer. </font> <br><font size=3D2 face=3D"sans-serif">You can find this function here:</fo= nt> <br><font size=3D2 face=3D"sans-serif">http://www.mathworks.com/matlabcentr= al/fileexchange/loadFile.do?objectId=3D4017&objectType=3Dfile</font> <br> <br><font size=3D2 face=3D"sans-serif">Another source of clicks is a change of sampling frequency, that will cause the soundcard </font> <br><font size=3D2 face=3D"sans-serif">to loose the clock for a short while. Check the clock settings in the sound card's control panel,</font> <br><font size=3D2 face=3D"sans-serif">you can monitor the current sampling frequency, and see if it changes at the same time as</font> <br><font size=3D2 face=3D"sans-serif">you hear the click. </font> <br> <br><font size=3D2 face=3D"sans-serif">Best regards,</font> <br> <br><font size=3D2 face=3D"sans-serif">Sylvain</font> <br> <br> <br><font size=3D2><tt>AUDITORY - Research in Auditory Perception <AUDIT= ORY@xxxxxxxx> wrote on 07/02/2008 17:25:40:<br> <br> > Dear Enrique,<br> > <br> > the issue your are experiencing may come from many things. I would <br> > suggest you to try with a different soundcard first to discard the <br> > soundcard issue.<br> > <br> > Then, Matlab does not handle sound cards directly, but rather uses some <br> > OS calls. So your issue may also come from your operating system (Linu= x, <br> > Mac OS X, ...). If you replicate the same behavior with a different <br> > soundcard, I would suggest to contact Matlab support directly with a <br> > complete description of your issue with code, they usually answer in a <br> > day or two.<br> > <br> > That said, I know that the command "sound" is very brittle on many OSes. <br> > You can try the "audioplayer" that uses JAVA calls and may behave better <br> > for your purpose (type "doc audioplayer" in your Matlab command prompt <br> > for usage).<br> > <br> > Cheers,<br> > <br> > Mathieu Lagrange<br> > Lopez-Poveda, Enrique A. a =E9crit :<br> > > Dear friends,<br> > ><br> > > Here is a technical question on a problem that is driving us crazy.<br> > ><br> > > We want to play sounds from Matlab through an RME Fireface 400 sound <br> > > card. The problem is that when we play a "silence" interval (array of <br> > > zeros) we can hear (and even record) a clear transient at the onset of <br> > > the =5Fsilence=5F signal. We would very much like to get rid of t= hat onset <br> > > transient. Any cues as to how to get rid of it?<br> > ><br> > > Thank you so much in advance.<br> > ><br> > > - Enrique<br> > ><br> > > Enrique A. Lopez-Poveda, Ph.D.<br> > > Instituto de Neurociencias de Castilla y Le=F3n<br> > > Universidad de Salamanca<br> > > Av. Alfonso X El Sabio S/N, 37007 Salamanca, Spain.<br> > > Phone: (+34) 923 294 500 ext. 1957<br> > > Fax: (+34) 923 294 750<br> > > E-mail: ealopezpoveda@xxxxxxxx<br> > > http://web.usal.es/~ealopezpoveda/ <br> > <br> </tt></font> --=_alternative 002B8809C12573E9_=--