Reply by Vladimir Vassilevsky July 4, 20082008-07-04
"Robert Adams" <robert.adams@analog.com> wrote in message
news:638bc79d-29fe-47b9-bd70-86f3bf7dbfe9@25g2000hsx.googlegroups.com...
On Jul 3, 9:00 pm, Vladimir Vassilevsky <antispam_bo...@hotmail.com>
wrote:
> Robert Adams wrote: > > I am trying to get the loudest sound possible out of a very limited > > speaker/power-amp combination. > > OK. This is what you can do: > > 1) Filter out the frequencies below ~350Hz. They contain a lot of power > but not much of the perceived loudness and speech intelligibility. A > 4-th order Butterworth HPF or something like that will do. > > 2) Apply a preemphasis filter (1-st order HPF Fc ~ 3kHz). > > 3) Apply a memoryless non-linearity like log() or sqrt() or anything > like that after the preemphasis. The shape of the nonlinear curve is not > very important. It is even better if you do Hilbert transform and apply > the non-linearity to the complex amplitude while keeping the complex
phase.
> > 4) Apply the deemphasis as the inverse of the preemphasis. > > This will produce a pretty good sound with low crest factor. You can > gain several dB in the perceived loudness. >
> Thanks; this sounds very simple, I'll give it a try.
One more note: when doing the nonlinearities, make sure that the sample rate is high enough (at least 16kHz) so the low order nonlinear products are not getting aliased into the lower frequencies. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com Bob
Reply by Robert Adams July 4, 20082008-07-04
On Jul 3, 9:00&#4294967295;pm, Vladimir Vassilevsky <antispam_bo...@hotmail.com>
wrote:
> Robert Adams wrote: > > I am trying to get the loudest sound possible out of a very limited > > speaker/power-amp combination. > > OK. This is what you can do: > > 1) Filter out the frequencies below ~350Hz. They contain a lot of power > but not much of the perceived loudness and speech intelligibility. A > 4-th order Butterworth HPF or something like that will do. > > 2) Apply a preemphasis filter (1-st order HPF Fc ~ 3kHz). > > 3) Apply a memoryless non-linearity like log() or sqrt() or anything > like that after the preemphasis. The shape of the nonlinear curve is not > very important. It is even better if you do Hilbert transform and apply > the non-linearity to the complex amplitude while keeping the complex phase. > > 4) Apply the deemphasis as the inverse of the preemphasis. > > This will produce a pretty good sound with low crest factor. You can > gain several dB in the perceived loudness. > > Vladimir Vassilevsky > DSP and Mixed Signal Design Consultanthttp://www.abvolt.com
Thanks; this sounds very simple, I'll give it a try. Bob
Reply by Vladimir Vassilevsky July 3, 20082008-07-03

Robert Adams wrote:

