From douglas at music.columbia.edu Sun Mar 1 07:00:00 2009 From: douglas at music.columbia.edu (douglas repetto) Date: Sun Mar 1 07:00:08 2009 Subject: [music-dsp] [admin] music-dsp FAQ Message-ID: <20090301120000.5FF123783CD@music.columbia.edu> Hi, Just a reminder that if you are new to the list you should read the music-dsp FAQ. It contains answers to both technical _and_ adminstrative questions that often come up on the list. If your question appears in the FAQ it is safe to assume that it has been discussed on the list many times in the past, and you should probably have a look through the list archives before posting your question to the list. http://music.columbia.edu/cmc/music-dsp/musicdspFAQ.html Also of interest to new and not-so-new list members: The music-dsp list archives http://music.columbia.edu/cmc/music-dsp/musicdsparchives.html The music-dsp source code archive http://www.musicdsp.org music-dsp books and reviews http://music.columbia.edu/cmc/music-dsp/dspbooks.html All this and more at: http://music.columbia.edu/cmc/music-dsp Hasta la pasta, douglas (this is an automated message sent out on the 1st and 15th of each month) From douglas at music.columbia.edu Sun Mar 15 07:00:01 2009 From: douglas at music.columbia.edu (douglas repetto) Date: Sun Mar 15 07:00:09 2009 Subject: [music-dsp] [admin] music-dsp FAQ Message-ID: <20090315110001.4E7704442CC@music.columbia.edu> Hi, Just a reminder that if you are new to the list you should read the music-dsp FAQ. It contains answers to both technical _and_ adminstrative questions that often come up on the list. If your question appears in the FAQ it is safe to assume that it has been discussed on the list many times in the past, and you should probably have a look through the list archives before posting your question to the list. http://music.columbia.edu/cmc/music-dsp/musicdspFAQ.html Also of interest to new and not-so-new list members: The music-dsp list archives http://music.columbia.edu/cmc/music-dsp/musicdsparchives.html The music-dsp source code archive http://www.musicdsp.org music-dsp books and reviews http://music.columbia.edu/cmc/music-dsp/dspbooks.html All this and more at: http://music.columbia.edu/cmc/music-dsp Hasta la pasta, douglas (this is an automated message sent out on the 1st and 15th of each month) From music-dsp at zenprobe.com Tue Mar 24 11:22:41 2009 From: music-dsp at zenprobe.com (Dylan Menzies) Date: Tue Mar 24 11:23:27 2009 Subject: [music-dsp] [ot] Reminder: IEEE Games Innovation Conference Message-ID: The first IEEE Games Innovation Conference takes place in London 25th-28th August 2009, including an Audio Technology Track. Abstract and paper submission deadline : 10 April http://ice-gic.ieee-cesoc.org/ Dylan Menzies Audio Technology Chair ICE-GIC09 The ICE-GIC 09 conference will be held in central London, in Imperial College's South Kensington Conference Centre which is situated adjacent to landmarks such as the Science Museum, the Royal Albert Hall , Natural History Museum, Victoria & Albert Museums, and Hyde Park. The conference attendees will benefit from arrangements of special deals with hotels in central London and also using some high quality accommodation in Imperial College with very low prices. From stober at cs.uni-magdeburg.de Mon Mar 30 04:28:50 2009 From: stober at cs.uni-magdeburg.de (Sebastian Stober) Date: Mon Mar 30 04:29:13 2009 Subject: [music-dsp] Survey: How much may your music player know about your listening habits? Message-ID: <49D082C2.3050404@cs.uni-magdeburg.de> Dear list, I am currently conducting a survey on the acceptance of automatic tracking of listening habits and I would be more than happy about your participation. It is an anonymous survey and shouldn't take you longer than 5 minutes. Here is the link to the online questionnaire: http://survey.dke-research.de/limesurvey/index.php?sid=59617&lang=en Please feel free to invite others to participate. Thanks a lot! Best regards, Sebastian Stober -- Sebastian Stober E-mail: stober@cs.uni-magdeburg.de University of Magdeburg WWW: http://www.dke-research.de/stober.html FIN ITI - DKE Group Phone: +49-391-67-12728 Universitaetsplatz 2 Fax: +49-391-67-12020 39106 Magdeburg, Germany From contact at quikquak.com Mon Mar 30 05:44:24 2009 From: contact at quikquak.com (contact) Date: Mon Mar 30 05:44:39 2009 Subject: [music-dsp] Survey: How much may your music player know about your listening habits? References: <49D082C2.3050404@cs.uni-magdeburg.de> Message-ID: <09d101c9b11c$1c66a760$6501a8c0@DaveUpstairs> > Dear list, > > I am currently conducting a survey on the acceptance of automatic > tracking of listening habits and I would be more than happy about your > participation. It is an anonymous survey and shouldn't take you longer > than 5 minutes. > > Here is the link to the online questionnaire: > http://survey.dke-research.de/limesurvey/index.php?sid=59617&lang=en > > Please feel free to invite others to participate. "GPS position" & "Mouse and keyboard events per minute" - This appears to have less to do with whether I have Dark Side of the Moon, or Vampire Weekend, than it does a yet another tracker. So it knows where you are AND all your passwords, I don't think so. Also proposed are audio recordings of your surroundings, and videos of your face!! So if I look sad or happy then, er, what exactly? From developer at netcologne.de Tue Mar 31 08:29:18 2009 From: developer at netcologne.de (Thomas Rehaag) Date: Tue Mar 31 08:29:34 2009 Subject: [music-dsp] Bandpass IIR Gain Factor References: <20090315110001.4E7704442CC@music.columbia.edu> Message-ID: <49D20C9E.EC366F3B@netcologne.de> Hi all, I'm using a 'normal' IIR Filter for HP and LP. Now I calculated the params for BP. Works fine, but it's got a frequency dependent gain. The filter algorithm is: void CFilter::Process(float * pBuffer, long samples) { for(long ix = 0; ix < samples; ix ++) { m_fPrevIn2 = m_fPrevIn1; m_fPrevIn1 = m_fIn; m_fIn = pBuffer[ix]; pBuffer[ix] = m_fA1 * m_fIn + m_fA2 * m_fPrevIn1 + m_fA3 * m_fPrevIn2 - m_fB1 * m_fPrevOut1 - m_fB2 * m_fPrevOut2; m_fPrevOut2 = m_fPrevOut1; m_fPrevOut1 = pBuffer[ix]; } } And the params get calculated this way for BP: float fRel = m_fFreq / m_fRate; float fFd = (float)(1.0f / tan(PI * fRel)); float fDQ = 1/m_fQ; fDiv = 1.f / (1 + fFd/m_fQ + fFd * fFd); m_fA1 = 4 * fDQ * fDiv; m_fA2 = 0; m_fA3 = -m_fA1; m_fB1 = 2 * (1 - fFd * fFd) * fDiv; m_fB2 = (1 - fFd * fDQ + fFd * fFd) * fDiv; In case of the lines above, the gain is about proportional to m_fFreq. So I measured some outputs and replaced the line m_fA1 = 4 * fDQ * fDiv; by m_fA1 = 0.394f * fDQ * fDiv / fRel; Still a bit frequency dependet and I feel quite uncomfortable with a 0.394 coming from some Tests. Can anybody please point me to the right solution? Thanks, Thomas From developer at netcologne.de Tue Mar 31 08:47:07 2009 From: developer at netcologne.de (Thomas Rehaag) Date: Tue Mar 31 08:47:24 2009 Subject: [music-dsp] ps: Bandpass IIR Gain Factor References: <20090315110001.4E7704442CC@music.columbia.edu> <49D20C9E.EC366F3B@netcologne.de> Message-ID: <49D210CB.FECE0796@netcologne.de> the factor is 0.2246, not 0.394! There was a gain fader != 0dB somewhere in between ;) From vesa.norilo at saunalahti.fi Tue Mar 31 09:10:51 2009 From: vesa.norilo at saunalahti.fi (Vesa Norilo) Date: Tue Mar 31 09:10:59 2009 Subject: [music-dsp] Bandpass IIR Gain Factor In-Reply-To: <49D20C9E.EC366F3B@netcologne.de> References: <20090315110001.4E7704442CC@music.columbia.edu> <49D20C9E.EC366F3B@netcologne.de> Message-ID: <49D2165B.8090907@saunalahti.fi> Hi Thomas, The Z-plane equation for your filter is H(Z) = (a1 - a3 z^2) / ( 1 + b2 z + b3 z^2 ) To get the gain factor at fRel (assuming that's the point you're most interested in), substitute Z = e^(i fRel Pi) and take the absolute value of the above equation. Vesa > Hi all, > > I'm using a 'normal' IIR Filter for HP and LP. Now I calculated the > params for BP. Works fine, but it's got a frequency dependent gain. > > The filter algorithm is: > > void CFilter::Process(float * pBuffer, long samples) > { > for(long ix = 0; ix < samples; ix ++) > { > m_fPrevIn2 = m_fPrevIn1; > m_fPrevIn1 = m_fIn; > m_fIn = pBuffer[ix]; > > pBuffer[ix] = m_fA1 * m_fIn + m_fA2 * m_fPrevIn1 > + m_fA3 * m_fPrevIn2 - m_fB1 * m_fPrevOut1 > - m_fB2 * m_fPrevOut2; > > m_fPrevOut2 = m_fPrevOut1; > m_fPrevOut1 = pBuffer[ix]; > } > } > > And the params get calculated this way for BP: > > float fRel = m_fFreq / m_fRate; > float fFd = (float)(1.0f / tan(PI * fRel)); > float fDQ = 1/m_fQ; > fDiv = 1.f / (1 + fFd/m_fQ + fFd * fFd); > m_fA1 = 4 * fDQ * fDiv; > m_fA2 = 0; > m_fA3 = -m_fA1; > m_fB1 = 2 * (1 - fFd * fFd) * fDiv; > m_fB2 = (1 - fFd * fDQ + fFd * fFd) * fDiv; > > > In case of the lines above, the gain is about proportional to m_fFreq. > So I measured some outputs and replaced the line > m_fA1 = 4 * fDQ * fDiv; > by > m_fA1 = 0.394f * fDQ * fDiv / fRel; > > Still a bit frequency dependet and I feel quite uncomfortable with a > 0.394 coming from some Tests. > > Can anybody please point me to the right solution? > > Thanks, > > Thomas > -- > dupswapdrop -- the music-dsp mailing list and website: > subscription info, FAQ, source code archive, list archive, book reviews, dsp links > http://music.columbia.edu/cmc/music-dsp > http://music.columbia.edu/mailman/listinfo/music-dsp > From vesa.norilo at saunalahti.fi Tue Mar 31 09:12:15 2009 From: vesa.norilo at saunalahti.fi (Vesa Norilo) Date: Tue Mar 31 09:12:22 2009 Subject: [music-dsp] Bandpass IIR Gain Factor In-Reply-To: <49D2165B.8090907@saunalahti.fi> References: <20090315110001.4E7704442CC@music.columbia.edu> <49D20C9E.EC366F3B@netcologne.de> <49D2165B.8090907@saunalahti.fi> Message-ID: <49D216AF.20900@saunalahti.fi> Vesa Norilo wrote: > Hi Thomas, > > The Z-plane equation for your filter is > > H(Z) = (a1 - a3 z^2) / ( 1 + b2 z + b3 z^2 ) > > Sorry, the nominator should be (a1 + a3 z^2) which is in your case a1(1-z^2) V From developer at netcologne.de Tue Mar 31 09:27:39 2009 From: developer at netcologne.de (Thomas Rehaag) Date: Tue Mar 31 09:27:51 2009 Subject: [music-dsp] Bandpass IIR Gain Factor References: <20090315110001.4E7704442CC@music.columbia.edu> <49D20C9E.EC366F3B@netcologne.de> <49D2165B.8090907@saunalahti.fi> <49D216AF.20900@saunalahti.fi> Message-ID: <49D21A4B.F61FF310@netcologne.de> thanks a lot. Vesa Norilo schrieb: > > Vesa Norilo wrote: > > Hi Thomas, > > > > The Z-plane equation for your filter is > > > > H(Z) = (a1 - a3 z^2) / ( 1 + b2 z + b3 z^2 ) > > > > > Sorry, the nominator should be (a1 + a3 z^2) which is in your case a1(1-z^2) > > V > > -- > dupswapdrop -- the music-dsp mailing list and website: > subscription info, FAQ, source code archive, list archive, book reviews, dsp links > http://music.columbia.edu/cmc/music-dsp > http://music.columbia.edu/mailman/listinfo/music-dsp From vesa.norilo at saunalahti.fi Tue Mar 31 09:31:58 2009 From: vesa.norilo at saunalahti.fi (Vesa Norilo) Date: Tue Mar 31 09:32:03 2009 Subject: [music-dsp] Bandpass IIR Gain Factor In-Reply-To: <49D21A4B.F61FF310@netcologne.de> References: <20090315110001.4E7704442CC@music.columbia.edu> <49D20C9E.EC366F3B@netcologne.de> <49D2165B.8090907@saunalahti.fi> <49D216AF.20900@saunalahti.fi> <49D21A4B.F61FF310@netcologne.de> Message-ID: <49D21B4E.7060601@saunalahti.fi> You thanked me a bit too early, again ;) The exponents for z:s should be negative, z^-1 and z^-2. Sorry for the triple confusion. Good luck, Vesa > thanks a lot. > > Vesa Norilo schrieb: > >> Vesa Norilo wrote: >> >>> Hi Thomas, >>> >>> The Z-plane equation for your filter is >>> >>> H(Z) = (a1 - a3 z^2) / ( 1 + b2 z + b3 z^2 ) >>> >>> >>> >> Sorry, the nominator should be (a1 + a3 z^2) which is in your case a1(1-z^2) >> >> V >> >> -- >> dupswapdrop -- the music-dsp mailing list and website: >> subscription info, FAQ, source code archive, list archive, book reviews, dsp links >> http://music.columbia.edu/cmc/music-dsp >> http://music.columbia.edu/mailman/listinfo/music-dsp >> > -- > dupswapdrop -- the music-dsp mailing list and website: > subscription info, FAQ, source code archive, list archive, book reviews, dsp links > http://music.columbia.edu/cmc/music-dsp > http://music.columbia.edu/mailman/listinfo/music-dsp > From developer at netcologne.de Tue Mar 31 10:09:35 2009 From: developer at netcologne.de (Thomas Rehaag) Date: Tue Mar 31 10:10:04 2009 Subject: [music-dsp] Bandpass IIR Gain Factor References: <20090315110001.4E7704442CC@music.columbia.edu> <49D20C9E.EC366F3B@netcologne.de> <49D2165B.8090907@saunalahti.fi> <49D216AF.20900@saunalahti.fi> <49D21A4B.F61FF310@netcologne.de> <49D21B4E.7060601@saunalahti.fi> Message-ID: <49D2241F.DEAB2EA@netcologne.de> Hi Vesa, so the equiation is: H(Z) = (a1 + a3 z^-2) / ( 1 + b2 z^-1 + b3 z^-2 ) = (a1 - a1 z^-2) / ( 1 + b2 z^-1 + b3 z^-2 ) = (a1 z^2 - a1) / ( z^2 + b2 z^1 + b3) and I substitute Z = e^(i fRel Pi) ? > Good luck, that's what I'll need. It's my first close encounter with complex numbers since many years ;) Cheers, Thomas Vesa Norilo schrieb: > > You thanked me a bit too early, again ;) > > The exponents for z:s should be negative, z^-1 and z^-2. > > Sorry for the triple confusion. > > Good luck, > Vesa > > thanks a lot. > > > > Vesa Norilo schrieb: > > > >> Vesa Norilo wrote: > >> > >>> Hi Thomas, > >>> > >>> The Z-plane equation for your filter is > >>> > >>> H(Z) = (a1 - a3 z^2) / ( 1 + b2 z + b3 z^2 ) > >>> > >>> > >>> > >> Sorry, the nominator should be (a1 + a3 z^2) which is in your case a1(1-z^2) > >> > >> V > >> > >> -- > >> dupswapdrop -- the music-dsp mailing list and website: > >> subscription info, FAQ, source code archive, list archive, book reviews, dsp links > >> http://music.columbia.edu/cmc/music-dsp > >> http://music.columbia.edu/mailman/listinfo/music-dsp > >> > > -- > > dupswapdrop -- the music-dsp mailing list and website: > > subscription info, FAQ, source code archive, list archive, book reviews, dsp links > > http://music.columbia.edu/cmc/music-dsp > > http://music.columbia.edu/mailman/listinfo/music-dsp > > > > -- > dupswapdrop -- the music-dsp mailing list and website: > subscription info, FAQ, source code archive, list archive, book reviews, dsp links > http://music.columbia.edu/cmc/music-dsp > http://music.columbia.edu/mailman/listinfo/music-dsp From vesa.norilo at saunalahti.fi Tue Mar 31 10:33:15 2009 From: vesa.norilo at saunalahti.fi (Vesa Norilo) Date: Tue Mar 31 10:33:26 2009 Subject: [music-dsp] Bandpass IIR Gain Factor In-Reply-To: <49D2241F.DEAB2EA@netcologne.de> References: <20090315110001.4E7704442CC@music.columbia.edu> <49D20C9E.EC366F3B@netcologne.de> <49D2165B.8090907@saunalahti.fi> <49D216AF.20900@saunalahti.fi> <49D21A4B.F61FF310@netcologne.de> <49D21B4E.7060601@saunalahti.fi> <49D2241F.DEAB2EA@netcologne.de> Message-ID: <49D229AB.7080209@saunalahti.fi> Thomas Rehaag wrote: > Hi Vesa, > > so the equiation is: > > H(Z) = (a1 + a3 z^-2) / ( 1 + b2 z^-1 + b3 z^-2 ) > = (a1 - a1 z^-2) / ( 1 + b2 z^-1 + b3 z^-2 ) > = (a1 z^2 - a1) / ( z^2 + b2 z^1 + b3) > > > and I substitute Z = e^(i fRel Pi) > > ? > Yes, that's correct. The magnitude response of the filter is the absolute value of H(Z), and to get the point of Z-plane that corresponds to a real world frequency f/samplerate, you query H(e^i f pi). Absolute value is the magnitude and the argument is the phase response. A helpful identity with the absolute value of complex numbers is: |Z| = Sqrt(Z * Conjugate(Z)) Vesa