From douglas at music.columbia.edu Tue Jul 1 00:00:00 2008 From: douglas at music.columbia.edu (douglas repetto) Date: Tue Jul 1 00:00:07 2008 Subject: [music-dsp] [admin] music-dsp FAQ Message-ID: <20080701040000.C746D2E142EDF@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 sumitg at gmail.com Wed Jul 2 19:48:40 2008 From: sumitg at gmail.com (Sumit Gupta) Date: Wed Jul 2 19:48:49 2008 Subject: [music-dsp] LAME mp3 encoder contest on GPUs (CUDA) Message-ID: <82b447220807021648s3dc23f8ej5334a050e3409ecd@mail.gmail.com> There is a contest on accelerating the LAME MP3 encoder using GPUs (and the CUDA C programming environment) at: http://cudacontest.nvidia.com Cash prize of $5000 From Jason_Page at scee.net Wed Jul 2 23:02:07 2008 From: Jason_Page at scee.net (Jason_Page@scee.net) Date: Wed Jul 2 23:02:35 2008 Subject: [music-dsp] Jason Page (SCEE R&D) is out of the office. Message-ID: I will be out of the office starting 02/07/2008 and will not return until 09/07/2008. Please send any audio support questions to the usual SCE Devnet support channels. ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify postmaster@scee.net This footnote also confirms that this email message has been checked for all known viruses. Sony Computer Entertainment Europe Limited Registered Office: 10 Great Marlborough Street, London W1F 7LP, United Kingdom Registered in England:3277793 ********************************************************************** From music-dsp at musemagic.com Thu Jul 3 11:45:14 2008 From: music-dsp at musemagic.com (Bob Grove) Date: Thu Jul 3 11:45:30 2008 Subject: [music-dsp] LAME mp3 encoder contest on GPUs (CUDA) In-Reply-To: <82b447220807021648s3dc23f8ej5334a050e3409ecd@mail.gmail.com> References: <82b447220807021648s3dc23f8ej5334a050e3409ecd@mail.gmail.com> Message-ID: <003d01c8dd23$c97f34d0$6701a8c0@acer> Is it my imagination or is Nvidia trying to get an important product implementation for next to nothing but running a "contest"? How many people could live on the "possibility" of getting $5000 dollars by optimizing an audio compression encoder on a graphics chip? -----Original Message----- From: Sumit Gupta [mailto:sumitg@gmail.com] Sent: Wednesday, July 02, 2008 4:49 PM To: music-dsp@music.columbia.edu Subject: [music-dsp] LAME mp3 encoder contest on GPUs (CUDA) There is a contest on accelerating the LAME MP3 encoder using GPUs (and the CUDA C programming environment) at: http://cudacontest.nvidia.com Cash prize of $5000 -- 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 jenner at neurotix.com Tue Jul 8 05:00:15 2008 From: jenner at neurotix.com (Jenner Fusari) Date: Tue Jul 8 05:00:32 2008 Subject: [music-dsp] How to detect the filter gain using the coefficients? Message-ID: <48732C9F.60703@neurotix.com> Hi to all the list, my name is Jenner Fusari from Italy and that's my first post after years reading (and sometimes just receiving only, cause I was busy...) the music-dsp list. I'm a programmer but not in DSP (dsp, algorithmic composition and some other computer-music releated stuff are my passions indeed). After many years designing filter without any theorical background I started studying some book. While reading about filter coefficients (z-transforms, poles, zeroes, etc.) I got a question (the one in the subject): having the a[n] and the b[m] coefficients of the filter, is there a way to detect the filter gain? Maybe I'm misusing the word "gain": what I mean is having the input and output amplitudes equal (if the input signal has a -6dB amplitude I would like to get an output with the same amplitude). Thank in advance, Jenner Fusari From scoofy at inf.elte.hu Tue Jul 8 08:13:00 2008 From: scoofy at inf.elte.hu (Peter Schoffhauzer) Date: Tue Jul 8 08:13:31 2008 Subject: [music-dsp] How to detect the filter gain using the coefficients? In-Reply-To: <48732C9F.60703@neurotix.com> References: <48732C9F.60703@neurotix.com> Message-ID: <487359CC.4070602@inf.elte.hu> Hello, Jenner Fusari wrote: > Hi to all the list, > my name is Jenner Fusari from Italy and that's my first post after years > reading (and sometimes just receiving only, cause I was busy...) the > music-dsp list. I'm a programmer but not in DSP (dsp, algorithmic > composition and some other computer-music releated stuff are my passions > indeed). Welcome to the list! > After many years designing filter without any theorical background I > started studying some book. > > While reading about filter coefficients (z-transforms, poles, zeroes, > etc.) I got a question (the one in the subject): having the a[n] and the > b[m] coefficients of the filter, is there a way to detect the filter > gain? Maybe I'm misusing the word "gain": what I mean is having the > input and output amplitudes equal (if the input signal has a -6dB > amplitude I would like to get an output with the same amplitude). If you know nothing about the input, it's impossible to know the exact overall gain. You can calculate the gain at a certain frequency (and I'm sure others on this list could give you exact formulas for that), but it's hard to estimate the overall filter gain (unless the filter is unity gain, but then the answer is trivial). The more you know about the input (what frequency distribution it has, etc.), the more you can know about the filter gain. -- Peter Schoffhauzer From cheater00 at gmail.com Tue Jul 8 09:21:01 2008 From: cheater00 at gmail.com (cheater cheater) Date: Tue Jul 8 09:21:10 2008 Subject: [music-dsp] How to detect the filter gain using the coefficients? In-Reply-To: <487359CC.4070602@inf.elte.hu> References: <48732C9F.60703@neurotix.com> <487359CC.4070602@inf.elte.hu> Message-ID: Jenner, you might want to go with just gain at the resonance peak. Or you might want to do this: have a copy of the filter and test a 1s burst of white/pink noise through it. Compare and you have your gain. You could also do this with your signal instead, which would be less cpu intensive, but would not really be that normative at all. cheers On 7/8/08, Peter Schoffhauzer wrote: > Hello, > > Jenner Fusari wrote: > > > Hi to all the list, > > my name is Jenner Fusari from Italy and that's my first post after years > > reading (and sometimes just receiving only, cause I was busy...) the > > music-dsp list. I'm a programmer but not in DSP (dsp, algorithmic > > composition and some other computer-music releated stuff are my passions > > indeed). > > > > Welcome to the list! > > > > After many years designing filter without any theorical background I > > started studying some book. > > > > While reading about filter coefficients (z-transforms, poles, zeroes, > > etc.) I got a question (the one in the subject): having the a[n] and the > > b[m] coefficients of the filter, is there a way to detect the filter > > gain? Maybe I'm misusing the word "gain": what I mean is having the > > input and output amplitudes equal (if the input signal has a -6dB > > amplitude I would like to get an output with the same amplitude). > > > > If you know nothing about the input, it's impossible to know the exact > overall gain. You can calculate the gain at a certain frequency (and I'm > sure others on this list could give you exact formulas for that), but it's > hard to estimate the overall filter gain (unless the filter is unity gain, > but then the answer is trivial). The more you know about the input (what > frequency distribution it has, etc.), the more you can know about the filter > gain. > > -- Peter Schoffhauzer > > > > -- > 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 scoofy at inf.elte.hu Tue Jul 8 09:25:48 2008 From: scoofy at inf.elte.hu (Peter Schoffhauzer) Date: Tue Jul 8 09:26:16 2008 Subject: [music-dsp] How to detect the filter gain using the coefficients? In-Reply-To: References: <48732C9F.60703@neurotix.com> <487359CC.4070602@inf.elte.hu> Message-ID: <48736ADC.7000700@inf.elte.hu> cheater cheater wrote: > You could also do this with your signal instead, which would be less > cpu intensive, but would not really be that normative at all. Or, do RMS measurement of the input/output, and by comparing, you have an estimation of the average gain. Peter From Jason_Page at scee.net Tue Jul 8 11:01:12 2008 From: Jason_Page at scee.net (Jason_Page@scee.net) Date: Tue Jul 8 11:06:28 2008 Subject: [music-dsp] Jason Page (SCEE R&D) is out of the office. Message-ID: I will be out of the office starting 08/07/2008 and will not return until 28/07/2008. I am away from the office and non-contactable during this time. Please send any audio support questions to the usual SCE Devnet support channels. ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify postmaster@scee.net This footnote also confirms that this email message has been checked for all known viruses. Sony Computer Entertainment Europe Limited Registered Office: 10 Great Marlborough Street, London W1F 7LP, United Kingdom Registered in England: 3277793 ********************************************************************** From czhenry at gmail.com Tue Jul 8 11:49:04 2008 From: czhenry at gmail.com (Charles Henry) Date: Tue Jul 8 11:49:16 2008 Subject: [music-dsp] How to detect the filter gain using the coefficients? In-Reply-To: <48732C9F.60703@neurotix.com> References: <48732C9F.60703@neurotix.com> Message-ID: <518fe7b20807080849y97ae5f9l6c41f92985bddfb6@mail.gmail.com> On Tue, Jul 8, 2008 at 4:00 AM, Jenner Fusari wrote: > Hi to all the list, > my name is Jenner Fusari from Italy and that's my first post after years > reading (and sometimes just receiving only, cause I was busy...) the > music-dsp list. I'm a programmer but not in DSP (dsp, algorithmic > composition and some other computer-music releated stuff are my passions > indeed). > After many years designing filter without any theorical background I started > studying some book. > > While reading about filter coefficients (z-transforms, poles, zeroes, etc.) > I got a question (the one in the subject): having the a[n] and the b[m] > coefficients of the filter, is there a way to detect the filter gain? Maybe > I'm misusing the word "gain": what I mean is having the input and output > amplitudes equal (if the input signal has a -6dB amplitude I would like to > get an output with the same amplitude). When you've got a series of coefficients a[n] and b[m], you will have an analytical function for the frequency response, simply by substituting z=e^(jw) (w=pi represents the Nyquist frequency). but generally speaking this is a bit too complex to work into a nice looking function. I would recommend using Octave/Matlab for the numbers. For example, w= 0:pi/1024:pi; z=e.^(i*w); F=[a[0] + a[1]*z^-1 + .... ] ./ [b[0] + b[1]*z^-1+ ...]; After that, identify the passband, and check some of the values of F(w) in that region to find the gain. Chuck > > Thank in advance, > Jenner Fusari > -- > 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 cheater00 at gmail.com Tue Jul 8 13:15:17 2008 From: cheater00 at gmail.com (cheater cheater) Date: Tue Jul 8 13:15:31 2008 Subject: [music-dsp] Jason Page (SCEE R&D) is out of the office. In-Reply-To: References: Message-ID: Will we be getting those for the next two weeks? Can someone take it out? :S On 7/8/08, Jason_Page@scee.net wrote: > > I will be out of the office starting 08/07/2008 and will not return until > 28/07/2008. > > I am away from the office and non-contactable during this time. > Please send any audio support questions to the usual SCE Devnet support > channels. > > > ********************************************************************** > This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify postmaster@scee.net > This footnote also confirms that this email message has been checked for all known viruses. > Sony Computer Entertainment Europe Limited > Registered Office: 10 Great Marlborough Street, London W1F 7LP, United Kingdom > Registered in England: 3277793 > ********************************************************************** > > -- > 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 cheater00 at gmail.com Tue Jul 8 13:16:51 2008 From: cheater00 at gmail.com (cheater cheater) Date: Tue Jul 8 13:17:00 2008 Subject: [music-dsp] How to detect the filter gain using the coefficients? In-Reply-To: <48736ADC.7000700@inf.elte.hu> References: <48732C9F.60703@neurotix.com> <487359CC.4070602@inf.elte.hu> <48736ADC.7000700@inf.elte.hu> Message-ID: Peter, That's exactly what I said. Damian On 7/8/08, Peter Schoffhauzer wrote: > cheater cheater wrote: > > > You could also do this with your signal instead, which would be less > > cpu intensive, but would not really be that normative at all. > > > > Or, do RMS measurement of the input/output, and by comparing, you have an > estimation of the average gain. > > Peter > > > -- > 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 scoofy at inf.elte.hu Tue Jul 8 15:00:23 2008 From: scoofy at inf.elte.hu (Peter Schoffhauzer) Date: Tue Jul 8 15:01:03 2008 Subject: [music-dsp] How to detect the filter gain using the coefficients? In-Reply-To: References: <48732C9F.60703@neurotix.com> <487359CC.4070602@inf.elte.hu> <48736ADC.7000700@inf.elte.hu> Message-ID: <4873B947.7080006@inf.elte.hu> Hi Damian, I know, I just wanted to point out that you need some averaging to get an usable result. Or, one may check the maximum gain instead of an average (may be useful for preventing clipping, etc.) Peter cheater cheater wrote: > Peter, > > That's exactly what I said. > > Damian > > On 7/8/08, Peter Schoffhauzer wrote: >> cheater cheater wrote: >> >>> You could also do this with your signal instead, which would be less >>> cpu intensive, but would not really be that normative at all. >>> >> Or, do RMS measurement of the input/output, and by comparing, you have an >> estimation of the average gain. >> >> Peter >> >> >> -- >> 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 hans at fugal.net Tue Jul 8 15:01:14 2008 From: hans at fugal.net (Hans Fugal) Date: Tue Jul 8 15:01:33 2008 Subject: [music-dsp] True RMS meter In-Reply-To: <3br1839lavn07fkrk52ce9s5o5tsk4mabj@4ax.com> References: <20070626100856.A9A2B44A8F4@music.columbia.edu> <3br1839lavn07fkrk52ce9s5o5tsk4mabj@4ax.com> Message-ID: <4873B97A.6020909@fugal.net> Once upon a time, Greg Berchin wrote: > On Tue, 26 Jun 2007 06:08:56 -0400 (EDT), Luigi Castelli wrote: > >> 1 - With Average detection I intend to simulate VU-like metering. >> According to the specs a VU meter is defined to reach 99% full-scale >> deflection in 300ms. Its fall-back time is also the same of its rise >> time. > > VU ballistics assume mechanical meters, easily modeled with a second > order system: > > http://groups.google.com/group/comp.dsp/tree/browse_frm/thread/260b526f35efe34f/cc5b9afb71b4752f?rnum=1&_done=%2Fgroup%2Fcomp.dsp%2Fbrowse_frm%2Fthread%2F260b526f35efe34f%2Fcc5b9afb71b4752f%3Ftvc%3D1%26#doc_dbf323f74b343be6 > I've been trying to figure out how to implement this but I'm finding my dsp-fu is weak, and I'm traveling and my dsp text is several states away. So forgive me for asking a perhaps rudimentary question. How does one get from "2nd-order LPF set for 2.224 Hz, Q = 0.6053" to a transfer equation for a digital filter (or even better, a difference equation)? -- Hans Fugal ; http://hans.fugal.net There's nothing remarkable about it. All one has to do is hit the right keys at the right time and the instrument plays itself. -- Johann Sebastian Bach From david.lowenfels at gmail.com Tue Jul 8 15:13:47 2008 From: david.lowenfels at gmail.com (david.lowenfels@gmail.com) Date: Tue Jul 8 15:14:02 2008 Subject: [music-dsp] True RMS meter In-Reply-To: <4873B97A.6020909@fugal.net> References: <20070626100856.A9A2B44A8F4@music.columbia.edu> <3br1839lavn07fkrk52ce9s5o5tsk4mabj@4ax.com> <4873B97A.6020909@fugal.net> Message-ID: <2DDF2974-DEC3-4BC1-AC87-9A9EC68CE201@gmail.com> Hi Hans, Try RBJ's filter cookbook: http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt -D On Jul 8, 2008, at 12:01 PM, Hans Fugal wrote: > > I've been trying to figure out how to implement this but I'm finding > my dsp-fu is weak, and I'm traveling and my dsp text is several > states away. So forgive me for asking a perhaps rudimentary question. > > How does one get from "2nd-order LPF set for 2.224 Hz, Q = 0.6053" > to a transfer equation for a digital filter (or even better, a > difference equation)? > > -- > Hans Fugal ; http://hans.fugal.net From gberchin at comcast.net Tue Jul 8 15:14:08 2008 From: gberchin at comcast.net (Greg Berchin) Date: Tue Jul 8 15:14:28 2008 Subject: [music-dsp] True RMS meter In-Reply-To: <20080708190132.F42352E1FAC0B@music.columbia.edu> References: <20080708190132.F42352E1FAC0B@music.columbia.edu> Message-ID: >>How does one get from "2nd-order LPF set for 2.224 Hz, Q = 0.6053" to a >>transfer equation for a digital filter (or even better, a difference >>equation)? Transfer function for 2nd-order LPF is (view in a fixed font): 2 w 0 ---------------- w 2 0 2 s + --- s + w Q 0 w = 2 * PI * 2.224 0 Q = 0.6053 Once you have the s-domain transfer function, you can convert it into a z-domain transfer function by means of the Bilinear Transform. The frequency is so low that you probably don't even need to worry about prewarping with any reasonable sampling rate. Once you have the z-domain transfer function, you can extract the difference equation by assuming causality (a good assumption in the real world). Any DSP text will tell you how to do all of this. Greg Berchin From hans at fugal.net Tue Jul 8 15:17:30 2008 From: hans at fugal.net (Hans Fugal) Date: Tue Jul 8 15:17:45 2008 Subject: [music-dsp] True RMS meter In-Reply-To: References: <20080708190132.F42352E1FAC0B@music.columbia.edu> Message-ID: <4873BD4A.8090905@fugal.net> Greg Berchin wrote: >>> How does one get from "2nd-order LPF set for 2.224 Hz, Q = 0.6053" to a >>> transfer equation for a digital filter (or even better, a difference >>> equation)? > > Transfer function for 2nd-order LPF is (view in a fixed font): > > 2 > w > 0 > ---------------- > w > 2 0 2 > s + --- s + w > Q 0 > > w = 2 * PI * 2.224 > 0 > > Q = 0.6053 > > Once you have the s-domain transfer function, you can convert it into > a z-domain transfer function by means of the Bilinear Transform. The > frequency is so low that you probably don't even need to worry about > prewarping with any reasonable sampling rate. > > Once you have the z-domain transfer function, you can extract the > difference equation by assuming causality (a good assumption in the > real world). > > Any DSP text will tell you how to do all of this. Thank you, that bridges the gap and I think I can figure out the rest. The cookbook David posted also looks very useful (after a cursory glance). -- Hans Fugal ; http://hans.fugal.net There's nothing remarkable about it. All one has to do is hit the right keys at the right time and the instrument plays itself. -- Johann Sebastian Bach From earlevel at earlevel.com Tue Jul 8 22:03:35 2008 From: earlevel at earlevel.com (Nigel Redmon) Date: Tue Jul 8 22:03:46 2008 Subject: [music-dsp] True RMS meter In-Reply-To: <4873B97A.6020909@fugal.net> References: <20070626100856.A9A2B44A8F4@music.columbia.edu> <3br1839lavn07fkrk52ce9s5o5tsk4mabj@4ax.com> <4873B97A.6020909@fugal.net> Message-ID: <2A9A8F22-6EC8-4C3F-A88A-6EE5998FD6D6@earlevel.com> On Jul 8, 2008, at 12:01 PM, Hans Fugal wrote: > How does one get from "2nd-order LPF set for 2.224 Hz, Q = 0.6053" > to a transfer equation for a digital filter (or even better, a > difference equation)? Here's another look, including the bilinear transform--skip to the bottom for the coefficient equations for a 2nd-order LFP: http://www.earlevel.com/Digital%20Audio/Bilinear.html Here's are some notes on implementing biquads: http://www.earlevel.com/Digital%20Audio/Biquads.html You didn't mention how you're implementing this--a fixed-point DSP, floating point CPU, etc. Your frequency requirement is pretty low (assuming audio sample rates), and the standard biquad configurations are pretty sensitive to quantization effects for low frequencies. The second link also has some notes on this topic. From earlevel at earlevel.com Tue Jul 8 22:08:22 2008 From: earlevel at earlevel.com (Nigel Redmon) Date: Tue Jul 8 22:08:34 2008 Subject: [music-dsp] Digital Clipping In-Reply-To: References: <731712.12568.qm@web90602.mail.mud.yahoo.com> Message-ID: <6FEA6D94-BEA1-497F-995D-C6AFA05BA5D1@earlevel.com> Old reply, but the board didn't accept it the first time due to imbedded text formatting... On Jun 15, 2008, at 12:21 PM, Nigel Redmon wrote: > A factor of 8 can be enough (6 in a pinch) for musically useful > processing, if you realize that you don't have to allow for a > completely general case, and take advantage of that where you can. > For instance, for guitar amp simulation, you can recognize that the > raw guitar signal's upper harmonics are down considerably from the > fundamental (which you can take into account when you're figuring > what the resulting level of aliasing is), and you can limit the > additional high-frequency energy from, say, stomp boxes, which > might not be noticeable to a listener but cause a lot more > noticeable aliasing. I might be able to give better advice if you > gave more details. You're talking about hard clipping (some kind of > softening is usually better--real world devices that people like to > listen to aren't able to do the perfect hard clipping that dsp/math > can), so I suspect you're going for heavy clipping, which is not > usually done to an entire full-range mix (usually individual > instruments), but I don't want to make too many assumptions. > > > On Jun 14, 2008, at 4:25 PM, paul Fultz wrote: > >> Thanks for your reply, well im not trying to reduce >> the alias after the signal has been clipped(which is >> what the waveshaping stuff does) instead i have the >> unclipped version of the signal so there is no need to >> de-clip it etiher, but what i would like to do is hard >> clip this signal in a way that would reduce aliasing >> that is caused, or at least reduce the aliasing into a >> manageable bandwidth where i would just need to >> upsample by say 3, or 8 or something like that. I can >> reduce the aliasing a little bit now by upsampling but >> to really reduce it more i would need to upsample a >> lot well over 100, which is not reasonable for >> real-time processing(since it will be used in >> conjuction with other processing). I could use >> waveshaping but i would like the signal to be >> completly untouched when its not clipping, and then >> when it is clipping it adds the colorations to the >> sound. >> thanks, >> paul > From earlevel at earlevel.com Tue Jul 8 22:15:50 2008 From: earlevel at earlevel.com (Nigel Redmon) Date: Tue Jul 8 22:16:45 2008 Subject: [music-dsp] Digital Clipping In-Reply-To: <9953a85a216a63cb55f29c61e24d8189@bteaudio.com> References: <9953a85a216a63cb55f29c61e24d8189@bteaudio.com> Message-ID: <609772D9-B313-4898-8AED-6E0BBE953561@earlevel.com> Another reply that got dropped due to inadvertent text formatting... On Jun 15, 2008, at 12:30 PM, Nigel Redmon wrote: > The problem is that such a level of waveshaping is rarely what > people want (I don't think it even qualifies as soft clipping, in > the sense most people think of). It doesn't take much gain into > that waveshaper for the signal to reach full scale, so it gets hard- > clipped at full scale (explicitly, or automatically by the DSP > chip). Then they wonder why the 3x oversampling isn't working out > and they are hearing massive aliasing. > > > On Jun 15, 2008, at 5:39 AM, Bogac Topaktas wrote: >> For instance, if you are employing cubic soft-clipper as >> waveshaper then the bandwidth expansion >> is limited to a factor of three.Therefore you need to upsample by - >> at least- a factor of three in order >> to avoid aliasing: From cheater00 at gmail.com Wed Jul 9 10:12:49 2008 From: cheater00 at gmail.com (cheater cheater) Date: Wed Jul 9 10:13:01 2008 Subject: [music-dsp] How to detect the filter gain using the coefficients? In-Reply-To: <4873B947.7080006@inf.elte.hu> References: <48732C9F.60703@neurotix.com> <487359CC.4070602@inf.elte.hu> <48736ADC.7000700@inf.elte.hu> <4873B947.7080006@inf.elte.hu> Message-ID: Peter, it is notable that one might only want to check the gain in the pass band, and not in the kill band, while still using a wideband approach such as noise - so as not to test the gain at only one frequency (which happens when you are using a sine generator). How would you go about this? Damian On 7/8/08, Peter Schoffhauzer wrote: > Hi Damian, > > I know, I just wanted to point out that you need some averaging to get an > usable result. Or, one may check the maximum gain instead of an average (may > be useful for preventing clipping, etc.) > > Peter > > > > cheater cheater wrote: > > > Peter, > > > > That's exactly what I said. > > > > Damian > > > > On 7/8/08, Peter Schoffhauzer wrote: > > > > > cheater cheater wrote: > > > > > > > > > > You could also do this with your signal instead, which would be less > > > > cpu intensive, but would not really be that normative at all. > > > > > > > > > > > Or, do RMS measurement of the input/output, and by comparing, you have > an > > > estimation of the average gain. > > > > > > Peter > > > > > > > > > -- > > > 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 czhenry at gmail.com Wed Jul 9 11:44:46 2008 From: czhenry at gmail.com (Charles Henry) Date: Wed Jul 9 11:45:03 2008 Subject: [music-dsp] How to detect the filter gain using the coefficients? In-Reply-To: References: <48732C9F.60703@neurotix.com> <487359CC.4070602@inf.elte.hu> <48736ADC.7000700@inf.elte.hu> <4873B947.7080006@inf.elte.hu> Message-ID: <518fe7b20807090844s5ed8b4c1j162a33727f9212a5@mail.gmail.com> How about a power method? (analogous to the power method working with matrices and operators) Apply the filter, re-normalize by a constant, and repeat. Over several iterations, the normalization constant will converge to a single value, which is the largest value of the gain (the largest eigenvalue of the operator). Chuck On Wed, Jul 9, 2008 at 9:12 AM, cheater cheater wrote: > Peter, > it is notable that one might only want to check the gain in the pass > band, and not in the kill band, while still using a wideband approach > such as noise - so as not to test the gain at only one frequency > (which happens when you are using a sine generator). How would you go > about this? > > Damian > > On 7/8/08, Peter Schoffhauzer wrote: >> Hi Damian, >> >> I know, I just wanted to point out that you need some averaging to get an >> usable result. Or, one may check the maximum gain instead of an average (may >> be useful for preventing clipping, etc.) >> >> Peter >> >> >> >> cheater cheater wrote: >> >> > Peter, >> > >> > That's exactly what I said. >> > >> > Damian >> > >> > On 7/8/08, Peter Schoffhauzer wrote: >> > >> > > cheater cheater wrote: >> > > >> > > >> > > > You could also do this with your signal instead, which would be less >> > > > cpu intensive, but would not really be that normative at all. >> > > > >> > > > >> > > Or, do RMS measurement of the input/output, and by comparing, you have >> an >> > > estimation of the average gain. >> > > >> > > Peter >> > > >> > > >> > > -- >> > > 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 >> > -- > 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 crueger at informatik.uni-bonn.de Thu Jul 10 15:13:42 2008 From: crueger at informatik.uni-bonn.de (Till Crueger) Date: Thu Jul 10 15:13:55 2008 Subject: [music-dsp] How to hear sombody elses voice Message-ID: Hi, I was wondering, if any of you know a system, that allows you to hear someone elses voice, in the way, they hear it. I am not sure, if this would actually be possible though, since the specific resonance might be different for different people. Still if you could measure all the relevant parameters, would it not be possible to construct a System, that changes recorded sounds of their voice to the way, they percieve it? If any of you have any pointers in that direction, I would appreciate it, Till -- "If I were to command a general to turn into a seagull, and if the general did not obey, that would not be the general's fault. It would be mine." --Antoine de Saint-Exupery (Le Petit Prince) From technique274 at web.de Thu Jul 10 20:24:19 2008 From: technique274 at web.de (Christian Sprys) Date: Thu Jul 10 20:24:33 2008 Subject: [music-dsp] Problem understanding convolution basics Message-ID: <4876A833.2070505@web.de> Hello, Hoping not to annoy anyone here with simple questions, but I didn't find information otherwhere on the net: I want to try the basic convolution reverb principle, I do this by implementing a test-case. The algorithm is working using the overlap-add method, but it's very slow. I guess I misunderstood something, the problem is that the algorithm gets really slow if the audio packets become small. An example I've got my impulse response ready, let's say it's a quite large one containing 524288 samples. Now, 64 audio samples arrive and want to be processed. My program currently does the following: It adds 524xxx samples to the data to match the size of the IR. Now the arrays are convolved and when finished, they're transformed back by using iFFT into time-space. Now I can grab my 64 samples and can write them down to a file. The remaining samples are remembered for the next frame and are added to the next result, and so on..... As an FFT and an iFF is computed everytime for only 64 cheap samples, this can't be "the algorithm" to do that. What the point am I missing here? Thanks for your help in advance Chris From czhenry at gmail.com Thu Jul 10 21:10:51 2008 From: czhenry at gmail.com (Charles Henry) Date: Thu Jul 10 21:11:08 2008 Subject: [music-dsp] Problem understanding convolution basics In-Reply-To: <4876A833.2070505@web.de> References: <4876A833.2070505@web.de> Message-ID: <518fe7b20807101810u61a0c6aexc8f25f4d4d4f2cde@mail.gmail.com> You're not missing anything as far as I can tell. For better speed, use larger buffers (much, much much bigger than 64). There is, generally speaking, no way to implement a 1.5 sec convolution in real-time without significant latency. I had been considering a different algorithm, keeping the data in the frequency domain as much as possible. My idea (which would require a lot of work) is to start with a transform of the 1st block of data (64 samples) in a buffer (a) which is a multiple of 64. The Fourier transform should be optimized to eliminate calculations where the data is zero, and the result is stored into buffer (b). The IR is transformed and stored into a buffer (c), from the beginning. The buffer (b) is multiplied by the buffer (c), and the result is IFFT'd for output. The IFFT should also be re-written to calculate only the 1st 64 samples of the data. Next, shift the phase of the buffer (b), by multiplying by e^(-2*pi*i*(64/N)). When the data in this buffer has come full circle, it needs to be subtracted off. These steps would then be repeated, keeping the data in the frequency domain and subtracting off the old block and adding in the new block as it goes. Now, the big obstacle to *trying* this algorithm is to re-write the fourier transforms for it. It's been a while since I've been doing the math, but I seem to remember the gains would be linear. So, to calculate a fourier transform of 64 non-zero samples in a buffer of 256, would take 1/4 the time of calulating a 256-point transform. It's been a while since I've been toying with the idea. Someone stop me if I'm talking out my a**. Chuck On Thu, Jul 10, 2008 at 7:24 PM, Christian Sprys wrote: > Hello, > > Hoping not to annoy anyone here with simple questions, but I didn't find > information otherwhere on the net: > > I want to try the basic convolution reverb principle, I do this by > implementing a test-case. > > The algorithm is working using the overlap-add method, but it's very slow. I > guess I misunderstood something, the problem is that the algorithm gets > really slow if the audio packets become small. > > An example > > I've got my impulse response ready, let's say it's a quite large one > containing 524288 samples. Now, 64 audio samples arrive and want to be > processed. My program currently does the following: It adds 524xxx samples > to the data to match the size of the IR. Now the arrays are convolved and > when finished, they're transformed back by using iFFT into time-space. Now I > can grab my 64 samples and can write them down to a file. The remaining > samples are remembered for the next frame and are added to the next result, > and so on..... > > As an FFT and an iFF is computed everytime for only 64 cheap samples, this > can't be "the algorithm" to do that. What the point am I missing here? > > Thanks for your help in advance > > Chris > > -- > 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 Holger.Strauss at vcs.de Fri Jul 11 01:50:36 2008 From: Holger.Strauss at vcs.de (Holger Strauss) Date: Fri Jul 11 01:50:50 2008 Subject: [music-dsp] Problem understanding convolution basics References: <4876A833.2070505@web.de> <518fe7b20807101810u61a0c6aexc8f25f4d4d4f2cde@mail.gmail.com> Message-ID: <8D4FE597F4F01142B67C00FAD1C6551805F2CCDD@VCSEXCHANGE.vcsnt.local> > You're not missing anything as far as I can tell. For better speed, > use larger buffers (much, much much bigger than 64). There is, > generally speaking, no way to implement a 1.5 sec convolution in > real-time without significant latency. It can be done using partitioned convolution. See [8] W. G. Gardner, "Efficient convolution without input-output delay", J.AES vol. 43, n. 3, 1995 March, pp. 127-136. Holger From vesa.norilo at saunalahti.fi Fri Jul 11 09:15:19 2008 From: vesa.norilo at saunalahti.fi (Vesa Norilo) Date: Fri Jul 11 09:15:08 2008 Subject: [music-dsp] How to detect the filter gain using the coefficients? In-Reply-To: References: <48732C9F.60703@neurotix.com> <487359CC.4070602@inf.elte.hu> <48736ADC.7000700@inf.elte.hu> <4873B947.7080006@inf.elte.hu> Message-ID: <48775CE7.7020706@saunalahti.fi> Hi Damian and others, You could calculate this directly from the coefficients if they're available. Take the absolute value of the H(Z) transfer function in the Z-domain. A math package can often do it for you but might need some help (I might suck at Mathematica which is certainly more than likely but I often have to massage the equations before it will spit out an answer). If doing it by hand a very useful identity is Abs(H(Z)) == Sqrt(H(Z) * Conjugate(H(Z)). Then substitute Z for e^(i f). You now have the magnitude response for frequency f, where value f=0 equals 0Hz and f=Pi equals Samplerate/2. To find out average gain for a specific band, integrate your magnitude response over that band and divide by bandwidth. To find out the peak gain, take the maxima of the magnitude response function along with 0 and Pi and find the biggest value. It might seem like an unpleasant reminder of high school calculus, but do this once for a generic biquad and suddenly you can obtain very, very precise frequency dependent gain factors for most IIR filters out there, as they often tend to be one pole, biquad or a bunch of biquads, all of which can be handled with the same math. Regards, Vesa > Peter, > it is notable that one might only want to check the gain in the pass > band, and not in the kill band, while still using a wideband approach > such as noise - so as not to test the gain at only one frequency > (which happens when you are using a sine generator). How would you go > about this? > > Damian > > From cheater00 at gmail.com Fri Jul 11 10:34:45 2008 From: cheater00 at gmail.com (cheater cheater) Date: Fri Jul 11 10:35:06 2008 Subject: [music-dsp] How to detect the filter gain using the coefficients? In-Reply-To: <48775CE7.7020706@saunalahti.fi> References: <48732C9F.60703@neurotix.com> <487359CC.4070602@inf.elte.hu> <48736ADC.7000700@inf.elte.hu> <4873B947.7080006@inf.elte.hu> <48775CE7.7020706@saunalahti.fi> Message-ID: Smart words. Thank you, Vesa. On 7/11/08, Vesa Norilo wrote: > Hi Damian and others, > > You could calculate this directly from the coefficients if they're > available. > > Take the absolute value of the H(Z) transfer function in the Z-domain. A > math package can often do it for you but might need some help (I might suck > at Mathematica which is certainly more than likely but I often have to > massage the equations before it will spit out an answer). If doing it by > hand a very useful identity is Abs(H(Z)) == Sqrt(H(Z) * Conjugate(H(Z)). > Then substitute Z for e^(i f). You now have the magnitude response for > frequency f, where value f=0 equals 0Hz and f=Pi equals Samplerate/2. To > find out average gain for a specific band, integrate your magnitude response > over that band and divide by bandwidth. To find out the peak gain, take the > maxima of the magnitude response function along with 0 and Pi and find the > biggest value. > > It might seem like an unpleasant reminder of high school calculus, but do > this once for a generic biquad and suddenly you can obtain very, very > precise frequency dependent gain factors for most IIR filters out there, as > they often tend to be one pole, biquad or a bunch of biquads, all of which > can be handled with the same math. > > Regards, > Vesa > > > Peter, > > it is notable that one might only want to check the gain in the pass > > band, and not in the kill band, while still using a wideband approach > > such as noise - so as not to test the gain at only one frequency > > (which happens when you are using a sine generator). How would you go > > about this? > > > > Damian > > > > > > -- > 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 douglas at music.columbia.edu Fri Jul 11 11:14:23 2008 From: douglas at music.columbia.edu (douglas repetto) Date: Fri Jul 11 11:14:27 2008 Subject: [music-dsp] fast sin(x) function In-Reply-To: <20080623041224.C99F4200EA@ws6-7.us4.outblaze.com> References: <20080623041224.C99F4200EA@ws6-7.us4.outblaze.com> Message-ID: <487778CF.8040707@music.columbia.edu> The sine discussion seems to have played itself out. A lot more info was added after Andy Farnell put together the first round of posts. R b-j, are you still up for putting everything into a FAQ? douglas -- ............................................... http://artbots.org .....douglas.....irving........................ http://dorkbot.org .......................... http://music.columbia.edu/cmc/music-dsp .......... repetto............. http://music.columbia.edu/organism ............................... http://music.columbia.edu/~douglas From bogac at bteaudio.com Fri Jul 11 13:29:30 2008 From: bogac at bteaudio.com (Bogac Topaktas) Date: Fri Jul 11 13:29:46 2008 Subject: [music-dsp] Problem understanding convolution basics Message-ID: <9a433f24214cda5cf47ac657f5f80980@bteaudio.com> Holger Strauss wrote: > It can be done using partitioned convolution. See > [8] W. G. Gardner, "Efficient convolution without input-output > delay", J.AES vol. 43, n. 3, 1995 March, pp. 127-136. Keep in mind that the "non-uniform" partitioned convolution as described in the above article is patented. However, the "uniform" partitioned convolution has not been patented yet. For more information see: "REAL-TIME PARTITIONED CONVOLUTION FOR AMBIOPHONICS SURROUND SOUND" by Anders Torger and Angelo Farina http://pcfarina.eng.unipr.it/Public/Papers/164-Mohonk2001.PDF http://www.acoustics.net/objects/pdf/article_farina04.pdf "IMPLEMENTATION OF REAL-TIME PARTITIONED CONVOLUTION ON A DSP BOARD" by E. Armelloni, C. Giottoli and A. Farina http://pcfarina.eng.unipr.it/Public/Papers/188-Mohonk2003.pdf http://pcfarina.eng.unipr.it/Public/Mohonk2003/Mohonk_2003_toAngelo.ppt Bogac -----Original message----- From: "Holger Strauss" Holger.Strauss@vcs.de Date: Thu, 10 Jul 2008 21:50:57 -0700 To: "A discussion list for music-related DSP" music-dsp@music.columbia.edu Subject: RE: [music-dsp] Problem understanding convolution basics > > > You're not missing anything as far as I can tell. For better speed, > > use larger buffers (much, much much bigger than 64). There is, > > generally speaking, no way to implement a 1.5 sec convolution in > > real-time without significant latency. > > It can be done using partitioned convolution. See > [8] W. G. Gardner, "Efficient convolution without input-output > delay", J.AES vol. 43, n. 3, 1995 March, pp. 127-136. > > Holger > > -- > 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 rbj at audioimagination.com Fri Jul 11 13:43:41 2008 From: rbj at audioimagination.com (robert bristow-johnson) Date: Fri Jul 11 13:43:53 2008 Subject: [music-dsp] fast sin(x) function Message-ID: <20080711174341.BBF8E5481F0@ws6-6.us4.outblaze.com> > ----- Original Message ----- > From: "douglas repetto" > To: "A discussion list for music-related DSP" > Subject: Re: [music-dsp] fast sin(x) function > Date: Fri, 11 Jul 2008 11:14:23 -0400 > > > > The sine discussion seems to have played itself out. A lot more info was > added after Andy Farnell put together the first round of posts. R b-j, are > you still up for putting everything into a FAQ? well, i am not sure exactly what to do other than write the content that i had. ooops. i just realized that i didn't do the last installment which is to formally discuss using finite order power series to evaluate sin(x) (over some limited domain around x=0). i'm on a vacation car trip now (currently in Rapid City SD) but and it won't end until about 3 weeks. can i add that last section later? in terms of the other sections that i already wrote and posted to the list, what else exactly needs to be done with it to be put into a FAQ? i was thinking that it needed to be reviewed for accuracy/mistakes and for other perspectives (in the likely case that i'm overlooking something that should be said). if the FAQ is ASCII only, then i am not sure what else to do with thoose sections, but i am happy to leave that to others to do with them what they think those sections need to be done to them for inclusion. anyway, i can sorta monitor this while on this long car trip, but i can't do anything of substance until i get back. i don't have, on hand, any of my books or MATLAB programs or anything to refer to. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge." From sts.nitrogen at gmail.com Sat Jul 12 15:01:16 2008 From: sts.nitrogen at gmail.com (Michael Bourgeous) Date: Sat Jul 12 15:01:29 2008 Subject: [music-dsp] Problem understanding convolution basics In-Reply-To: <9a433f24214cda5cf47ac657f5f80980@bteaudio.com> References: <9a433f24214cda5cf47ac657f5f80980@bteaudio.com> Message-ID: <8e4fc8270807121201q5bfb6cf6u5ac05b9976e81cd7@mail.gmail.com> On Fri, Jul 11, 2008 at 11:29 AM, Bogac Topaktas wrote: > Holger Strauss wrote: >> It can be done using partitioned convolution. See >> [8] W. G. Gardner, "Efficient convolution without input-output >> delay", J.AES vol. 43, n. 3, 1995 March, pp. 127-136. > > Keep in mind that the "non-uniform" partitioned convolution as described in > the above article is patented. However, the "uniform" partitioned convolution > has not been patented yet. For more information see: > > "REAL-TIME PARTITIONED CONVOLUTION FOR AMBIOPHONICS SURROUND SOUND" > by Anders Torger and Angelo Farina > http://pcfarina.eng.unipr.it/Public/Papers/164-Mohonk2001.PDF > http://www.acoustics.net/objects/pdf/article_farina04.pdf > According to information on Torger's BruteFIR page, http://www.ludd.luth.se/~torger/brutefir.html, the European patent for non-uniform partitioned convolution was revoked, but it may still be patented in the US. This news was from 2006, however, so anyone choosing to implement non-uniform partitioned convolution should research the current status of any relevant patents. Mike Bourgeous From fwks5029 at mb.infoweb.ne.jp Sat Jul 12 22:43:53 2008 From: fwks5029 at mb.infoweb.ne.jp (kato tatsuya) Date: Sat Jul 12 22:44:14 2008 Subject: [music-dsp] How to optimize PCM synth implementation on consideration of memory locality Message-ID: <001101c8e492$49efce70$0201a8c0@CoreCore> HI ,all Now I am interested in how to run a large amount of PCM oscilators in realtime and simultaneously. You know, recent multi-core architecture is speeding up its peak-performance of calculation, but relatively slowing down the bandwidth of main memory. So, cache or local memory strategy is getting more importance of supporting CPU's peak-performance. These strategy is relying on the locality of memory accessing. (Assumption that one processor may access to the limited range of memory while short time interval.) However, the clustered PCM oscilators tend to access over a wide range of storage at same time. This tend voids the memory locality premise, and wastes the most valuable CPU power. Of couse, PCM oscilator is one of the most important component on digital synthesizer. We can not sidestep for using PCMs now and then. And multi-core processing is entering into the mainstream of every computation ,including music-DSP. Do you have any idea for overcoming this dilemma? I want to know technique for rather typical architecture (Intel based PC , GPGPU , or..) than designing of new hardware. Thank you Tatsuya Kato From didid at skynet.be Sat Jul 12 23:04:14 2008 From: didid at skynet.be (Didier Dambrin) Date: Sat Jul 12 23:04:53 2008 Subject: [music-dsp] How to optimize PCM synth implementation onconsideration of memory locality In-Reply-To: <001101c8e492$49efce70$0201a8c0@CoreCore> References: <001101c8e492$49efce70$0201a8c0@CoreCore> Message-ID: <42D1034D50334443A8FAC83B211D3175@GOLAMD> Is it for additive synthesis (large amount), and in this case aren't you only interested in sine oscillators? > HI ,all > > Now I am interested in how to run a large amount of PCM oscilators in > realtime and simultaneously. > > You know, recent multi-core architecture is speeding up its > peak-performance of calculation, > but relatively slowing down the bandwidth of main memory. > So, cache or local memory strategy is getting more importance of > supporting CPU's peak-performance. > > These strategy is relying on the locality of memory accessing. > (Assumption that one processor may access to the limited range of memory > while short time interval.) > > However, the clustered PCM oscilators tend to access over a wide range of > storage at same time. > This tend voids the memory locality premise, and wastes the most valuable > CPU power. > > Of couse, PCM oscilator is one of the most important component on digital > synthesizer. > We can not sidestep for using PCMs now and then. > And multi-core processing is entering into the mainstream of every > computation ,including music-DSP. > > Do you have any idea for overcoming this dilemma? > > I want to know technique for rather typical architecture (Intel based PC , > GPGPU , or..) > than designing of new hardware. > > Thank you > Tatsuya Kato > -- > 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 > > No virus found in this incoming message. > Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus Database: > 270.4.10/1549 - Release Date: 12/07/2008 16:31 > > > From fwks5029 at mb.infoweb.ne.jp Sun Jul 13 05:53:04 2008 From: fwks5029 at mb.infoweb.ne.jp (kato tatsuya) Date: Sun Jul 13 05:53:26 2008 Subject: [music-dsp] Re:How to optimize PCM synth implementation References: <20080713030458.934512E25DF2E@music.columbia.edu> Message-ID: <000d01c8e4ce$3ea78120$0201a8c0@CoreCore> Hi! Didier Thank you your question! > Is it for additive synthesis (large amount), and in this case aren't you > only interested in sine oscillators? Sorry for my unclear expression. I said "PCM oscilators" in meaning of Sample playback oscilator which playback audio sample from memory or harddisk(when a sample size is too big) in specified speed (pitch). I think this type of oscilator is used very often, but it is difficult to localize memory access. thank you , Tatsuya Kato > > > > >> HI ,all >> >> Now I am interested in how to run a large amount of PCM oscilators in >> realtime and simultaneously. >> >> You know, recent multi-core architecture is speeding up its >> peak-performance of calculation, >> but relatively slowing down the bandwidth of main memory. >> So, cache or local memory strategy is getting more importance of >> supporting CPU's peak-performance. >> >> These strategy is relying on the locality of memory accessing. >> (Assumption that one processor may access to the limited range of memory >> while short time interval.) >> >> However, the clustered PCM oscilators tend to access over a wide range of >> storage at same time. >> This tend voids the memory locality premise, and wastes the most valuable >> CPU power. >> >> Of couse, PCM oscilator is one of the most important component on digital >> synthesizer. >> We can not sidestep for using PCMs now and then. >> And multi-core processing is entering into the mainstream of every >> computation ,including music-DSP. >> >> Do you have any idea for overcoming this dilemma? >> >> I want to know technique for rather typical architecture (Intel based PC >> , >> GPGPU , or..) >> than designing of new hardware. >> >> Thank you >> Tatsuya Kato From rainer at buchty.net Sun Jul 13 06:42:29 2008 From: rainer at buchty.net (Rainer Buchty) Date: Sun Jul 13 06:42:44 2008 Subject: [music-dsp] How to optimize PCM synth implementation on consideration of memory locality In-Reply-To: <001101c8e492$49efce70$0201a8c0@CoreCore> References: <001101c8e492$49efce70$0201a8c0@CoreCore> Message-ID: On Sun, 13 Jul 2008, kato tatsuya wrote: > Do you have any idea for overcoming this dilemma? Just my completely untested ideas based on my day-time experience with regard to optimizing memory access in parallel systems. What you basically want to achieve is what parallel programmers call data locality optimization, i.e. making full use of your respective local memory hierarchy. Caching just subsequent samples of the same wave (as it would happen with the naive approach of just storing wave after wave) is probably making not too much sense cause it is unlikely that the other PCM oscillators will use the same waveform and be in the same phase, hence, you're wasting an entire cache line for data you'll require next in some hundred milliseconds, i.e. which by then will be evicted from the cache. What you could try is intermixing the waves in memory so that subsequent memory locations only refer to same phase, but not same sample, i.e. instead of 1.1 1.2 1.3 1.4 ... 2.1 2.2 2.3 2.4 ... where X.Y the Yth sample of wave X, you could go for 1.1 2.1 3.1 4.1 ... 1.2 2.2 3.2 4.2 ... That might help getting more wave data cached and shouldn't be problematic with regard to the phase accu (you just left-shift the index). Maybe it is possible to even do an on-demand memory layout during playback (like packing currently used waves in memory together according to the oscillator assignment, e.g. 1.Y 4.Y 2.Y 3.Y instead of linear lineup) so that the waveform layout in memory is altered to match the current oscillator/wave assignments. This might harm performance with every program change and "note on" message, but maybe is worth a shot. We did similar stuff with numerical computations on clusters, where pages were automatically migrated among nodes; of course, there the problems run for much longer (as in several hours to days) and slowing down shortly for a greatly enhanced processing time afterwards does pay off easily. Plus, we don't have some 48/96kHz schedule to fulfill... But maybe others already tried such techniques in the audio real-time domain and can comment? Rainer From douglas at music.columbia.edu Sun Jul 13 10:37:10 2008 From: douglas at music.columbia.edu (douglas repetto) Date: Sun Jul 13 10:37:21 2008 Subject: [music-dsp] fast sin(x) function In-Reply-To: <20080711174341.BBF8E5481F0@ws6-6.us4.outblaze.com> References: <20080711174341.BBF8E5481F0@ws6-6.us4.outblaze.com> Message-ID: <487A1316.3080904@music.columbia.edu> robert bristow-johnson wrote: >> ----- Original Message ----- From: "douglas repetto" >> >> The sine discussion seems to have played itself out. A lot more >> info was added after Andy Farnell put together the first round of >> posts. R b-j, are you still up for putting everything into a FAQ? > > well, i am not sure exactly what to do other than write the content > that i had. I didn't follow the subsequent discussion closely, but it seemed like there were a bunch of posts refining things after you posted your first pass. So maybe some of that stuff should be integrated? > ooops. i just realized that i didn't do the last installment which > is to formally discuss using finite order power series to evaluate > sin(x) (over some limited domain around x=0). i'm on a vacation car > trip now (currently in Rapid City SD) but and it won't end until > about 3 weeks. can i add that last section later? Sure. > in terms of the other sections that i already wrote and posted to the > list, what else exactly needs to be done with it to be put into a > FAQ? i was thinking that it needed to be reviewed for > accuracy/mistakes and for other perspectives (in the likely case that > i'm overlooking something that should be said). if the FAQ is ASCII > only, then i am not sure what else to do with thoose sections, but i > am happy to leave that to others to do with them what they think > those sections need to be done to them for inclusion. Andy's first pass was a great example of making a FAQ -- you go through all of the messages in the threads and try to extract the distinct ideas. Then you order them and format them in some reasonable way. That helps remove redundancy and catches errors that were made in earlier posts that were corrected later. We can have images in the FAQ if we want, formulas, function plots, animated gifs of kittens falling asleep, whatever. > anyway, i can sorta monitor this while on this long car trip, but i > can't do anything of substance until i get back. i don't have, on > hand, any of my books or MATLAB programs or anything to refer to. No problem, have a fun trip! douglas -- ............................................... http://artbots.org .....douglas.....irving........................ http://dorkbot.org .......................... http://music.columbia.edu/cmc/music-dsp .......... repetto............. http://music.columbia.edu/organism ............................... http://music.columbia.edu/~douglas From jenner at neurotix.com Mon Jul 14 09:49:05 2008 From: jenner at neurotix.com (Jenner Fusari) Date: Mon Jul 14 09:49:17 2008 Subject: [music-dsp] Re: How to detect the filter gain using the coefficients? In-Reply-To: <20080711143506.15B0B2E24AA27@music.columbia.edu> References: <20080711143506.15B0B2E24AA27@music.columbia.edu> Message-ID: <487B5951.90502@neurotix.com> music-dsp-request@music.columbia.edu ha scritto: > Take the absolute value of the H(Z) transfer function in the Z-domain. A [...] > bandwidth. To find out the peak gain, take the maxima of the magnitude > response function along with 0 and Pi and find the biggest value. Thanks for all your answer. The above method posted by Vesa Norilo is interesting. To speed up the calculation may I get the magnitude of a limited number of frequencies (about a dozen...) and get the gain thru a sort of interpolation between the real values. BTW I understood, while re-reading my question, that there are many side problems in adjusting the gain: for example if I have a resonance peak has no sense to adjust the gain because I'll lose the "sound dynamics" of having such character of the filter. A question about sticking with the formulas. Is there any good Math package for Linux that I can use to simplify/solve equations, making variable substitution and related stuff? Thanks again, Jenner From bogac at bteaudio.com Mon Jul 14 11:33:57 2008 From: bogac at bteaudio.com (Bogac Topaktas) Date: Mon Jul 14 11:34:06 2008 Subject: [music-dsp] Re: How to detect the filter gain using thecoefficients? Message-ID: > A question about sticking with the formulas. Is there any good Math > package for Linux that I can use to simplify/solve equations, making > variable substitution and related stuff? Maxima http://maxima.sourceforge.net/ Sage http://www.sagemath.org/ -----Original message----- From: Jenner Fusari jenner@neurotix.com Date: Mon, 14 Jul 2008 05:49:26 -0700 To: music-dsp@music.columbia.edu Subject: [music-dsp] Re: How to detect the filter gain using thecoefficients? > music-dsp-request@music.columbia.edu ha scritto: > > Take the absolute value of the H(Z) transfer function in the Z-domain. A > [...] > > bandwidth. To find out the peak gain, take the maxima of the magnitude > > response function along with 0 and Pi and find the biggest value. > > Thanks for all your answer. > The above method posted by Vesa Norilo is interesting. > To speed up the calculation may I get the magnitude of a limited number > of frequencies (about a dozen...) and get the gain thru a sort of > interpolation between the real values. > > BTW I understood, while re-reading my question, that there are many side > problems in adjusting the gain: for example if I have a resonance peak > has no sense to adjust the gain because I'll lose the "sound dynamics" > of having such character of the filter. > > A question about sticking with the formulas. Is there any good Math > package for Linux that I can use to simplify/solve equations, making > variable substitution and related stuff? > > Thanks again, > Jenner > -- > 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 cheater00 at gmail.com Mon Jul 14 12:28:23 2008 From: cheater00 at gmail.com (cheater cheater) Date: Mon Jul 14 12:28:34 2008 Subject: [music-dsp] How to optimize PCM synth implementation on consideration of memory locality In-Reply-To: References: <001101c8e492$49efce70$0201a8c0@CoreCore> Message-ID: Rainer, this doesn't work for oscillators of different pitches. Cheers On 7/13/08, Rainer Buchty wrote: > On Sun, 13 Jul 2008, kato tatsuya wrote: > > > > Do you have any idea for overcoming this dilemma? > > > > Just my completely untested ideas based on my day-time experience with > regard to optimizing memory access in parallel systems. > > What you basically want to achieve is what parallel programmers call data > locality optimization, i.e. making full use of your respective local memory > hierarchy. Caching just subsequent samples of the same wave (as it would > happen with the naive approach of just storing wave after wave) is probably > making not too much sense cause it is unlikely that the other PCM > oscillators will use the same waveform and be in the same phase, hence, > you're wasting an entire cache line for data you'll require next in some > hundred milliseconds, i.e. which by then will be evicted from the cache. > > What you could try is intermixing the waves in memory so that subsequent > memory locations only refer to same phase, but not same sample, i.e. instead > of > > 1.1 1.2 1.3 1.4 ... > 2.1 2.2 2.3 2.4 ... > > where X.Y the Yth sample of wave X, you could go for > > 1.1 2.1 3.1 4.1 ... > 1.2 2.2 3.2 4.2 ... > > That might help getting more wave data cached and shouldn't be problematic > with regard to the phase accu (you just left-shift the index). > > Maybe it is possible to even do an on-demand memory layout during playback > (like packing currently used waves in memory together according to the > oscillator assignment, e.g. 1.Y 4.Y 2.Y 3.Y instead of linear lineup) so > that the waveform layout in memory is altered to match the current > oscillator/wave assignments. This might harm performance with every program > change and "note on" message, but maybe is worth a shot. > > We did similar stuff with numerical computations on clusters, where pages > were automatically migrated among nodes; of course, there the problems run > for much longer (as in several hours to days) and slowing down shortly for a > greatly enhanced processing time afterwards does pay off easily. Plus, we > don't have some 48/96kHz schedule to fulfill... > > But maybe others already tried such techniques in the audio real-time > domain and can comment? > > Rainer > > > -- > 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 padawan12 at obiwannabe.co.uk Mon Jul 14 13:16:04 2008 From: padawan12 at obiwannabe.co.uk (Andy Farnell) Date: Mon Jul 14 13:16:41 2008 Subject: [music-dsp] How to hear sombody elses voice In-Reply-To: References: Message-ID: <20080714181604.2591a2f4.padawan12@obiwannabe.co.uk> You ask an interesting question Till. In a neurological/psychological sense there's a danger of wandering into the realm of philosophy. Perhaps the best we can do within a scientific framework is suggest you look at head transfer responses. The shape of the head, nose, ears, hair, cheekbones etc, gives a unique binaural perception. Although there's a 'standard head model' for binaural recording it will differ from real individuals. What is the the effect of this? Maybe there's a good research project in that. I suspect it's like looking through the glasses of someone with a different optical presciption than you. a. On Thu, 10 Jul 2008 21:13:42 +0200 "Till Crueger" wrote: > Hi, > > I was wondering, if any of you know a system, that allows you to hear > someone elses voice, in the way, they hear it. I am not sure, if this > would actually be possible though, since the specific resonance might be > different for different people. Still if you could measure all the > relevant parameters, would it not be possible to construct a System, that > changes recorded sounds of their voice to the way, they percieve it? > > > If any of you have any pointers in that direction, I would appreciate it, > > Till > > -- > "If I were to command a general to turn into a seagull, and if the general > did not obey, that would not be the general's fault. It would be mine." > --Antoine de Saint-Exupery (Le Petit Prince) > -- > 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 -- Use the source From gmaxwell at gmail.com Mon Jul 14 13:27:43 2008 From: gmaxwell at gmail.com (Gregory Maxwell) Date: Mon Jul 14 13:27:52 2008 Subject: [music-dsp] How to hear sombody elses voice In-Reply-To: References: Message-ID: On Thu, Jul 10, 2008 at 3:13 PM, Till Crueger wrote: > Hi, > > I was wondering, if any of you know a system, that allows you to hear > someone elses voice, in the way, they hear it. I am not sure, if this would > actually be possible though, since the specific resonance might be different > for different people. Still if you could measure all the relevant > parameters, would it not be possible to construct a System, that changes > recorded sounds of their voice to the way, they percieve it? [snip] I'd imagine that it should be possible to design some kind of pickup that measures the motion of the tympanic membrane (perhaps some kind of laser deflection pickup or ultrasonic probe?). If you had one of those, you could place an additional microphone external to the person and have the person talk. From there you could use deconvolution with the two recordings to find the linear system that relates the internal and the external sound, presuming that most of the difference is from linear time invariant effects. Obviously the details of the resulting filter would be person specific, though it might be that the bulk of the behavior is similar among large groups of people. I'm not sure what applications this would have, but it would be a cute bit of research to do if you already happened to have something that could function as a tympanic pickup. From rainer at buchty.net Mon Jul 14 14:56:22 2008 From: rainer at buchty.net (Rainer Buchty) Date: Mon Jul 14 14:56:32 2008 Subject: [music-dsp] How to optimize PCM synth implementation on consideration of memory locality In-Reply-To: References: <001101c8e492$49efce70$0201a8c0@CoreCore> Message-ID: On Mon, 14 Jul 2008, cheater cheater wrote: > this doesn't work for oscillators of different pitches. It would be far from being perfect, especially with current high-resolution gigasamples (or anything beyond simple single-cycle waveforms), but assume that you for ease of example have - a direct-mapped cache with a line size of 64 bytes - 8 different waveforms - 8 bit resolution - L1 D-Cache of 16kB (e.g. Pentium III) - L2 I/D-Cache of 512kB (e.g. Pentium III-S Tualatin) With that numbers, L1 cache is good for 2k entries, i.e. if the waveforms are up to 2kB in size, they will fit entirely into L1 cache. And as long as we want to keep all waves in L1 or L2 cache, they may get even 64kB long. While this is a rather constructed example for arbitrary PCM playback, it never the less should be possible to run Fourier, Walsh or also later Yamaha-style FM synthesis (the one with the 8 or 16 different basic waveforms) completely from cache. Likewise, some simple digital oscillators (e.g. Ensoniq ESQ1, Korg DW8000 and the likes) should be fine, especially when combined with prefetching. Rainer From paul.kellett at mda-vst.com Mon Jul 14 15:20:57 2008 From: paul.kellett at mda-vst.com (Paul) Date: Mon Jul 14 15:21:10 2008 Subject: [music-dsp] Re: How to hear sombody elses voice Message-ID: <65a610fc0807141220l21183056ib74564febea30f07@mail.gmail.com> > I was wondering, if any of you know a system, that allows you to hear > someone elses voice, in the way, they hear it. I am not sure, if this > would actually be possible though, since the specific resonance might > be different for different people. Still if you could measure all the > relevant parameters, would it not be possible to construct a System, that > changes recorded sounds of their voice to the way, they percieve it? How about this manual method: microphone -> delay line -> EQ -> speakers speak into the mic, and adjust the EQ until the delayed version sounds the same as the original did in your head. If it's not possible to match the two using EQ alone that would also be an interesting result. Paul From cheater00 at gmail.com Mon Jul 14 15:31:18 2008 From: cheater00 at gmail.com (cheater cheater) Date: Mon Jul 14 15:31:28 2008 Subject: [music-dsp] Re: How to hear sombody elses voice In-Reply-To: <65a610fc0807141220l21183056ib74564febea30f07@mail.gmail.com> References: <65a610fc0807141220l21183056ib74564febea30f07@mail.gmail.com> Message-ID: Interesting. Are we going into neural network feedback designs? ;) On 7/14/08, Paul wrote: > > I was wondering, if any of you know a system, that allows you to hear > > someone elses voice, in the way, they hear it. I am not sure, if this > > would actually be possible though, since the specific resonance might > > be different for different people. Still if you could measure all the > > relevant parameters, would it not be possible to construct a System, that > > changes recorded sounds of their voice to the way, they percieve it? > > > > How about this manual method: > > microphone -> delay line -> EQ -> speakers > > speak into the mic, and adjust the EQ until the delayed version sounds > the same as the original did in your head. > > If it's not possible to match the two using EQ alone that would also be an > interesting result. > > > Paul > > -- > 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 douglas at music.columbia.edu Tue Jul 15 00:00:01 2008 From: douglas at music.columbia.edu (douglas repetto) Date: Tue Jul 15 00:00:06 2008 Subject: [music-dsp] [admin] music-dsp FAQ Message-ID: <20080715040001.222752E276D80@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 dwuertz at gmx.net Tue Jul 15 05:55:49 2008 From: dwuertz at gmx.net (=?ISO-8859-1?Q?Dominique_W=FCrtz?=) Date: Tue Jul 15 05:53:47 2008 Subject: [music-dsp] Tape Delay Message-ID: <487C7425.7050008@gmx.net> Hi all, I'd like to create a tape delay style effect. In particular, I want to emulate the pitch shifting effect occuring when rapidly changing the delay time. A fundamental question is: which mechanism is used in a real tape delay (such as Space Echo or Echoplex) to alter delay time, is it 1) changing speed of tape or 2) varying the distance between write and read head or 3) are those two approaches basically equivalent? Regards, Dominique From richarddobson at blueyonder.co.uk Tue Jul 15 06:14:21 2008 From: richarddobson at blueyonder.co.uk (Richard Dobson) Date: Tue Jul 15 06:16:19 2008 Subject: [music-dsp] Tape Delay In-Reply-To: <487C7425.7050008@gmx.net> References: <487C7425.7050008@gmx.net> Message-ID: <487C787D.9030900@blueyonder.co.uk> Dominique W?rtz wrote: > Hi all, > > I'd like to create a tape delay style effect. In particular, I want to > emulate the pitch shifting effect occuring when rapidly changing the > delay time. A fundamental question is: which mechanism is used in a real > tape delay (such as Space Echo or Echoplex) to alter delay time, is it > 1) changing speed of tape or > 2) varying the distance between write and read head or > 3) are those two approaches basically equivalent? > > Regards, > Dominique > > I don't remember any machines with moveable heads. As the distances and speeds would presumably be small, the range of variation would be somewhat limited. Varispeed machines (such as the famous Revox widely used in electro-acoustic music) would offer a much wider effect range, and are equivalent to dynamically changing the sample rate (i.e. pitch relates directly to speed). If there is a head-moving device (with constant tape speed), it would generate a slight Doppler effect (i.e. pitch change only while the head is moving), which can be emulated easily and almost literally, using an interpolating (or fractional) variable delay line. Modulate the delay with a sinusoid and you will get a sort of vibrato effect (e.g. like a Leslie rotating speaker). It's the basis of many effects - flanger, phaser, even some reverbs. Richard Dobson From mdsp at smartelectronix.com Tue Jul 15 06:26:47 2008 From: mdsp at smartelectronix.com (mdsp) Date: Tue Jul 15 06:27:07 2008 Subject: [music-dsp] Tape Delay In-Reply-To: <487C787D.9030900@blueyonder.co.uk> References: <487C7425.7050008@gmx.net> <487C787D.9030900@blueyonder.co.uk> Message-ID: <487C7B67.5060808@smartelectronix.com> Richard Dobson a ?crit : > I don't remember any machines with moveable heads. the echoplex: http://www.hestudiotechnik.de/image/outboard/2008/echoplex.jpg had a movable head instead of a variable speed. However AFAIK most tape echos use a variable speed with a fixed tape length. From k.s.matheussen at notam02.no Tue Jul 15 07:20:09 2008 From: k.s.matheussen at notam02.no (Kjetil S. Matheussen) Date: Tue Jul 15 07:20:35 2008 Subject: [music-dsp] Re: How to hear sombody elses voice In-Reply-To: <20080715040016.0AC612E276DCC@music.columbia.edu> References: <20080715040016.0AC612E276DCC@music.columbia.edu> Message-ID: >> I was wondering, if any of you know a system, that allows you to hear >> someone elses voice, in the way, they hear it. I am not sure, if this >> would actually be possible though, since the specific resonance might >> be different for different people. Still if you could measure all the >> relevant parameters, would it not be possible to construct a System, that >> changes recorded sounds of their voice to the way, they percieve it? There's some work on this here: http://ccrma.stanford.edu/~sywon/research/research.htm Seems like she made some software as well: http://ccrma.stanford.edu/~sywon/research/OnesOwnHearing/OnesOwnHearing.htm But I don't see any download link. From mdsp-erikd at mega-nerd.com Tue Jul 15 07:36:57 2008 From: mdsp-erikd at mega-nerd.com (Erik de Castro Lopo) Date: Tue Jul 15 07:36:26 2008 Subject: [music-dsp] Tape Delay In-Reply-To: <487C787D.9030900@blueyonder.co.uk> References: <487C7425.7050008@gmx.net> <487C787D.9030900@blueyonder.co.uk> Message-ID: <20080715213657.c8f21112.mdsp-erikd@mega-nerd.com> Richard Dobson wrote: > Varispeed machines (such as the famous Revox widely > used in electro-acoustic music) would offer a much wider effect range, > and are equivalent to dynamically changing the sample rate (i.e. pitch > relates directly to speed). There is a demo program in the libsamplerate disribution called varispeed-play which does this. That might be a good starting point. Erik -- ----------------------------------------------------------------- Erik de Castro Lopo ----------------------------------------------------------------- "Perl as a language has less a design than a thousand special features flying in close formation." -- From the c2 wiki From tom_info at ticino.com Tue Jul 15 08:07:25 2008 From: tom_info at ticino.com (Tom O'Hara) Date: Tue Jul 15 08:06:13 2008 Subject: [music-dsp] Tape Delay In-Reply-To: <487C7425.7050008@gmx.net> References: <487C7425.7050008@gmx.net> Message-ID: <487C92FD.1020509@ticino.com> All the tape delays I recall seeing were endless loops with movable heads, i.e. Echoplex. You could do it with varispeed, but obviously one would get a better and more quickly acting control with constant speed and movable heads. As I recall, there were also echo machines with multiple playback heads as well, but this was 30 years ago. As far as Studer/Revox tape machines (I worked there in the mid-'80s to '90), that was for synchronization and special effects (pitch/temp changes, etc.), not echo, and rapid speed changes were not something they did. BTW, even Revox turntables and Studer CD players had vari-speed. Dominique W?rtz wrote: > Hi all, > > I'd like to create a tape delay style effect. In particular, I want to > emulate the pitch shifting effect occuring when rapidly changing the > delay time. A fundamental question is: which mechanism is used in a real > tape delay (such as Space Echo or Echoplex) to alter delay time, is it > 1) changing speed of tape or > 2) varying the distance between write and read head or > 3) are those two approaches basically equivalent? > Tom From earlevel at earlevel.com Tue Jul 15 09:38:05 2008 From: earlevel at earlevel.com (Nigel Redmon) Date: Tue Jul 15 09:38:16 2008 Subject: [music-dsp] Tape Delay In-Reply-To: <487C92FD.1020509@ticino.com> References: <487C7425.7050008@gmx.net> <487C92FD.1020509@ticino.com> Message-ID: <95806739-E311-45BB-B082-ADD298DC2ECD@earlevel.com> On Jul 15, 2008, at 5:07 AM, Tom O'Hara wrote: > All the tape delays I recall seeing were endless loops with movable > heads, i.e. Echoplex. The Roland Space Echo was a very popular variable speed, fixed (multiple head) unit. Before that, I owned a Univox tape delay that was variable speed. From dakbari at gmail.com Tue Jul 15 11:44:43 2008 From: dakbari at gmail.com (David Akbari) Date: Tue Jul 15 11:45:01 2008 Subject: [music-dsp] How to hear sombody elses voice In-Reply-To: <20080714181604.2591a2f4.padawan12@obiwannabe.co.uk> References: <20080714181604.2591a2f4.padawan12@obiwannabe.co.uk> Message-ID: <98017c350807150844i4fc46ef3sf4b4bc355ede8386@mail.gmail.com> I like the method you are proposing but the only problem is that your model assumes that within an individual you only are getting sound transduced through the tympanic membrane. What this model fails to take into account is that when we are speaking, the vibration produced by the vibration of the vocal folds transfers directly to the cochlea by means of bone conduction. This is proven from some of the deprecated clinical diagnostic tests in the field of audiology where a tuning fork is struck and held to either a place on the forehead on mastoid. The point is that when we are hearing sound, it doesn't always get to the cochlea through the tympanic membrance exclusively. All things considered it should be feasible to construct a model that takes into account both the amount of sound transferring through the tympanic membrane into the ossicular chain and the amount of implicit bone conduction. You may also have to take into account individual things that can shape the way a person perceives the quality of their own voice; eardrum pathologies (for example if the pars tensa is weak from a person having had PE tubes in their youth to treat chronic otitis media), occluding exostoses or cerumen in the external auditory meatus, conductive or sensironeural hearing loss, etc etc -David On Mon, Jul 14, 2008 at 12:16 PM, Andy Farnell wrote: > > > > You ask an interesting question Till. In a neurological/psychological > sense there's a danger of wandering into the realm of philosophy. Perhaps > the best we can do within a scientific framework is suggest you look > at head transfer responses. > > The shape of the head, nose, ears, hair, cheekbones etc, gives a unique > binaural perception. Although there's a 'standard head model' for > binaural recording it will differ from real individuals. What is the > the effect of this? Maybe there's a good research project in that. I suspect > it's like looking through the glasses of someone with a different optical > presciption than you. > > a. > > > On Thu, 10 Jul 2008 21:13:42 +0200 > "Till Crueger" wrote: > >> Hi, >> >> I was wondering, if any of you know a system, that allows you to hear >> someone elses voice, in the way, they hear it. I am not sure, if this >> would actually be possible though, since the specific resonance might be >> different for different people. Still if you could measure all the >> relevant parameters, would it not be possible to construct a System, that >> changes recorded sounds of their voice to the way, they percieve it? >> >> >> If any of you have any pointers in that direction, I would appreciate it, >> >> Till >> >> -- >> "If I were to command a general to turn into a seagull, and if the general >> did not obey, that would not be the general's fault. It would be mine." >> --Antoine de Saint-Exupery (Le Petit Prince) >> -- >> 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 > > > -- > Use the source > -- > 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 pfultz2 at yahoo.com Tue Jul 15 18:37:27 2008 From: pfultz2 at yahoo.com (paul Fultz) Date: Tue Jul 15 18:37:36 2008 Subject: [music-dsp] Higher order bilinear transform approxiamtion Message-ID: <900018.94611.qm@web90602.mail.mud.yahoo.com> Bilinear transform uses a first-order approximation for s = ln(z)/T which is s = (2/T)*(1-z)/(1+z), but what about using a higher order approxiamtion such as: s = (2/T)*(v + (v^3)/3 . . .) where v = (1-z)/(1+z)? I know this would increase the order of the digital filter but I also heard somewhere that this can cause unstability for certain frequencies, is this true? or would it cause unstability if i integrated using the simpsons rule also? thanks, paul From vadim.zavalishin at native-instruments.de Wed Jul 16 05:24:49 2008 From: vadim.zavalishin at native-instruments.de (Vadim Zavalishin) Date: Wed Jul 16 05:24:25 2008 Subject: [music-dsp] Higher order bilinear transform approxiamtion References: <900018.94611.qm@web90602.mail.mud.yahoo.com> Message-ID: <001901c8e725$cb618030$6c02010a@NIBLN00166> > Bilinear transform uses a first-order approximation for s = ln(z)/T which > is s = (2/T)*(1-z)/(1+z), but what about using a higher order > approxiamtion such as: s = (2/T)*(v + (v^3)/3 . . .) where v = > (1-z)/(1+z)? I know this would increase the order of the digital filter > but I also heard somewhere that this can cause unstability for certain > frequencies, is this true? or would it cause unstability if i integrated > using the simpsons rule also? > > thanks, > paul I had similar thoughts a while ago. I don't think that would cause an instability since such expansion should still map the left s-semiplane to the inside of the unit z-circle. However, the order of your z-domain filter will then be higher than the order of the s-domain one, so that instead you could try a higher sampling rate with about the same CPU load. Also you should still expect to get frequency axis distortion near fs/2, which is another argument in favor of the sampling rate. Still I would be interested to see some more in-depth research in this direction (with transfer function graph comparisons against the basic bilinear version and the oversampled one etc). One should also be able to use the techniques outlined in my article "Preserving the LTI system topology..." with such higher order approximations (sounds like self-promotion, well I didn't mean to, I'm really interested to see how it would work in this case :-) Regards, Vadim -- Vadim Zavalishin Senior Software Developer | R&D Tel +49-30-611035-0 Fax +49-30-611035-2600 vadim.zavalishin@native-instruments.de NATIVE INSTRUMENTS GmbH Schlesische Str. 28 10997 Berlin, Germany http://www.native-instruments.com Registergericht: Amtsgericht Charlottenburg Registernummer: HRB 72458 UST.-ID.-Nr. DE 20 374 7747 Geschaeftsfuehrer: Daniel Haver, Stephan Schmitt From pfultz2 at yahoo.com Wed Jul 16 12:06:20 2008 From: pfultz2 at yahoo.com (paul Fultz) Date: Wed Jul 16 12:06:37 2008 Subject: [music-dsp] Higher order bilinear transform approxiamtion In-Reply-To: <001901c8e725$cb618030$6c02010a@NIBLN00166> Message-ID: <357387.46588.qm@web90606.mail.mud.yahoo.com> Well using the series expansion seems to make the frequency warping worse, unless im doing the math wrong here, here is the frequency mapping i have: f=(2/T)*(tan(w*2/T) + (tan(w*2/T)^3)/3 . . .) perhaps using simpson rule to intregrate 1/x might be a better approximation. --- On Wed, 7/16/08, Vadim Zavalishin wrote: > From: Vadim Zavalishin > Subject: Re: [music-dsp] Higher order bilinear transform approxiamtion > To: "A discussion list for music-related DSP" > Date: Wednesday, July 16, 2008, 5:24 AM > > Bilinear transform uses a first-order approximation for > s = ln(z)/T which > > is s = (2/T)*(1-z)/(1+z), but what about using a > higher order > > approxiamtion such as: s = (2/T)*(v + (v^3)/3 . . .) > where v = > > (1-z)/(1+z)? I know this would increase the order of > the digital filter > > but I also heard somewhere that this can cause > unstability for certain > > frequencies, is this true? or would it cause > unstability if i integrated > > using the simpsons rule also? > > > > thanks, > > paul > > I had similar thoughts a while ago. I don't think that > would cause an > instability since such expansion should still map the left > s-semiplane to > the inside of the unit z-circle. However, the order of your > z-domain filter > will then be higher than the order of the s-domain one, so > that instead you > could try a higher sampling rate with about the same CPU > load. Also you > should still expect to get frequency axis distortion near > fs/2, which is > another argument in favor of the sampling rate. > > Still I would be interested to see some more in-depth > research in this > direction (with transfer function graph comparisons against > the basic > bilinear version and the oversampled one etc). One should > also be able to > use the techniques outlined in my article "Preserving > the LTI system > topology..." with such higher order approximations > (sounds like > self-promotion, well I didn't mean to, I'm really > interested to see how it > would work in this case :-) > > Regards, > Vadim > > -- > Vadim Zavalishin > Senior Software Developer | R&D > > Tel +49-30-611035-0 > Fax +49-30-611035-2600 > vadim.zavalishin@native-instruments.de > > NATIVE INSTRUMENTS GmbH > Schlesische Str. 28 > 10997 Berlin, Germany > http://www.native-instruments.com > > Registergericht: Amtsgericht Charlottenburg > Registernummer: HRB 72458 > UST.-ID.-Nr. DE 20 374 7747 > Geschaeftsfuehrer: Daniel Haver, Stephan Schmitt > > -- > 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 vadim.zavalishin at native-instruments.de Wed Jul 16 13:27:43 2008 From: vadim.zavalishin at native-instruments.de (Vadim Zavalishin) Date: Wed Jul 16 13:27:21 2008 Subject: [music-dsp] Higher order bilinear transform approxiamtion References: <357387.46588.qm@web90606.mail.mud.yahoo.com> Message-ID: <000a01c8e769$415793e0$6c02010a@NIBLN00166> > Well using the series expansion seems to make the frequency warping worse, > unless im doing the math wrong here, here is the frequency mapping i have: > f=(2/T)*(tan(w*2/T) + (tan(w*2/T)^3)/3 . . .) > perhaps using simpson rule to intregrate 1/x might be a better > approximation. I think it should be f=(2/T)*(tan(w*2/T) - (tan(w*2/T)^3)/3 . . .) because of the imaginary unit. Still doesn't warp nicely though. Maybe convergence of the series is the reason. You were right regarding the stability, while the unit circle transforms into the imaginary axis, e.g. z=(-1+j)/2 gets transformed into the positive semiplane. Please keep us posted regarding your results, I think the subject is very interesting. -- Vadim Zavalishin Senior Software Developer | R&D Tel +49-30-611035-0 Fax +49-30-611035-2600 NATIVE INSTRUMENTS GmbH Schlesische Str. 28 10997 Berlin, Germany http://www.native-instruments.com Registergericht: Amtsgericht Charlottenburg Registernummer: HRB 72458 UST.-ID.-Nr. DE 20 374 7747 Geschaeftsfuehrer: Daniel Haver, Stephan Schmitt From ltramme1476 at earthlink.net Sat Jul 19 14:16:11 2008 From: ltramme1476 at earthlink.net (Larry Trammell (aka RidgeRat)) Date: Sat Jul 19 14:15:08 2008 Subject: [music-dsp] Higher order bilinear transform approxiamtion In-Reply-To: <900018.94611.qm@web90602.mail.mud.yahoo.com> References: <900018.94611.qm@web90602.mail.mud.yahoo.com> Message-ID: <48822F6B.2020801@earthlink.net> The paper "Higher Order s-to-z Mapping Functions and Their Applications" in the Proceedings of the IEEE v79 n11 Nov 1991 pp 1661-1674, by Schneider, Kaneshige, and Groutage, describes a family of alternative mappings. These mappings are obtained by noticing that the inverse 1/s in the frequency domain is equivalent to time domain integration, so they approximate this integration using a stable Adams-Moulton discrete integral approximation formula, and then do a little algebra to invert the form and get the s-to-z mapping. A second-order integrator (equivalent to Trapezoidal integration rule) yields exactly the same thing as Tustin's bilinear mapping. The next two formulas might be useful, but don't get your hopes up too high... Order 3 - Schneider's method Mapping s = (12/T) (z^2 - z)/(5 z^2 + 8 z - 1) based on integrator x(k) = x(k-1) + (T/12) (5 x(k) + 8 x(k-1) - x(k-2)) Order 4 - SKG method Mapping s = (24/T) (z^3 - z^2)/(9 z^3 + 19 z^2 -5 z + 1) based on integrator x(k) = x(k-1) + (T/24) (9 x(k) + 19 x(k-1) - 5 x(k-2) + 1 ) Have fun experimenting with these. My experience is that they provide good mapping accuracy at lower frequencies, but because of the higher powers of z they basically go crazy -- in a stable way! -- above about 1/2 of the Nyquist frequency. I was not able to get useful results except for lowpass filters, for which I did well enough using pre-warped bilinear transformations. By the way, you might want to be really careful about using Simpson's rule integrators with recursive filtering because it introduces a marginally stable pole. The Moulton formulas as given above don't have the accuracy but they don't suffer from the stability problems. paul Fultz wrote: > Bilinear transform uses a first-order approximation for s = ln(z)/T which is s = (2/T)*(1-z)/(1+z), but what about using a higher order approxiamtion such as: s = (2/T)*(v + (v^3)/3 . . .) where v = (1-z)/(1+z)? I know this would increase the order of the digital filter but I also heard somewhere that this can cause unstability for certain frequencies, is this true? or would it cause unstability if i integrated using the simpsons rule also? > > thanks, > paul > From pfultz2 at yahoo.com Sun Jul 20 16:40:10 2008 From: pfultz2 at yahoo.com (paul Fultz) Date: Sun Jul 20 16:40:20 2008 Subject: [music-dsp] Higher order bilinear transform approxiamtion In-Reply-To: <48822F6B.2020801@earthlink.net> Message-ID: <46210.91827.qm@web90604.mail.mud.yahoo.com> thanks for the information, but these seem to be a worst approximation than the first order bilinear transform for s=ln(z)/T and the frequency warping of course is worst, i would like to try and find a better approximation that at the same time is stable --- On Sat, 7/19/08, Larry Trammell (aka RidgeRat) wrote: > From: Larry Trammell (aka RidgeRat) > Subject: Re: [music-dsp] Higher order bilinear transform approxiamtion > To: "A discussion list for music-related DSP" > Date: Saturday, July 19, 2008, 2:16 PM > The paper "Higher Order s-to-z Mapping Functions and > Their Applications" > in the Proceedings of the IEEE v79 n11 Nov 1991 pp > 1661-1674, by > Schneider, Kaneshige, and Groutage, describes a family of > alternative > mappings. These mappings are obtained by noticing that the > inverse > 1/s in the frequency domain is equivalent to time domain > integration, > so they approximate this integration using a stable > Adams-Moulton > discrete integral approximation formula, and then do a > little algebra > to invert the form and get the s-to-z mapping. A > second-order integrator > (equivalent to Trapezoidal integration rule) yields exactly > the same > thing as Tustin's bilinear mapping. The next two > formulas might > be useful, but don't get your hopes up too high... > > Order 3 - Schneider's method > Mapping s = (12/T) (z^2 - z)/(5 z^2 + 8 z - 1) > based on integrator > x(k) = x(k-1) + (T/12) (5 x(k) + 8 x(k-1) - x(k-2)) > > Order 4 - SKG method > Mapping s = (24/T) (z^3 - z^2)/(9 z^3 + 19 z^2 -5 z + > 1) > based on integrator > x(k) = x(k-1) + (T/24) (9 x(k) + 19 x(k-1) - 5 x(k-2) + > 1 ) > > Have fun experimenting with these. My experience is that > they provide > good mapping accuracy at lower frequencies, but because of > the > higher powers of z they basically go crazy -- in a stable > way! -- > above about 1/2 of the Nyquist frequency. I was not able to > get > useful results except for lowpass filters, for which I did > well > enough using pre-warped bilinear transformations. > > By the way, you might want to be really careful about using > Simpson's rule integrators with recursive filtering > because it > introduces a marginally stable pole. The Moulton formulas > as > given above don't have the accuracy but they don't > suffer from > the stability problems. > > > paul Fultz wrote: > > Bilinear transform uses a first-order approximation > for s = ln(z)/T which is s = (2/T)*(1-z)/(1+z), but what > about using a higher order approxiamtion such as: s = > (2/T)*(v + (v^3)/3 . . .) where v = (1-z)/(1+z)? I know > this would increase the order of the digital filter but I > also heard somewhere that this can cause unstability for > certain frequencies, is this true? or would it cause > unstability if i integrated using the simpsons rule also? > > > > thanks, > > paul > > > > -- > 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 joey.mckay at comp.dit.ie Thu Jul 24 11:18:20 2008 From: joey.mckay at comp.dit.ie (Joey McKay) Date: Thu Jul 24 11:19:38 2008 Subject: [music-dsp] IOWA music samples - processing required? In-Reply-To: <483D8DC9.2020106@comp.dit.ie> References: <251789.85558.qm@web27810.mail.ukl.yahoo.com> <483D8DC9.2020106@comp.dit.ie> Message-ID: <48889D3C.4080803@comp.dit.ie> Hi, Just wondering is anybody on the list familiar with the IOWA music samples? And if you are, do you know how it is best to process the samples for the purpose of classification? This is what I'm trying to do - I'm currently developing a musical instrument ID system. After an extended literature review for my research, the IOWA samples have proved a popular DB for musical instrument ID research.However, I haven't come across any literature which details how the IOWA samples have been processed. For example the file "AltoFlute.ff.C4B4.aiff" contains Alto Flute note samples played in sequence across the frequency note range C4 to B4. Unlike the RWC database there is no mute (silence) gap inserted between the notes in the IOWA samples. I'm wondering how do I continue? In order to train and test classifiers, I'm assuming it is best to separate each note from the IOWA sample and then train using the individual notes. Is this correct? But how does one separate the notes? Is there an efficient process, manual or automated. As the onsets, decays (and other dynamics) are of importance, how does one decide where to make the cut? Maybe I'm over complicating this issue, but if there is somebody out there who has preprocessed the IOWA samples and has thought this task through, then maybe they can assist? Thank you, Joey. From developer at netcologne.de Thu Jul 24 13:45:24 2008 From: developer at netcologne.de (Thomas Rehaag) Date: Thu Jul 24 13:45:51 2008 Subject: [music-dsp] detecting compressed audio / loud commercials on TV References: <46210.91827.qm@web90604.mail.mud.yahoo.com> Message-ID: <4888BFB4.5EA193C@netcologne.de> Hi, I'm just looking for a way to distinguish the audio in "loud" commmercials from the "quiet" movies in TV recordings. It's easy to see that the loud parts are compressed, when you look at the wave forms. So my first attempt was to take audio blocks of ~0.05 seconds (so that the lowest sine waves would fit in) and devide the average signal power by the power of the block's maximum: relPwr = (Sum(samples ** 2)/number of samples) / (maximum ** 2) But the results were not very significant, cause everytime a longer non changing sound appears in a movie (like the sound of a motor or a long vowel from a speaker) relPwr also raises beyond 35%. And some of the loudest parts had a relPwr of < 30% in my recordings. The second aproach was something like the standard deviation of local maxima, but that wasn't really better and brought a bit of confusion about what is a local maximum. So does anybody know a better way to detect the loud parts? Best Regards, Thomas From developer at netcologne.de Thu Jul 24 14:16:52 2008 From: developer at netcologne.de (Thomas Rehaag) Date: Thu Jul 24 14:17:38 2008 Subject: [music-dsp] ps.: detecting compressed audio References: <46210.91827.qm@web90604.mail.mud.yahoo.com> <4888BFB4.5EA193C@netcologne.de> Message-ID: <4888C714.155F14FA@netcologne.de> Hello again, to be a bit more precise: the relPwr approach produce a picture that shows where the commercials hide in a video, after I made a diagram of of a whole recording's relPwr data. But it's far from beeing an adequate algorithm, when it's so easy for ears and eyes (looking at the waveform) to find the exact time, where commercials begin and end. Best Regards, Thomas From hans at fugal.net Thu Jul 24 19:14:54 2008 From: hans at fugal.net (Hans Fugal) Date: Thu Jul 24 19:15:14 2008 Subject: [music-dsp] ps.: detecting compressed audio In-Reply-To: <4888C714.155F14FA@netcologne.de> References: <46210.91827.qm@web90604.mail.mud.yahoo.com> <4888BFB4.5EA193C@netcologne.de> <4888C714.155F14FA@netcologne.de> Message-ID: <48890CEE.2050604@fugal.net> MythTV has pretty good commercial detection. I'm not familiar with the details, but I think it's a conglomeration of several approaches. If detecting commercials is the goal (and if licensing permits) you may look at their source. Thomas Rehaag wrote: > Hello again, > > to be a bit more precise: the relPwr approach produce a picture that > shows where the commercials hide in a video, after I made a diagram of > of a whole recording's relPwr data. > But it's far from beeing an adequate algorithm, when it's so easy for > ears and eyes (looking at the waveform) to find the exact time, where > commercials begin and end. > > Best Regards, > > 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 -- Hans Fugal ; http://hans.fugal.net There's nothing remarkable about it. All one has to do is hit the right keys at the right time and the instrument plays itself. -- Johann Sebastian Bach From rbj at audioimagination.com Fri Jul 25 00:36:19 2008 From: rbj at audioimagination.com (robert bristow-johnson) Date: Fri Jul 25 00:36:35 2008 Subject: [music-dsp] detecting compressed audio / loud commercials on TV Message-ID: <20080725043619.46E4254821A@ws6-6.us4.outblaze.com> > ----- Original Message ----- > From: "Thomas Rehaag" > To: "A discussion list for music-related DSP" > Subject: [music-dsp] detecting compressed audio / loud commercials on TV > Date: Thu, 24 Jul 2008 19:45:24 +0200 > > > I'm just looking for a way to distinguish the audio in "loud" > commercials from the "quiet" movies in TV recordings. i don't have any technique that you hadn't cited, but i just wanna say that i thought about this issue also. those commercials coming on so loud (forcing one to have to deal with that when watching commercial TV) are soooooo annoying that i first was thinking that they ought legislate against it (and then the problem is how to define the perceived volume in terms of signal metrics to provide for unambiguous legal language). but then i thought (as you did, Thomas) that if one could come up with a decent perceived loudness alg that would work well with TV commercials, why not use that information against such commercials to mute them out (or skip over with your TiVo)? anyway, you oughta be able to get as rich as the guys who develop anti-spam sorting algs if you can figger this out, Thomas. every TV with a commercial weeding program that uses the loud and compressed audio of the commercial to spare those watching the TV from the commercial. they would probably figger out a way to get around it, but perhaps they would have to back off on the loud audio if they want their commercial to be sufficiently indistinguishable from the program to survive weeding. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge." From didid at skynet.be Fri Jul 25 00:43:26 2008 From: didid at skynet.be (Didier Dambrin) Date: Fri Jul 25 00:44:14 2008 Subject: [music-dsp] detecting compressed audio / loud commercials on TV In-Reply-To: <20080725043619.46E4254821A@ws6-6.us4.outblaze.com> References: <20080725043619.46E4254821A@ws6-6.us4.outblaze.com> Message-ID: <1B39D500FD82403880592E55955FE537@GOLAMD> It's the same problem with movies, there are movies that you just can't watch if you have neighbors. You have to crank up the volume to understand people speaking, and then blam, someone drops a pencil on a table and that makes a huge noise. Followed by the usual bland car chase/crash that hurts your ears. ----- Original Message ----- From: "robert bristow-johnson" To: "A discussion list for music-related DSP" Sent: Friday, July 25, 2008 6:36 AM Subject: Re: [music-dsp] detecting compressed audio / loud commercials on TV > ----- Original Message ----- > From: "Thomas Rehaag" > To: "A discussion list for music-related DSP" > > Subject: [music-dsp] detecting compressed audio / loud commercials on TV > Date: Thu, 24 Jul 2008 19:45:24 +0200 > > > I'm just looking for a way to distinguish the audio in "loud" > commercials from the "quiet" movies in TV recordings. i don't have any technique that you hadn't cited, but i just wanna say that i thought about this issue also. those commercials coming on so loud (forcing one to have to deal with that when watching commercial TV) are soooooo annoying that i first was thinking that they ought legislate against it (and then the problem is how to define the perceived volume in terms of signal metrics to provide for unambiguous legal language). but then i thought (as you did, Thomas) that if one could come up with a decent perceived loudness alg that would work well with TV commercials, why not use that information against such commercials to mute them out (or skip over with your TiVo)? anyway, you oughta be able to get as rich as the guys who develop anti-spam sorting algs if you can figger this out, Thomas. every TV with a commercial weeding program that uses the loud and compressed audio of the commercial to spare those watching the TV from the commercial. they would probably figger out a way to get around it, but perhaps they would have to back off on the loud audio if they want their commercial to be sufficiently indistinguishable from the program to survive weeding. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge." -- 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 No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus Database: 270.5.5/1571 - Release Date: 24/07/2008 17:42 From tduffy at tascam.com Fri Jul 25 01:46:53 2008 From: tduffy at tascam.com (Tom Duffy) Date: Fri Jul 25 01:47:09 2008 Subject: [music-dsp] detecting compressed audio / loud commercials on TV In-Reply-To: <1B39D500FD82403880592E55955FE537@GOLAMD> References: <20080725043619.46E4254821A@ws6-6.us4.outblaze.com> <1B39D500FD82403880592E55955FE537@GOLAMD> Message-ID: <488968CD.9090802@tascam.com> All DVD players (and BluRay) have dynamic range compression that triggers off meta data in the data stream. You should be able to toggle an option to get a maximally compressed version that you can listen to at a quiet level without struggling to hear the quiet bits or be startled by the loud bits. This is the minimum amount of control, and it is mandated by Dolby as a condition of having Dolby Digital decoding onboard. In the default case, you actually have to turn off the DRC to get the audio as it was originally mastered... As for TV program/commercial sound level problem, look at what Dolby has already provided in "Dolby Volume". Legistlation for standard levels just won't work for a variety of business and political reasons. Their algorithm uses up a whole 150MHz DSP core, and it does exactly what is being asked for here. Their introductory license fee was very reasonable, they wanted TV and DVD/Blu manufacturers to put it in all models. http://www.dolby.com/consumer/technology/dolby-volume-works.aspx You need to be under NDA to see the block diagram of what is going on there though. Suffice it to say, yes, they've done a lot of research and work into the problem. There are other companies with similar technologies already available for licensing. Tom. Didier Dambrin wrote: > It's the same problem with movies, there are movies that you just > can't watch if you have neighbors. You have to crank up the volume to > understand people speaking, and then blam, someone drops a pencil on a > table and that makes a huge noise. Followed by the usual bland car > chase/crash that hurts your ears. > > > > > > ----- Original Message ----- From: "robert bristow-johnson" > > To: "A discussion list for music-related DSP" > > Sent: Friday, July 25, 2008 6:36 AM > Subject: Re: [music-dsp] detecting compressed audio / loud commercials > on TV > > > >> ----- Original Message ----- >> From: "Thomas Rehaag" >> To: "A discussion list for music-related DSP" >> >> Subject: [music-dsp] detecting compressed audio / loud commercials on TV >> Date: Thu, 24 Jul 2008 19:45:24 +0200 >> >> >> I'm just looking for a way to distinguish the audio in "loud" >> commercials from the "quiet" movies in TV recordings. > > i don't have any technique that you hadn't cited, but i just wanna say > that i thought about this issue also. those commercials coming on so > loud (forcing one to have to deal with that when watching commercial > TV) are soooooo annoying that i first was thinking that they ought > legislate against it (and then the problem is how to define the > perceived volume in terms of signal metrics to provide for unambiguous > legal language). > > but then i thought (as you did, Thomas) that if one could come up with > a decent perceived loudness alg that would work well with TV > commercials, why not use that information against such commercials to > mute them out (or skip over with your TiVo)? > > anyway, you oughta be able to get as rich as the guys who develop > anti-spam sorting algs if you can figger this out, Thomas. every TV > with a commercial weeding program that uses the loud and compressed > audio of the commercial to spare those watching the TV from the > commercial. they would probably figger out a way to get around it, > but perhaps they would have to back off on the loud audio if they want > their commercial to be sufficiently indistinguishable from the program > to survive weeding. > > -- > > r b-j rbj@audioimagination.com > > "Imagination is more important than knowledge." > > -- > 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 > > No virus found in this incoming message. > Checked by AVG - http://www.avg.com > Version: 8.0.138 / Virus Database: 270.5.5/1571 - Release Date: > 24/07/2008 17:42 > > > > -- > 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 lerch at zplane.de Fri Jul 25 04:56:24 2008 From: lerch at zplane.de (alexander lerch) Date: Fri Jul 25 04:56:47 2008 Subject: [music-dsp] detecting compressed audio / loud commercials on TV In-Reply-To: <4888BFB4.5EA193C@netcologne.de> References: <46210.91827.qm@web90604.mail.mud.yahoo.com> <4888BFB4.5EA193C@netcologne.de> Message-ID: <48899538.7000005@zplane.de> Why not take some standard audio classification approaches? If it's possible to separate speech from music reliably (which is possible), that should also be possible for commercials. The first step would be the selection of suitable features; with respect to the loudness, what about a simple ITU-R BS.1770 weighted rms measurement? That seems to perform comparably well for broadcasting content. But I wouldn't do this only loudness related - it seems to me that the use of some spectral features e.g. related to brightness or sharpness could also be beneficial. And there might be some other possible feature that separate commercials from the rest that might not be so obvious but also helpful. The second step is the feature processing. You have to decide for the time window/accuracy (or texture window) you want to classify and what representation of your features within the time window might be beneficial (mean, std, deriv std, etc.) Then, you have to decide for a proper classification algo. I wouldn't start too complex here, perhaps just a kNN or GMM and train it. I am pretty sure that you can come up with something with a decent classification rate. Cheers, (a) Thomas Rehaag wrote: > Hi, > > I'm just looking for a way to distinguish the audio in "loud" > commmercials from the "quiet" movies in TV recordings. > It's easy to see that the loud parts are compressed, when you look at > the wave forms. So my first attempt was to take audio blocks of ~0.05 > seconds (so that the lowest sine waves would fit in) and devide the > average signal power by the power of the block's maximum: > relPwr = (Sum(samples ** 2)/number of samples) / (maximum ** 2) > > But the results were not very significant, cause everytime a longer non > changing sound appears in a movie (like the sound of a motor or a long > vowel from a speaker) relPwr also raises beyond 35%. And some of the > loudest parts had a relPwr of < 30% in my recordings. > > The second aproach was something like the standard deviation of local > maxima, but that wasn't really better and brought a bit of confusion > about what is a local maximum. > > So does anybody know a better way to detect the loud parts? > > Best Regards, > > Thmas > -- > 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 > -- dipl. ing. alexander lerch zplane.development :www.zplane.de katzbachstr.21 d-10965 berlin fon: +49.30.854 09 15.0 fax: +49.30.854 09 15.5 From developer at netcologne.de Fri Jul 25 05:48:25 2008 From: developer at netcologne.de (Thomas Rehaag) Date: Fri Jul 25 05:48:40 2008 Subject: [music-dsp] detecting compressed audio / loud commercials onTV References: <46210.91827.qm@web90604.mail.mud.yahoo.com> <4888BFB4.5EA193C@netcologne.de> <48899538.7000005@zplane.de> Message-ID: <4889A169.931324A3@netcologne.de> > Why not take some standard audio classification approaches? I know rms, but don't know the weighting approaches. Can you point me to documentations? Is there any free documentation of ITU-R BS.1770? Thanks, Thomas alexander lerch schrieb: > > Why not take some standard audio classification approaches? If it's > possible to separate speech from music reliably (which is possible), > that should also be possible for commercials. > > The first step would be the selection of suitable features; with respect > to the loudness, what about a simple ITU-R BS.1770 weighted rms > measurement? That seems to perform comparably well for broadcasting > content. But I wouldn't do this only loudness related - it seems to me > that the use of some spectral features e.g. related to brightness or > sharpness could also be beneficial. And there might be some other > possible feature that separate commercials from the rest that might not > be so obvious but also helpful. > > The second step is the feature processing. You have to decide for the > time window/accuracy (or texture window) you want to classify and what > representation of your features within the time window might be > beneficial (mean, std, deriv std, etc.) > > Then, you have to decide for a proper classification algo. I wouldn't > start too complex here, perhaps just a kNN or GMM and train it. > > I am pretty sure that you can come up with something with a decent > classification rate. > > Cheers, > (a) > > Thomas Rehaag wrote: > > Hi, > > > > I'm just looking for a way to distinguish the audio in "loud" > > commmercials from the "quiet" movies in TV recordings. > > It's easy to see that the loud parts are compressed, when you look at > > the wave forms. So my first attempt was to take audio blocks of ~0.05 > > seconds (so that the lowest sine waves would fit in) and devide the > > average signal power by the power of the block's maximum: > > relPwr = (Sum(samples ** 2)/number of samples) / (maximum ** 2) > > > > But the results were not very significant, cause everytime a longer non > > changing sound appears in a movie (like the sound of a motor or a long > > vowel from a speaker) relPwr also raises beyond 35%. And some of the > > loudest parts had a relPwr of < 30% in my recordings. > > > > The second aproach was something like the standard deviation of local > > maxima, but that wasn't really better and brought a bit of confusion > > about what is a local maximum. > > > > So does anybody know a better way to detect the loud parts? > > > > Best Regards, > > > > Thmas > > -- > > 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 > > > > -- > dipl. ing. > alexander lerch > > zplane.development > :www.zplane.de > katzbachstr.21 > d-10965 berlin > > fon: +49.30.854 09 15.0 > fax: +49.30.854 09 15.5 > -- > 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 Fri Jul 25 05:48:59 2008 From: developer at netcologne.de (Thomas Rehaag) Date: Fri Jul 25 05:49:15 2008 Subject: [music-dsp] ps.: detecting compressed audio References: <46210.91827.qm@web90604.mail.mud.yahoo.com> <4888BFB4.5EA193C@netcologne.de> <4888C714.155F14FA@netcologne.de> <48890CEE.2050604@fugal.net> Message-ID: <4889A18B.B769D6EC@netcologne.de> > MythTV has pretty good commercial detection. I'm not familiar with the > details, but I think it's a conglomeration of several approaches. If > detecting commercials is the goal (and if licensing permits) you may > look at their source. As far as I see, MythTV doesn't use audio for commercial detection. Not even silence detection. From w.wang at surrey.ac.uk Fri Jul 25 06:37:27 2008 From: w.wang at surrey.ac.uk (Wenwu Wang) Date: Fri Jul 25 06:37:46 2008 Subject: [music-dsp] PhD Studentship in Signal Processing for Machine Audition and Perception Message-ID: <1216982247.3847.26.camel@cvplws67.eps.surrey.ac.uk> Please feel free to forward the following message to potential audiences who you think might be interested. Apologise for cross-posting. The Centre for Vision Speech and Signal Processing is offering a three-year PhD studentship to pursue research funded by EPSRC in the area of machine audition and audio/speech signal processing, starting from October 1, 2008. Successful applicants will join an expanding research group within the Centre for Vision Speech and Signal Processing, which currently has three professors, seven lecturers, twenty research fellows and about fifty PhD students. CVSSP has an international reputation for the excellence of its research and, in the last Research Assessment Exercise, the Department (of Electronic Engineering) was awarded grade 5*A. The studentship will investigate signal processing and machine learning techniques in the context of machine audio perception. The successful applicant will join a group of PhD students and RAs working with Dr Wenwu Wang and Dr Philip Jackson in this subject area in CVSSP. For information about current research at Surrey in this and related areas, visit www.surrey.ac.uk/cvssp. Candidates should hold a 1st or 2:1 honours degree or Masters degree or equivalent in a scientific discipline (e.g., Engineering, Physics, Mathematics or Computing), and should have good written/spoken English and demonstrate an aptitude for the research area. Prior experience in audio and speech signal processing or machine learning would be advantageous. Informal inquiries should be directed to Dr Wenwu Wang, email: w.wang@surrey.ac.uk. Eligibility The studentship includes home/EU tuition fees and an annual bursary of approximately ??12,000. Due to funding conditions, only the following applicants are eligible for the studentship. For applicants who meet UK residency criteria (naturally including UK nationals and overseas students who have permanent residency or settlement), the studentship provides tuition fees and a stipend of approximately ??12,000/year. Applicants who are EU citizens may also be supported by the studentship on a fees-only basis, i.e., they will not receive a stipend. Applications should be sent to Mrs Nan Bennett by e-mail (n.bennett@surrey.ac.uk) or by post to Mrs Nan Bennett, Postgraduate Administrator, Faculty of Engineering & Physical Sciences, University of Surrey, Guildford, Surrey, GU2 7XH, UK. Completed applications should include a CV, a statement of research interests, the completed application form, names of two referees (or two reference letters), quoting the above studentship together with copies of transcripts and certificate of qualifications. The Application Form can be downloaded from: (www.surrey.ac.uk/postgraduate/apply). A copy of the CV, the statement of research interests, and the names of the referees should also be sent electronically to Dr Wenwu Wang (w.wang@surrey.ac.uk). The closing date for applications is Friday, August 8, 2008. For further information about the University of Surrey, please visit www.surrey.ac.uk. The University is committed to an Equal Opportunities Policy -- Dr Wenwu Wang Centre for Vision Speech & Signal Processing Department of Electronic Engineering Faculty of Engineering & Physical Sciences University of Surrey Guildford, GU2 7XH, United Kingdom Phone: +44 (0) 1483 686039 Fax: +44 (0) 1483 686031 Email: w.wang@surrey.ac.uk http://www.ee.surrey.ac.uk/cvssp From lerch at zplane.de Fri Jul 25 06:44:42 2008 From: lerch at zplane.de (alexander lerch) Date: Fri Jul 25 06:44:58 2008 Subject: [music-dsp] detecting compressed audio / loud commercials onTV In-Reply-To: <4889A169.931324A3@netcologne.de> References: <46210.91827.qm@web90604.mail.mud.yahoo.com> <4888BFB4.5EA193C@netcologne.de> <48899538.7000005@zplane.de> <4889A169.931324A3@netcologne.de> Message-ID: <4889AE9A.8090105@zplane.de> With weighted RMS I just meant pre-filtered RMS measurements such as dBA/B/C. As far as I remember, you can download 3 ITU recommendations free of charge after registration. Cheers, (a) Thomas Rehaag wrote: >> Why not take some standard audio classification approaches? > > I know rms, but don't know the weighting approaches. > Can you point me to documentations? Is there any free documentation of > ITU-R BS.1770? > > Thanks, > > Thomas > > > > alexander lerch schrieb: >> Why not take some standard audio classification approaches? If it's >> possible to separate speech from music reliably (which is possible), >> that should also be possible for commercials. >> >> The first step would be the selection of suitable features; with respect >> to the loudness, what about a simple ITU-R BS.1770 weighted rms >> measurement? That seems to perform comparably well for broadcasting >> content. But I wouldn't do this only loudness related - it seems to me >> that the use of some spectral features e.g. related to brightness or >> sharpness could also be beneficial. And there might be some other >> possible feature that separate commercials from the rest that might not >> be so obvious but also helpful. >> >> The second step is the feature processing. You have to decide for the >> time window/accuracy (or texture window) you want to classify and what >> representation of your features within the time window might be >> beneficial (mean, std, deriv std, etc.) >> >> Then, you have to decide for a proper classification algo. I wouldn't >> start too complex here, perhaps just a kNN or GMM and train it. >> >> I am pretty sure that you can come up with something with a decent >> classification rate. >> >> Cheers, >> (a) >> >> Thomas Rehaag wrote: >>> Hi, >>> >>> I'm just looking for a way to distinguish the audio in "loud" >>> commmercials from the "quiet" movies in TV recordings. >>> It's easy to see that the loud parts are compressed, when you look at >>> the wave forms. So my first attempt was to take audio blocks of ~0.05 >>> seconds (so that the lowest sine waves would fit in) and devide the >>> average signal power by the power of the block's maximum: >>> relPwr = (Sum(samples ** 2)/number of samples) / (maximum ** 2) >>> >>> But the results were not very significant, cause everytime a longer non >>> changing sound appears in a movie (like the sound of a motor or a long >>> vowel from a speaker) relPwr also raises beyond 35%. And some of the >>> loudest parts had a relPwr of < 30% in my recordings. >>> >>> The second aproach was something like the standard deviation of local >>> maxima, but that wasn't really better and brought a bit of confusion >>> about what is a local maximum. >>> >>> So does anybody know a better way to detect the loud parts? >>> >>> Best Regards, >>> >>> Thmas >>> -- >>> 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 >>> >> -- >> dipl. ing. >> alexander lerch >> >> zplane.development >> :www.zplane.de >> katzbachstr.21 >> d-10965 berlin >> >> fon: +49.30.854 09 15.0 >> fax: +49.30.854 09 15.5 >> -- >> 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 > -- dipl. ing. alexander lerch zplane.development :www.zplane.de katzbachstr.21 d-10965 berlin fon: +49.30.854 09 15.0 fax: +49.30.854 09 15.5 From developer at netcologne.de Fri Jul 25 11:08:29 2008 From: developer at netcologne.de (Thomas Rehaag) Date: Fri Jul 25 11:08:51 2008 Subject: [music-dsp] detecting compressed audio / loud commercials onTV References: <46210.91827.qm@web90604.mail.mud.yahoo.com> <4888BFB4.5EA193C@netcologne.de> <48899538.7000005@zplane.de> <4889A169.931324A3@netcologne.de> <4889AE9A.8090105@zplane.de> Message-ID: <4889EC6D.22012042@netcologne.de> found a dBA/B/C table. And ITU-R BS.1770 looks quite friendly after I've found the free download. A look at the sounds of commercials and movie in a frequency analyzer doesn't give me very much hope, that pre filtering will help to enhance the results, but I'll try it. Cheers, Thomas alexander lerch schrieb: > > With weighted RMS I just meant pre-filtered RMS measurements such as > dBA/B/C. As far as I remember, you can download 3 ITU recommendations > free of charge after registration. > > Cheers, > (a) > > Thomas Rehaag wrote: > >> Why not take some standard audio classification approaches? > > > > I know rms, but don't know the weighting approaches. > > Can you point me to documentations? Is there any free documentation of > > ITU-R BS.1770? > > > > Thanks, > > > > Thomas > > > > > > > > alexander lerch schrieb: > >> Why not take some standard audio classification approaches? If it's > >> possible to separate speech from music reliably (which is possible), > >> that should also be possible for commercials. > >> > >> The first step would be the selection of suitable features; with respect > >> to the loudness, what about a simple ITU-R BS.1770 weighted rms > >> measurement? That seems to perform comparably well for broadcasting > >> content. But I wouldn't do this only loudness related - it seems to me > >> that the use of some spectral features e.g. related to brightness or > >> sharpness could also be beneficial. And there might be some other > >> possible feature that separate commercials from the rest that might not > >> be so obvious but also helpful. > >> > >> The second step is the feature processing. You have to decide for the > >> time window/accuracy (or texture window) you want to classify and what > >> representation of your features within the time window might be > >> beneficial (mean, std, deriv std, etc.) > >> > >> Then, you have to decide for a proper classification algo. I wouldn't > >> start too complex here, perhaps just a kNN or GMM and train it. > >> > >> I am pretty sure that you can come up with something with a decent > >> classification rate. > >> > >> Cheers, > >> (a) > >> > >> Thomas Rehaag wrote: > >>> Hi, > >>> > >>> I'm just looking for a way to distinguish the audio in "loud" > >>> commmercials from the "quiet" movies in TV recordings. > >>> It's easy to see that the loud parts are compressed, when you look at > >>> the wave forms. So my first attempt was to take audio blocks of ~0.05 > >>> seconds (so that the lowest sine waves would fit in) and devide the > >>> average signal power by the power of the block's maximum: > >>> relPwr = (Sum(samples ** 2)/number of samples) / (maximum ** 2) > >>> > >>> But the results were not very significant, cause everytime a longer non > >>> changing sound appears in a movie (like the sound of a motor or a long > >>> vowel from a speaker) relPwr also raises beyond 35%. And some of the > >>> loudest parts had a relPwr of < 30% in my recordings. > >>> > >>> The second aproach was something like the standard deviation of local > >>> maxima, but that wasn't really better and brought a bit of confusion > >>> about what is a local maximum. > >>> > >>> So does anybody know a better way to detect the loud parts? > >>> > >>> Best Regards, > >>> > >>> Thmas > >>> -- > >>> 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 > >>> > >> -- > >> dipl. ing. > >> alexander lerch > >> > >> zplane.development > >> :www.zplane.de > >> katzbachstr.21 > >> d-10965 berlin > >> > >> fon: +49.30.854 09 15.0 > >> fax: +49.30.854 09 15.5 > >> -- > >> 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 > > > > -- > dipl. ing. > alexander lerch > > zplane.development > :www.zplane.de > katzbachstr.21 > d-10965 berlin > > fon: +49.30.854 09 15.0 > fax: +49.30.854 09 15.5 > -- > 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 veronica.merryfield at shaw.ca Mon Jul 28 01:16:08 2008 From: veronica.merryfield at shaw.ca (Veronica Merryfield) Date: Mon Jul 28 01:16:29 2008 Subject: [music-dsp] pitch detection In-Reply-To: <920833DE-6514-4CEA-B5D3-AA36010CB1B5@shaw.ca> References: <17A70B22-0808-4E37-BCBC-4D986D2F4E38@audiospillage.com> <002901c8cb30$bfdbc920$6401a8c0@acer> <920833DE-6514-4CEA-B5D3-AA36010CB1B5@shaw.ca> Message-ID: <83756F6F-13B5-4092-AA4A-6E78E92E62EA@shaw.ca> I am looking for a fast find algorithm, or a modification thereof, to find a pitch within a +/- 2 to 3 semi tone range - i.e. I know roughly what the pitch is but need to get a fix on it. Any pointers much appreciated. Thanks Veronica From jenner at neurotix.com Mon Jul 28 03:30:36 2008 From: jenner at neurotix.com (Jenner Fusari) Date: Mon Jul 28 03:30:55 2008 Subject: [music-dsp] Designing filters from locating zeroes/poles problem Message-ID: <488D759C.4080802@neurotix.com> Hi all, I have designed a filter where the user (me) locate the poles and zeroes in the z-plane. The user sets the poles by locating them in the unity circle giving two parameters: the magnitude (that runs from 0.0 to 0.99) and the angle (alpha) in radiants from the positive real axis (which range from 0 to PI). I get the Re and Im values this way: Re = magnitude * cos(alpha); Im = +/- magnitude * sin(alpha); So, I get the a and b coeffs by expanding this polynomial: Y(z) = (z - Re + Im)(z - Re - Im) Suppose the zeroes are in Re = -1 and Im = 0 ( X(z) = (z + 1)(z + 1) ). I end up with the following coeffs: a[0] = 1.0; a[1] = 2.0; a[2] = 1.0; b[0] = 1.0; b[1] = 2.0 * Re; b[2] = Re * Re - Im * Im; Now, the filter loop code seems ok, but I end up with a filter that tends to explode (note the poles are in the unity circle, can't set them outside) or has a filtering so poor that is sometimes hard to hear (what I expect is a lowpass behavior where the cutoff freq is "handled" by alpha). Did I make some error? A misunderstanding? Or the whole thinking is wrong? Thank in advance. Jenner From palotai.robin at gmail.com Mon Jul 28 03:53:52 2008 From: palotai.robin at gmail.com (Robin Palotai) Date: Mon Jul 28 03:54:11 2008 Subject: [music-dsp] pitch detection In-Reply-To: <83756F6F-13B5-4092-AA4A-6E78E92E62EA@shaw.ca> References: <17A70B22-0808-4E37-BCBC-4D986D2F4E38@audiospillage.com> <002901c8cb30$bfdbc920$6401a8c0@acer> <920833DE-6514-4CEA-B5D3-AA36010CB1B5@shaw.ca> <83756F6F-13B5-4092-AA4A-6E78E92E62EA@shaw.ca> Message-ID: <94cfb9150807280053v72831c1bu5a172981d8299991@mail.gmail.com> Hi! If you know the pitch approximately, then you could apply a band-pass filter first, then do a FFT to resolve the peak frequency. To determine the band you should investigate, look at this table: http://www.phy.mtu.edu/~suits/notefreqs.html Cheers! Robin On Mon, Jul 28, 2008 at 7:16 AM, Veronica Merryfield wrote: > I am looking for a fast find algorithm, or a modification thereof, to find a > pitch within a +/- 2 to 3 semi tone range - i.e. I know roughly what the > pitch is but need to get a fix on it. > > Any pointers much appreciated. > > Thanks > > Veronica > > > -- > dupswapdrop -- the music-dsp mailing list and website:subscription info, > FAQ, source code archive, list archive, book reviews, dsp > linkshttp://music.columbia.edu/cmc/music-dsphttp://music.columbia.edu/mailman/listinfo/music-dsp > From developer at netcologne.de Mon Jul 28 06:24:22 2008 From: developer at netcologne.de (Thomas Rehaag) Date: Mon Jul 28 06:24:41 2008 Subject: [music-dsp] detecting compressed audio / loud commercials onTV References: <46210.91827.qm@web90604.mail.mud.yahoo.com> <4888BFB4.5EA193C@netcologne.de> <48899538.7000005@zplane.de> <4889A169.931324A3@netcologne.de> <4889AE9A.8090105@zplane.de> <4889EC6D.22012042@netcologne.de> Message-ID: <488D9E56.403BF9ED@netcologne.de> Thanks for the hint: dbA prefiltering (with an additional peak at low frequecies) works quite good. But the prefiltering curve seems to be a field for further investigations. Maybe I'll have a look at the average frequency responses of some hours of commercials and movies ... later. Best Regards, Thomas Thomas Rehaag schrieb: > > found a dBA/B/C table. And ITU-R BS.1770 looks quite friendly after I've > found the free download. > A look at the sounds of commercials and movie in a frequency analyzer > doesn't give me very much hope, that pre filtering will help to enhance > the results, but I'll try it. > > Cheers, > > Thomas > > alexander lerch schrieb: > > > > With weighted RMS I just meant pre-filtered RMS measurements such as > > dBA/B/C. As far as I remember, you can download 3 ITU recommendations > > free of charge after registration. > > > > Cheers, > > (a) > > > > Thomas Rehaag wrote: > > >> Why not take some standard audio classification approaches? > > > > > > I know rms, but don't know the weighting approaches. > > > Can you point me to documentations? Is there any free documentation of > > > ITU-R BS.1770? > > > > > > Thanks, > > > > > > Thomas > > > > > > > > > > > > alexander lerch schrieb: > > >> Why not take some standard audio classification approaches? If it's > > >> possible to separate speech from music reliably (which is possible), > > >> that should also be possible for commercials. > > >> > > >> The first step would be the selection of suitable features; with respect > > >> to the loudness, what about a simple ITU-R BS.1770 weighted rms > > >> measurement? That seems to perform comparably well for broadcasting > > >> content. But I wouldn't do this only loudness related - it seems to me > > >> that the use of some spectral features e.g. related to brightness or > > >> sharpness could also be beneficial. And there might be some other > > >> possible feature that separate commercials from the rest that might not > > >> be so obvious but also helpful. > > >> > > >> The second step is the feature processing. You have to decide for the > > >> time window/accuracy (or texture window) you want to classify and what > > >> representation of your features within the time window might be > > >> beneficial (mean, std, deriv std, etc.) > > >> > > >> Then, you have to decide for a proper classification algo. I wouldn't > > >> start too complex here, perhaps just a kNN or GMM and train it. > > >> > > >> I am pretty sure that you can come up with something with a decent > > >> classification rate. > > >> > > >> Cheers, > > >> (a) > > >> > > >> Thomas Rehaag wrote: > > >>> Hi, > > >>> > > >>> I'm just looking for a way to distinguish the audio in "loud" > > >>> commmercials from the "quiet" movies in TV recordings. > > >>> It's easy to see that the loud parts are compressed, when you look at > > >>> the wave forms. So my first attempt was to take audio blocks of ~0.05 > > >>> seconds (so that the lowest sine waves would fit in) and devide the > > >>> average signal power by the power of the block's maximum: > > >>> relPwr = (Sum(samples ** 2)/number of samples) / (maximum ** 2) > > >>> > > >>> But the results were not very significant, cause everytime a longer non > > >>> changing sound appears in a movie (like the sound of a motor or a long > > >>> vowel from a speaker) relPwr also raises beyond 35%. And some of the > > >>> loudest parts had a relPwr of < 30% in my recordings. > > >>> > > >>> The second aproach was something like the standard deviation of local > > >>> maxima, but that wasn't really better and brought a bit of confusion > > >>> about what is a local maximum. > > >>> > > >>> So does anybody know a better way to detect the loud parts? > > >>> > > >>> Best Regards, > > >>> > > >>> Thmas > > >>> -- > > >>> 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 > > >>> > > >> -- > > >> dipl. ing. > > >> alexander lerch > > >> > > >> zplane.development > > >> :www.zplane.de > > >> katzbachstr.21 > > >> d-10965 berlin > > >> > > >> fon: +49.30.854 09 15.0 > > >> fax: +49.30.854 09 15.5 > > >> -- > > >> 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 > > > > > > > -- > > dipl. ing. > > alexander lerch > > > > zplane.development > > :www.zplane.de > > katzbachstr.21 > > d-10965 berlin > > > > fon: +49.30.854 09 15.0 > > fax: +49.30.854 09 15.5 > > -- > > 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 jpff at cs.bath.ac.uk Mon Jul 28 09:59:27 2008 From: jpff at cs.bath.ac.uk (jpff) Date: Mon Jul 28 10:00:20 2008 Subject: [music-dsp] pitch detection In-Reply-To: <94cfb9150807280053v72831c1bu5a172981d8299991@mail.gmail.com> (palotai.robin@gmail.com) References: <17A70B22-0808-4E37-BCBC-4D986D2F4E38@audiospillage.com> <002901c8cb30$bfdbc920$6401a8c0@acer> <920833DE-6514-4CEA-B5D3-AA36010CB1B5@shaw.ca> <83756F6F-13B5-4092-AA4A-6E78E92E62EA@shaw.ca> <94cfb9150807280053v72831c1bu5a172981d8299991@mail.gmail.com> Message-ID: <9295-Mon28Jul2008145927+0100-jpff@cs.bath.ac.uk> If you only want one band, then the SDFT would probably be more efficient that a full FFT ==John ffitch From dt_spam at comcast.net Mon Jul 28 23:33:23 2008 From: dt_spam at comcast.net (Daniele) Date: Mon Jul 28 23:33:31 2008 Subject: [music-dsp] Designing filters from locating zeroes/poles problem In-Reply-To: <488D759C.4080802@neurotix.com> Message-ID: One error is that b[1] below should be negative (-2.0 * Re). > -----Original Message----- > From: music-dsp-bounces@music.columbia.edu [mailto:music-dsp- > bounces@music.columbia.edu] On Behalf Of Jenner Fusari > Sent: Monday, July 28, 2008 12:31 AM > To: music-dsp@music.columbia.edu > Subject: [music-dsp] Designing filters from locating zeroes/poles problem > > Hi all, > I have designed a filter where the user (me) locate the poles and zeroes > in the z-plane. > The user sets the poles by locating them in the unity circle giving two > parameters: the magnitude (that runs from 0.0 to 0.99) and the angle > (alpha) in radiants from the positive real axis (which range from 0 to > PI). > I get the Re and Im values this way: > > Re = magnitude * cos(alpha); > Im = +/- magnitude * sin(alpha); > > So, I get the a and b coeffs by expanding this polynomial: > Y(z) = (z - Re + Im)(z - Re - Im) > > Suppose the zeroes are in Re = -1 and Im = 0 ( X(z) = (z + 1)(z + 1) ). > > I end up with the following coeffs: > a[0] = 1.0; > a[1] = 2.0; > a[2] = 1.0; > > b[0] = 1.0; > b[1] = 2.0 * Re; > b[2] = Re * Re - Im * Im; > > Now, the filter loop code seems ok, but I end up with a filter that > tends to explode (note the poles are in the unity circle, can't set them > outside) or has a filtering so poor that is sometimes hard to hear (what > I expect is a lowpass behavior where the cutoff freq is "handled" by > alpha). > > Did I make some error? A misunderstanding? Or the whole thinking is wrong? > > Thank in advance. > Jenner > -- > 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 dt_spam at comcast.net Tue Jul 29 00:03:43 2008 From: dt_spam at comcast.net (Daniele) Date: Tue Jul 29 00:03:59 2008 Subject: [music-dsp] Designing filters from locating zeroes/poles problem In-Reply-To: <488D759C.4080802@neurotix.com> Message-ID: <00834495B6624B40B33B498A515406A8@rivertrail> Also, from your definition of Im as a real number, the polynomial for the b coefficients would be (z - Re + i*Im)(z - Re - i*Im), and b[2] = Re * Re + Im * Im. > -----Original Message----- > From: music-dsp-bounces@music.columbia.edu [mailto:music-dsp- > bounces@music.columbia.edu] On Behalf Of Jenner Fusari > Sent: Monday, July 28, 2008 12:31 AM > To: music-dsp@music.columbia.edu > Subject: [music-dsp] Designing filters from locating zeroes/poles problem > > Hi all, > I have designed a filter where the user (me) locate the poles and zeroes > in the z-plane. > The user sets the poles by locating them in the unity circle giving two > parameters: the magnitude (that runs from 0.0 to 0.99) and the angle > (alpha) in radiants from the positive real axis (which range from 0 to > PI). > I get the Re and Im values this way: > > Re = magnitude * cos(alpha); > Im = +/- magnitude * sin(alpha); > > So, I get the a and b coeffs by expanding this polynomial: > Y(z) = (z - Re + Im)(z - Re - Im) > > Suppose the zeroes are in Re = -1 and Im = 0 ( X(z) = (z + 1)(z + 1) ). > > I end up with the following coeffs: > a[0] = 1.0; > a[1] = 2.0; > a[2] = 1.0; > > b[0] = 1.0; > b[1] = 2.0 * Re; > b[2] = Re * Re - Im * Im; > > Now, the filter loop code seems ok, but I end up with a filter that > tends to explode (note the poles are in the unity circle, can't set them > outside) or has a filtering so poor that is sometimes hard to hear (what > I expect is a lowpass behavior where the cutoff freq is "handled" by > alpha). > > Did I make some error? A misunderstanding? Or the whole thinking is wrong? > > Thank in advance. > Jenner > -- > 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 jenner at neurotix.com Tue Jul 29 03:04:22 2008 From: jenner at neurotix.com (Jenner Fusari) Date: Tue Jul 29 03:05:12 2008 Subject: [music-dsp] Designing filters from locating zeroes/poles problem In-Reply-To: <20080729040417.BEE4A3010FD71@music.columbia.edu> References: <20080729040417.BEE4A3010FD71@music.columbia.edu> Message-ID: <488EC0F6.5060809@neurotix.com> > Also, from your definition of Im as a real number, the polynomial for the b > coefficients would be (z - Re + i*Im)(z - Re - i*Im), and b[2] = Re * Re + > Im * Im. Thank you Daniele! Yesterday I checked again all the code and I've noticed the same. So, the a and b values goes to: a[0] = 1.0; a[1] = 2.0; a[2] = 1.0; b[0] = 1.0; b[1] = -2.0 * Re; b[2] = Re * Re + Im * Im; But, again, I never end up to stable filter. Let's take an example. I set alpha to PI/8 and magnitude to 0.5. Re = 0.5 * cos(PI/8) = 0.461939766 Im = 0.5 * sin(PI/8) = 0.191341716 The b coeffs become: b[0] = 1.0; b[1] = -0.923879532; b[2] = 0.463388347; If I set this coeffs I get a filter that explode in less than 100 samples (the output oscillates and always increase). What's strange is that if I set alpha to PI/4 I get a stable output. Also the alpha values seems to have a mild control over the cutoff frequency. So I think I've introduced (many?) design flaws but I didn't get them. Sorry for my lack of experience. Thank you in advance. Jenner From dt_spam at comcast.net Tue Jul 29 03:37:47 2008 From: dt_spam at comcast.net (Daniele) Date: Tue Jul 29 03:37:57 2008 Subject: [music-dsp] Designing filters from locating zeroes/poles problem In-Reply-To: <488EC0F6.5060809@neurotix.com> Message-ID: <1FE4FE828BAF44729EC5B5DCE64A3D9E@rivertrail> Hmmm, b[2]=0.25 (=magnitude^2). Your filter: y[n] = 1*x[n] + 2*x[n-1] + 1*x[n-2] + 0.923879532*y[n-1] - 0.25*y[n-2] Should be stable (although it will amplify low frequencies in the range of 20-30 dB). Daniele Terdina > -----Original Message----- > From: music-dsp-bounces@music.columbia.edu [mailto:music-dsp- > bounces@music.columbia.edu] On Behalf Of Jenner Fusari > Sent: Tuesday, July 29, 2008 12:04 AM > To: music-dsp@music.columbia.edu > Subject: Re: [music-dsp] Designing filters from locating zeroes/poles > problem > > > Also, from your definition of Im as a real number, the polynomial for > the b > > coefficients would be (z - Re + i*Im)(z - Re - i*Im), and b[2] = Re * Re > + > > Im * Im. > > Thank you Daniele! > > Yesterday I checked again all the code and I've noticed the same. > > So, the a and b values goes to: > > a[0] = 1.0; > a[1] = 2.0; > a[2] = 1.0; > > b[0] = 1.0; > b[1] = -2.0 * Re; > b[2] = Re * Re + Im * Im; > > But, again, I never end up to stable filter. > > Let's take an example. > I set alpha to PI/8 and magnitude to 0.5. > Re = 0.5 * cos(PI/8) = 0.461939766 > Im = 0.5 * sin(PI/8) = 0.191341716 > > The b coeffs become: > b[0] = 1.0; > b[1] = -0.923879532; > b[2] = 0.463388347; > > If I set this coeffs I get a filter that explode in less than 100 > samples (the output oscillates and always increase). > > What's strange is that if I set alpha to PI/4 I get a stable output. > Also the alpha values seems to have a mild control over the cutoff > frequency. > So I think I've introduced (many?) design flaws but I didn't get them. > > Sorry for my lack of experience. > > Thank you in advance. > Jenner > -- > 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 frederik at hjorth-jensen.dk Tue Jul 29 07:43:01 2008 From: frederik at hjorth-jensen.dk (Frederik Hjorth-Jensen) Date: Tue Jul 29 07:44:18 2008 Subject: [music-dsp] IOWA music samples - processing required? References: <251789.85558.qm@web27810.mail.ukl.yahoo.com><483D8DC9.2020106@comp.dit.ie> <48889D3C.4080803@comp.dit.ie> Message-ID: <006e01c8f170$53e0c610$6400a8c0@fredemobile> Hi Joey I've used the IOWA music sample for my master project in Instrument Recognition. I did try and separate individual note but only to be able to use them in a softwaresampler to produce more musical data. Eventually I didnt have enogh time so I didnt use the separation after all. I can send you a pdf of my thesis if you're interested. Also I've combined files to get the largest registre for each instrument at different levels pp,mf and ff. For most instruments I have made rex2 files for note separation. If interested maybe I can upload these data somewhere so you can get it. Right now I'm on vacation without access to the data but I'll be back during the weekend. Best regards, Frederik > > Just wondering is anybody on the list familiar with the IOWA music > samples? And if you are, do you know how it is best to process the samples > for the purpose of classification? > > This is what I'm trying to do - I'm currently developing a musical > instrument ID system. After an extended literature review for my research, > the IOWA samples have proved a popular DB for musical instrument ID > research.However, I haven't come across any literature which details how > the IOWA samples have been processed. For example the file > "AltoFlute.ff.C4B4.aiff" contains Alto Flute note samples played in > sequence across the frequency note range C4 to B4. Unlike the RWC database > there is no mute (silence) gap inserted between the notes in the IOWA > samples. > > I'm wondering how do I continue? In order to train and test classifiers, > I'm assuming it is best to separate each note from the IOWA sample and > then train using the individual notes. Is this correct? But how does one > separate the notes? Is there an efficient process, manual or automated. > As the onsets, decays (and other dynamics) are of importance, how does one > decide where to make the cut? > > Maybe I'm over complicating this issue, but if there is somebody out there > who has preprocessed the IOWA samples and has thought this task through, > then maybe they can assist? > > Thank you, > > Joey. > -- > 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 jenner at neurotix.com Tue Jul 29 08:32:26 2008 From: jenner at neurotix.com (Jenner Fusari) Date: Tue Jul 29 08:32:41 2008 Subject: [music-dsp] Designing filters from locating zeroes/poles problem In-Reply-To: <20080729114419.C4B14301163F9@music.columbia.edu> References: <20080729114419.C4B14301163F9@music.columbia.edu> Message-ID: <488F0DDA.1010307@neurotix.com> > Hmmm, b[2]=0.25 (=magnitude^2). Yes... but... why b[2] should be equal to magnitude^2 (can't get it)??? I read in my book that the poles are the solutions of the polynomial at the denominator of the transfer function... I'm just going to set the solutions to get the corresponding filter. Maybe I skip something somewhere or I misunderstand some passage from the poles location, the z-transfer function and the a and b coefficents. Thank you. Bye Jenner From palotai.robin at gmail.com Tue Jul 29 09:11:39 2008 From: palotai.robin at gmail.com (Robin Palotai) Date: Tue Jul 29 09:11:50 2008 Subject: [music-dsp] Designing filters from locating zeroes/poles problem In-Reply-To: <488F0DDA.1010307@neurotix.com> References: <20080729114419.C4B14301163F9@music.columbia.edu> <488F0DDA.1010307@neurotix.com> Message-ID: <94cfb9150807290611w2ee66b7bt9994b9a6b175306a@mail.gmail.com> b[2] = Re * Re + Im * Im; This means, b[2] = Re^2 + Im^2, which is the magnitude^2 (length^2 of the vector (Re,Im)) Good luck! On Tue, Jul 29, 2008 at 2:32 PM, Jenner Fusari wrote: >> Hmmm, b[2]=0.25 (=magnitude^2). > > Yes... but... why b[2] should be equal to magnitude^2 (can't get it)??? > > I read in my book that the poles are the solutions of the polynomial at the > denominator of the transfer function... I'm just going to set the solutions > to get the corresponding filter. > Maybe I skip something somewhere or I misunderstand some passage from the > poles location, the z-transfer function and the a and b coefficents. > > Thank you. > > Bye > Jenner > -- > 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 jenner at neurotix.com Tue Jul 29 11:02:02 2008 From: jenner at neurotix.com (Jenner Fusari) Date: Tue Jul 29 11:02:17 2008 Subject: [music-dsp] Designing filters from locating zeroes/poles problem In-Reply-To: <20080729114419.C4B14301163F9@music.columbia.edu> References: <20080729114419.C4B14301163F9@music.columbia.edu> Message-ID: <488F30EA.1040705@neurotix.com> > b[2] = Re * Re + Im * Im; > > This means, b[2] = Re^2 + Im^2, which is the magnitude^2 > (length^2 of the vector (Re,Im)) Argh, you are right... looks like I'm an idiot... :P BTW, is the way I'm following for making this filter correct? Thanks again, Jenner From magnus at rubidium.dyndns.org Wed Jul 30 02:55:39 2008 From: magnus at rubidium.dyndns.org (Magnus Danielson) Date: Wed Jul 30 02:55:56 2008 Subject: [music-dsp] pitch detection In-Reply-To: <9295-Mon28Jul2008145927+0100-jpff@cs.bath.ac.uk> References: <17A70B22-0808-4E37-BCBC-4D986D2F4E38@audiospillage.com> <002901c8cb30$bfdbc920$6401a8c0@acer> <920833DE-6514-4CEA-B5D3-AA36010CB1B5@shaw.ca> <83756F6F-13B5-4092-AA4A-6E78E92E62EA@shaw.ca> <94cfb9150807280053v72831c1bu5a172981d8299991@mail.gmail.com> <9295-Mon28Jul2008145927+0100-jpff@cs.bath.ac.uk> Message-ID: <4890106B.2010906@rubidium.dyndns.org> jpff wrote: > If you only want one band, then the SDFT would probably be more > efficient that a full FFT > ==John ffitch Any narrowband FFT will reduce to a pre-mixing with a fixed frequency and then a FFT of the remaining positions. An alternative approach would be a BP filter and a PLL operating over the range. Monitoring the control frequency would give the frequency. Cheers, Magnus From jenner at neurotix.com Wed Jul 30 06:31:03 2008 From: jenner at neurotix.com (Jenner Fusari) Date: Wed Jul 30 06:31:16 2008 Subject: [music-dsp] Designing filters from locating zeroes/poles problem In-Reply-To: <20080730065605.892C13012413C@music.columbia.edu> References: <20080730065605.892C13012413C@music.columbia.edu> Message-ID: <489042E7.30201@neurotix.com> Again on my problem. Now all about the b coeff seems fixed. We end up saying that: b[0] = 1.0 b[1] = -2.0 * Re b[2] = Re^2 + Im^2 = Magnitude^2 But I still don't understand why the filter can be unstable using poles that are located in the z-plane unity circle. Let's take, for example, a magnitude of 0.6 with an angle of PI/10... the filter explode after few hundred samples (it seems to self oscillate until going out of control). Is it an error thinking that placing n poles inside the unity circle (randomly) should give out a working (=stable) filter? Maybe the filter frequency response isn't useful but... I'm right or not? Thanks, Jenner From k.s.matheussen at notam02.no Wed Jul 30 07:33:56 2008 From: k.s.matheussen at notam02.no (Kjetil S. Matheussen) Date: Wed Jul 30 07:34:26 2008 Subject: [music-dsp] [ANN] rollendurchmesserzeitsammler v0.0.5 Message-ID: The Audio Rollendurchmesserzeitsammler is a conservative garbage collector especially made for running inside an audio DSP thread. New about this release is that I have finally replaced TLSF (http://rtportal.upv.es/rtmalloc/) with a pool-based dynamic memory allocator, which makes allocation using the rollendurchmesserzeitsammler approximately as fast as using custom memory pools. Using the rollendurchmesserzeitsammler should be a lot more convenient than memory pools though, and since memory is not freed manually, but instead is automatically freed in a separate lower-priority thread, there is a slight chance that using rollendurchmesserzeitsammler instead of custom memory pools could make some DSP code run faster. In non-synthetic benchmarks, I have not been able to see any significant improvement in CPU use because of this compared to using the TLSF allocator. But for programs doing millions of allocations per second, the new memory allocator will probably perform significantly better than TLSF, if it would ever make sense doing so many and frequent allocations of course... Download source from http://www.notam02.no/arkiv/src/?M=D Changes 0.0.4 -> 0.0.5 * Implemented a custom pool-based dynamic memory allocater. This new memory allocator is now set as default. To use TLSF instead, set "USE_TLSF=-DUSE_TLSF" in the Makefile before compiling. The following changes are caused by this switch: * Allocating memory is now approx 10 times faster (13 vs. 168 instructions for the allocation itself, but there are some GC overhead too) * The allocator copies used memory only (not just the whole heap). But not always! This was a lot more complicated to to with TLSF so I didn't do that. Note that for the garbage collector to still be hard realtime safe, the programs must ensure that full copies are taken now and then. (There's a change in the API for doing that) * Doing a garbage collection is much faster since the heaps are usually much smaller (because only used memory is copied) and that freeing is 10-20 times faster. * Further improvements for reducing memory overhead and make searching for used mem to be O(log n) instead of O(n) is much simpler now. (this is TODO though) * However 1: In case the code using the garbage collector will continue forever to allocate memory of different sizes, the new dynamic memory allocator could eventually run out of memory even if the program itself doesn't use very much memory. I don't think this is very likely to happen for DSP routines though, and there might even be solutions to fix this problem if it should ever come up. For now, just switching to TLSF fixes the problem. * However 2: in non-synthetic benchmarks, I have not been able to see any practical improvement in CPU use, apart from the slight improvement in CPU available for use in non-realtime threads because taking snapshots usually takes a lot less time now. But for programs doing millions of allocations per second, the new memory allocator will probably perform significantly better than TLSF, if it would ever make sense doing so many allocations of course. From czhenry at gmail.com Wed Jul 30 11:19:54 2008 From: czhenry at gmail.com (Charles Henry) Date: Wed Jul 30 11:20:10 2008 Subject: [music-dsp] Designing filters from locating zeroes/poles problem In-Reply-To: <489042E7.30201@neurotix.com> References: <20080730065605.892C13012413C@music.columbia.edu> <489042E7.30201@neurotix.com> Message-ID: <518fe7b20807300819g4662ffd6k4d27961f364a07ef@mail.gmail.com> If the code is right, this filter *must* be stable. What are you using to implement the filter? Some softwares give you biquad filter units that can be set with a list of parameters and those coefficients can be written in tricky ways. For example, Let's suppose that the response is described by a sequence and as a z-transform. Y(z) a0 + a1*z^-1 + a2*z^-2 ------ = ------------------------------------------ X(z) 1 + b1*z^-1 + b2*z^-2 Then, as a sequence it would be: y(n) + b1*y(n-1) + b2*y(n-2) = a0*x(n) + a1*x(n-1) + a2*x(n-2) or y(n) = a0*x(n) + a1*x(n-1) + a2*x(n-2) - b1*y(n-1) - b2*y(n-2) Check those signs in your program! Chuck On Wed, Jul 30, 2008 at 5:31 AM, Jenner Fusari wrote: > Again on my problem. > > Now all about the b coeff seems fixed. We end up saying that: > b[0] = 1.0 > b[1] = -2.0 * Re > b[2] = Re^2 + Im^2 = Magnitude^2 > > But I still don't understand why the filter can be unstable using poles that > are located in the z-plane unity circle. > Let's take, for example, a magnitude of 0.6 with an angle of PI/10... the > filter explode after few hundred samples (it seems to self oscillate until > going out of control). > > Is it an error thinking that placing n poles inside the unity circle > (randomly) should give out a working (=stable) filter? Maybe the filter > frequency response isn't useful but... I'm right or not? > > Thanks, > Jenner > -- > 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 >