> I am trying to get the loudest sound possible out of a very limited > speaker/power-amp combination.
OK. This is what you can do: 1) Filter out the frequencies below ~350Hz. They contain a lot of power but not much of the perceived loudness and speech intelligibility. A 4-th order Butterworth HPF or something like that will do. 2) Apply a preemphasis filter (1-st order HPF Fc ~ 3kHz). 3) Apply a memoryless non-linearity like log() or sqrt() or anything like that after the preemphasis. The shape of the nonlinear curve is not very important. It is even better if you do Hilbert transform and apply the non-linearity to the complex amplitude while keeping the complex phase. 4) Apply the deemphasis as the inverse of the preemphasis. This will produce a pretty good sound with low crest factor. You can gain several dB in the perceived loudness. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Reply by Robert Adams July 3, 20082008-07-03
On Jul 3, 7:21&#4294967295;pm, Eric Jacobsen <eric.jacob...@ieee.org> wrote:
> On Thu, 3 Jul 2008 14:59:28 -0700 (PDT), Robert Adams > > > > > > <robert.ad...@analog.com> wrote: > >On Jul 3, 12:11&#4294967295;pm, Jerry Avins <j...@ieee.org> wrote: > >> Jerry Avins wrote: > >> > Robert Adams wrote: > >> >> On Jul 2, 11:28 pm, robert bristow-johnson <r...@audioimagination.com> > >> >> wrote: > >> >>> On Jul 2, 10:45 pm, Robert Adams <robert.ad...@analog.com> wrote: > > >> >>>> I am looking for an algorithm that dynamically alters the phase > >> >>>> relationships between the spectral components of a music or voice > >> >>>> signal in an attempt to reduce the peak-to-average ratio. I recall > >> >>>> hearing about this in reference to increasing the coverage range of AM > >> >>>> transmitters but I am having trouble digging up the references. > >> >>> so a level compressor is not going to do it? > > >> >>> i once reviewed (in fact, Bob, this is weird, i had to sorta present > >> >>> it to an IEEE Mohonk because i reviewed it and the author was a no- > >> >>> show) an article about creating test signals (in lieu of swept sines > >> >>> or MLS) that sorta randomized phase and converged on phase > >> >>> combinations of the component sinusoids that looked like a good > >> >>> minimum. > > >> >>> now, for audio signals, i think the closer we are to the raw recording > >> >>> of something, the more sharp are the transitions (and higher the peak/ > >> >>> average is), then filtering it with some APF that has a sorta > >> >>> randomized phase response might be expected to reduce the peak-to- > >> >>> average ratio. > > >> >>> but if you wanna *in*crease the peak/average, then i dunno of a good > >> >>> way to find the right phase function of the APF. > > >> >>> r b-j > > >> >> Thanks. > > >> >> A compressor won't do it because the signal is already highy > >> >> compressed. I was looking to eek out a few more db of level without > >> >> clipping by playing with phase. It seems like there might be 2 > >> >> approaches; > > >> >> 1) Frequency-domain approach that rotates the phase of each bin to > >> >> minimize the global peak-to-average ratio exactly how you would do > >> >> this is unclear to me) > > >> >> 2) Allpass filter approach where each allpass filter is dynamically > >> >> adjusted in frequency to minimize the local peak-to-average (each > >> >> allpass might handle a different frequency range; Again, the algorithm > >> >> for adjustement is unclear but I could see doing a simple gadient > >> >> search in real time.) > > >> >> Both of the above will have audible artifacts but I'm not too > >> >> concerned with this since its not an audiophile application. > > >> > I have no idea how to do it on the fly, but you should be near an > >> > optimum when odd harmonics of a strong fundamental cross zero at the > >> > same time and in the same direction as the fundamental (think square > >> > wave) and the even harmonics are in quadrature. > > >> Oops! Not quadrature: they should cross in the opposite direction. > > >> Jerry > >> -- > >> Engineering is the art of making what you want from things you can get. > >> &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;- Hide quoted text - > > >> - Show quoted text - > > >Thanks Jerry, this seems like a promising approach. I am running on a > >processor that may have trouble with an FFT approach, so I may need to > >get creative. > > >One approach I thought of is to have a bunch of possible allapass > >filters, and monitor the peak-to-average ratio of the outputs of all > >of them, and using look-ahead, do a "cross-fade" to the one with the > >lowest peak-to-average ratio. > > >Bob > > Bob, > > This is an interesting problem, and I understand the motivation. &#4294967295;I > think your idea of selectively cross-fading allpasses (or even > bandpasses) might be a good one, especially if you can selectively > change the delay (actually the phase) very slightly with each. > > PAPR reduction is very common in communications systems (for the same > reason, to get by with a smaller amplifier), and an OFDM signal is not > a bad analog for an audio signal sliced into spectral bands. &#4294967295; In the > OFDM case one of the best (if not THE best) bang-for-the-buck > techniques is to just apply a randomizing scrambler to the data prior > to transmission, i.e., convolve the data with a known PR stream that > is then de-convolved in the receiver. &#4294967295; The net useful effect is to > randomize the phase of each subcarrier, which goes a LONG ways toward > reducing the PAPR compared to the pathological worst-cases. > > Assuming hearing really is insensitive to phase (or enough so for this > application), randomizing the phase somehow between spectral sections > could be reasonably effective. &#4294967295; Depending on your sample rate and the > Q factor and frequency of each filter bank, this could conceivably be > done by varying the delays in each bank relative to each other. &#4294967295; As > Vladimir pointed out, that might need to be adjusted often on the fly, > but could be reasonably easy to implement, especially if a few > artifacts could be tolerated. > > Anyway, that's just a thought. &#4294967295; Cool problem. &#4294967295; Isn't the usual > solution these days to use a Class D amp? > > Eric Jacobsen > Minister of Algorithms > Abineau Communicationshttp://www.ericjacobsen.org > > Blog:http://www.dsprelated.com/blogs-1/hf/Eric_Jacobsen.php- Hide quoted text - > > - Show quoted text -
Thanks for the thoughts. Class D amps improve efficiency but don't deliver any more power out of a fixed supply voltage. It's not louder, just cooler! Bob
Reply by Eric Jacobsen July 3, 20082008-07-03
On Thu, 3 Jul 2008 14:59:28 -0700 (PDT), Robert Adams
<robert.adams@analog.com> wrote:

>On Jul 3, 12:11&#4294967295;pm, Jerry Avins <j...@ieee.org> wrote: >> Jerry Avins wrote: >> > Robert Adams wrote: >> >> On Jul 2, 11:28 pm, robert bristow-johnson <r...@audioimagination.com> >> >> wrote: >> >>> On Jul 2, 10:45 pm, Robert Adams <robert.ad...@analog.com> wrote: >> >> >>>> I am looking for an algorithm that dynamically alters the phase >> >>>> relationships between the spectral components of a music or voice >> >>>> signal in an attempt to reduce the peak-to-average ratio. I recall >> >>>> hearing about this in reference to increasing the coverage range of AM >> >>>> transmitters but I am having trouble digging up the references. >> >>> so a level compressor is not going to do it? >> >> >>> i once reviewed (in fact, Bob, this is weird, i had to sorta present >> >>> it to an IEEE Mohonk because i reviewed it and the author was a no- >> >>> show) an article about creating test signals (in lieu of swept sines >> >>> or MLS) that sorta randomized phase and converged on phase >> >>> combinations of the component sinusoids that looked like a good >> >>> minimum. >> >> >>> now, for audio signals, i think the closer we are to the raw recording >> >>> of something, the more sharp are the transitions (and higher the peak/ >> >>> average is), then filtering it with some APF that has a sorta >> >>> randomized phase response might be expected to reduce the peak-to- >> >>> average ratio. >> >> >>> but if you wanna *in*crease the peak/average, then i dunno of a good >> >>> way to find the right phase function of the APF. >> >> >>> r b-j >> >> >> Thanks. >> >> >> A compressor won't do it because the signal is already highy >> >> compressed. I was looking to eek out a few more db of level without >> >> clipping by playing with phase. It seems like there might be 2 >> >> approaches; >> >> >> 1) Frequency-domain approach that rotates the phase of each bin to >> >> minimize the global peak-to-average ratio exactly how you would do >> >> this is unclear to me) >> >> >> 2) Allpass filter approach where each allpass filter is dynamically >> >> adjusted in frequency to minimize the local peak-to-average (each >> >> allpass might handle a different frequency range; Again, the algorithm >> >> for adjustement is unclear but I could see doing a simple gadient >> >> search in real time.) >> >> >> Both of the above will have audible artifacts but I'm not too >> >> concerned with this since its not an audiophile application. >> >> > I have no idea how to do it on the fly, but you should be near an >> > optimum when odd harmonics of a strong fundamental cross zero at the >> > same time and in the same direction as the fundamental (think square >> > wave) and the even harmonics are in quadrature. >> >> Oops! Not quadrature: they should cross in the opposite direction. >> >> Jerry >> -- >> Engineering is the art of making what you want from things you can get. >> &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;- Hide quoted text - >> >> - Show quoted text - > >Thanks Jerry, this seems like a promising approach. I am running on a >processor that may have trouble with an FFT approach, so I may need to >get creative. > >One approach I thought of is to have a bunch of possible allapass >filters, and monitor the peak-to-average ratio of the outputs of all >of them, and using look-ahead, do a "cross-fade" to the one with the >lowest peak-to-average ratio. > > >Bob
Bob, This is an interesting problem, and I understand the motivation. I think your idea of selectively cross-fading allpasses (or even bandpasses) might be a good one, especially if you can selectively change the delay (actually the phase) very slightly with each. PAPR reduction is very common in communications systems (for the same reason, to get by with a smaller amplifier), and an OFDM signal is not a bad analog for an audio signal sliced into spectral bands. In the OFDM case one of the best (if not THE best) bang-for-the-buck techniques is to just apply a randomizing scrambler to the data prior to transmission, i.e., convolve the data with a known PR stream that is then de-convolved in the receiver. The net useful effect is to randomize the phase of each subcarrier, which goes a LONG ways toward reducing the PAPR compared to the pathological worst-cases. Assuming hearing really is insensitive to phase (or enough so for this application), randomizing the phase somehow between spectral sections could be reasonably effective. Depending on your sample rate and the Q factor and frequency of each filter bank, this could conceivably be done by varying the delays in each bank relative to each other. As Vladimir pointed out, that might need to be adjusted often on the fly, but could be reasonably easy to implement, especially if a few artifacts could be tolerated. Anyway, that's just a thought. Cool problem. Isn't the usual solution these days to use a Class D amp? Eric Jacobsen Minister of Algorithms Abineau Communications http://www.ericjacobsen.org Blog: http://www.dsprelated.com/blogs-1/hf/Eric_Jacobsen.php
Reply by Robert Adams July 3, 20082008-07-03
On Jul 3, 7:57&#4294967295;am, Greg Berchin <gberc...@sentientscience.com> wrote:
> On Jul 2, 10:45&#4294967295;pm, Robert Adams <robert.ad...@analog.com> wrote: > > > I am looking for an algorithm that dynamically alters the phase > > relationships between the spectral components of a music or voice > > signal in an attempt to reduce the peak-to-average ratio. > > How much delay can you tolerate? &#4294967295;Seems to me that you'll have to look- > ahead in the signal at least several periods of the lowest frequency > content. &#4294967295;Maybe center a window on each temporal peak, FFT that > window, look for zero-phase spectral components, and move some of them > around. > > Also; REDUCE crest factor, or INCREASE crest factor? &#4294967295;Your message > says "reduce" but your title says "increase". > > Greg
Yes, sorry; I am looking to REDUCE the crest factor. Bob
Reply by Robert Adams July 3, 20082008-07-03
On Jul 3, 12:11&#4294967295;pm, Jerry Avins <j...@ieee.org> wrote:
> Jerry Avins wrote: > > Robert Adams wrote: > >> On Jul 2, 11:28 pm, robert bristow-johnson <r...@audioimagination.com> > >> wrote: > >>> On Jul 2, 10:45 pm, Robert Adams <robert.ad...@analog.com> wrote: > > >>>> I am looking for an algorithm that dynamically alters the phase > >>>> relationships between the spectral components of a music or voice > >>>> signal in an attempt to reduce the peak-to-average ratio. I recall > >>>> hearing about this in reference to increasing the coverage range of AM > >>>> transmitters but I am having trouble digging up the references. > >>> so a level compressor is not going to do it? > > >>> i once reviewed (in fact, Bob, this is weird, i had to sorta present > >>> it to an IEEE Mohonk because i reviewed it and the author was a no- > >>> show) an article about creating test signals (in lieu of swept sines > >>> or MLS) that sorta randomized phase and converged on phase > >>> combinations of the component sinusoids that looked like a good > >>> minimum. > > >>> now, for audio signals, i think the closer we are to the raw recording > >>> of something, the more sharp are the transitions (and higher the peak/ > >>> average is), then filtering it with some APF that has a sorta > >>> randomized phase response might be expected to reduce the peak-to- > >>> average ratio. > > >>> but if you wanna *in*crease the peak/average, then i dunno of a good > >>> way to find the right phase function of the APF. > > >>> r b-j > > >> Thanks. > > >> A compressor won't do it because the signal is already highy > >> compressed. I was looking to eek out a few more db of level without > >> clipping by playing with phase. It seems like there might be 2 > >> approaches; > > >> 1) Frequency-domain approach that rotates the phase of each bin to > >> minimize the global peak-to-average ratio exactly how you would do > >> this is unclear to me) > > >> 2) Allpass filter approach where each allpass filter is dynamically > >> adjusted in frequency to minimize the local peak-to-average (each > >> allpass might handle a different frequency range; Again, the algorithm > >> for adjustement is unclear but I could see doing a simple gadient > >> search in real time.) > > >> Both of the above will have audible artifacts but I'm not too > >> concerned with this since its not an audiophile application. > > > I have no idea how to do it on the fly, but you should be near an > > optimum when odd harmonics of a strong fundamental cross zero at the > > same time and in the same direction as the fundamental (think square > > wave) and the even harmonics are in quadrature. > > Oops! Not quadrature: they should cross in the opposite direction. > > Jerry > -- > Engineering is the art of making what you want from things you can get. > &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;- Hide quoted text - > > - Show quoted text -
Thanks Jerry, this seems like a promising approach. I am running on a processor that may have trouble with an FFT approach, so I may need to get creative. One approach I thought of is to have a bunch of possible allapass filters, and monitor the peak-to-average ratio of the outputs of all of them, and using look-ahead, do a "cross-fade" to the one with the lowest peak-to-average ratio. Bob
Reply by Robert Adams July 3, 20082008-07-03
On Jul 3, 2:58&#4294967295;pm, Vladimir Vassilevsky <antispam_bo...@hotmail.com>
wrote:
> Robert Adams wrote: > > A compressor won't do it because the signal is already highy > > compressed. I was looking to eek out a few more db of level without > > clipping by playing with phase. It seems like there might be 2 > > approaches; > > > 1) Frequency-domain approach that rotates the phase of each bin to > > minimize the global peak-to-average ratio exactly how you would do > > this is unclear to me) > > > 2) Allpass filter approach where each allpass filter is dynamically > > adjusted in frequency to minimize the local peak-to-average (each > > allpass might handle a different frequency range; Again, the algorithm > > for adjustement is unclear but I could see doing a simple gadient > > search in real time.) > > > Both of the above will have audible artifacts but I'm not too > > concerned with this since its not an audiophile application. > > Robert, > > What kind of output do you expect from the algorithm if the input is the > sum of the two unrelated sine waves? > > Vladimir Vassilevsky > DSP and Mixed Signal Design Consultanthttp://www.abvolt.com- Hide quoted text - > > - Show quoted text -
For 2 unrelated sine waves there is no hope, I guess. I am trying to get the loudest sound possible out of a very limited speaker/power-amp combination. I have already applied multiband amplitude compression, but I am noticing that the waveform seems like the harmonics are all in phase, so I see many sections that look like a train of impulses, which have a high peak value but a low rms value (this is a speech signal which may have been synthesized; I wonder if synthesized speech is more likely to have sections that look like this ??). So I think I could gain several db of loudness if I could alter the phase of the harmonics. Perhaps I should just try some fixed allpass filters first, but my guess is that an adaptive algorithm would work better. Bob Adams
Reply by Ben Jackson July 3, 20082008-07-03
On 2008-07-03, Vladimir Vassilevsky <antispam_bogus@hotmail.com> wrote:
> Robert Adams wrote: > >> I am looking for an algorithm that dynamically alters the phase >> relationships between the spectral components of a music or voice >> signal in an attempt to reduce the peak-to-average ratio. > > Why would you need it in our days? It is much more efficient to convert > the audio into something like mp3 and transmit it in the digital form.
The first step of mp3 (and other audio) compression is to use "psychoacoustics" to figure out which parts of the signal are important to a human listener. There may be models that could be applied and have some advantage back in the analog domain. -- Ben Jackson AD7GD <ben@ben.com> http://www.ben.com/
Reply by Vladimir Vassilevsky July 3, 20082008-07-03

Robert Adams wrote:


> A compressor won't do it because the signal is already highy > compressed. I was looking to eek out a few more db of level without > clipping by playing with phase. It seems like there might be 2 > approaches; > > 1) Frequency-domain approach that rotates the phase of each bin to > minimize the global peak-to-average ratio exactly how you would do > this is unclear to me) > > 2) Allpass filter approach where each allpass filter is dynamically > adjusted in frequency to minimize the local peak-to-average (each > allpass might handle a different frequency range; Again, the algorithm > for adjustement is unclear but I could see doing a simple gadient > search in real time.) > > Both of the above will have audible artifacts but I'm not too > concerned with this since its not an audiophile application. >
Robert, What kind of output do you expect from the algorithm if the input is the sum of the two unrelated sine waves? Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com