Re: [PD] change in compression detection

2011-01-14 Thread Mathieu Bouchard

On Thu, 13 Jan 2011, Roman Haefeli wrote:

True, in those examples the sound generation is often based on square 
waves with constant amplitude. If we want to be very nit-picking, those 
still don't qualify for constant amplitude sound sources, since one 
usually doesn't listen to those sounds with headphones plugged directly 
to the christmas card.


If you were a real nitpicker, you'd first ask yourself which kind of 
amplitude we are talking relative to, as it could be any of them unless 
otherwise specified.


What's the frequency response of headphones ?

 ___
| Mathieu Bouchard  tél: +1.514.383.3801  Villeray, Montréal, QC___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] change in compression detection

2011-01-13 Thread Roman Haefeli
On Wed, 2011-01-12 at 19:23 -0500, Mathieu Bouchard wrote:
> On Wed, 12 Jan 2011, Roman Haefeli wrote:
> > On Wed, 2011-01-12 at 13:35 -0500, Mathieu Bouchard wrote:
> >> If you pick compressor settings that cause their cutoff wavelengths to be
> >> longer enough than the sounds you are compressing, they will cause no
> >> (or little) distorsion in the perceived frequencies, and thus it will not
> >> sound like a compressor.
> > Di you mean: "[...] thus it will not sound like a wave shaper"?
> 
> ouch, yes.
> 
> >> But constant-amplitude sound can also be music, can't it ?
> > Sure, though I don't know any, I guess.
> 
> Musical xmas cards, cellphone ring tones, "pc speaker", etc. There are 
> lots of examples.

True, in those examples the sound generation is often based on square
waves with constant amplitude. If we want to be very nit-picking, those
still don't qualify for constant amplitude sound sources, since one
usually doesn't listen to those sounds with headphones plugged directly
to the christmas card. Even if at an electrical level the amplitude is
constant, it's very likely that it is not constant anymore when you
record the sound with a microphone. This is due to resonances and
distortions introduced by the physical properties of the speaker (piezo)
and the paper of the card.  

> > Also it wouldn't be interesting to detect compression in it.
> 
> And then what ?... If you talk about compression of dynamics in general, 
> you're talking about all sounds, and not just those that are interesting.

If we consider all kinds of sounds, there still might be a portion of
it, that is not so interesting for compression detection. What's wrong
with that with stating that?

Roman




___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] change in compression detection

2011-01-12 Thread Mathieu Bouchard

On Wed, 12 Jan 2011, Roman Haefeli wrote:

On Wed, 2011-01-12 at 13:35 -0500, Mathieu Bouchard wrote:

If you pick compressor settings that cause their cutoff wavelengths to be
longer enough than the sounds you are compressing, they will cause no
(or little) distorsion in the perceived frequencies, and thus it will not
sound like a compressor.

Di you mean: "[...] thus it will not sound like a wave shaper"?


ouch, yes.


But constant-amplitude sound can also be music, can't it ?

Sure, though I don't know any, I guess.


Musical xmas cards, cellphone ring tones, "pc speaker", etc. There are 
lots of examples.



Also it wouldn't be interesting to detect compression in it.


And then what ?... If you talk about compression of dynamics in general, 
you're talking about all sounds, and not just those that are interesting.


 ___
| Mathieu Bouchard  tél: +1.514.383.3801  Villeray, Montréal, QC___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] change in compression detection

2011-01-12 Thread Roman Haefeli
On Wed, 2011-01-12 at 13:35 -0500, Mathieu Bouchard wrote:
> On Tue, 11 Jan 2011, Roman Haefeli wrote:
> 
> > I hope I'm not confusing dynamic range compression with wave shaping. 
> > Actually, depending on the compressor settings (short attack times, 
> > etc.) a dynamic compressor indeed acts a bit as a wave shaper.
> 
> It can also act exactly like a waveshaper, if you give it the most extreme 
> settings.
> 
> Similarly an echo effect and a comb filter are the same thing, but when 
> people talk about an echo effect, they usually don't mean an echo effect 
> configured to act as what is usually meant when people say a comb filter. 
> And vice-versa.
> 
> If you pick compressor settings that cause their cutoff wavelengths to be 
> longer enough than the sounds you are compressing, they will cause no 
> (or little) distorsion in the perceived frequencies, and thus it will not 
> sound like a compressor.

Di you mean: "[...] thus it will not sound like a wave shaper"?
> 
> > Instead of constant amplitude signals think of signal with ever changing 
> > amplitudes which I believe what we call music normally belongs to,
> 
> But constant-amplitude sound can also be music, can't it ?

Sure, though I don't know any, I guess. Also it wouldn't be interesting
to detect compression in it.

> > The problem with calculating an average with peak amplitude is that 
> > peaks by definition occur only at certain points in time.
> 
> A square wave is entirely made of peak points.
> 
> What is it that makes you use such a flawed definition of peaks ?

Yeah, that came out totally wrong. I was trying to say that often
(you're correct: not always) the peaks themselves don't form a
continuous signal by themselves. The continues signal that represents
the 'peak' of the measured signal (think of a peak meter at a mixing
desk) needs to be constructed.

Roman 


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] change in compression detection

2011-01-12 Thread Mathieu Bouchard

On Tue, 11 Jan 2011, Roman Haefeli wrote:

I hope I'm not confusing dynamic range compression with wave shaping. 
Actually, depending on the compressor settings (short attack times, 
etc.) a dynamic compressor indeed acts a bit as a wave shaper.


It can also act exactly like a waveshaper, if you give it the most extreme 
settings.


Similarly an echo effect and a comb filter are the same thing, but when 
people talk about an echo effect, they usually don't mean an echo effect 
configured to act as what is usually meant when people say a comb filter. 
And vice-versa.


If you pick compressor settings that cause their cutoff wavelengths to be 
longer enough than the sounds you are compressing, they will cause no 
(or little) distorsion in the perceived frequencies, and thus it will not 
sound like a compressor.


Instead of constant amplitude signals think of signal with ever changing 
amplitudes which I believe what we call music normally belongs to,


But constant-amplitude sound can also be music, can't it ?

The problem with calculating an average with peak amplitude is that 
peaks by definition occur only at certain points in time.


A square wave is entirely made of peak points.

What is it that makes you use such a flawed definition of peaks ?

 ___
| Mathieu Bouchard  tél: +1.514.383.3801  Villeray, Montréal, QC___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] change in compression detection

2011-01-11 Thread Roman Haefeli
On Tue, 2011-01-11 at 13:33 -0500, Mathieu Bouchard wrote:
> On Mon, 10 Jan 2011, Roman Haefeli wrote:
> 
> > Assuming that the more compression is applied, the more the RMS 
> > amplitude [1] approaches the Peak amplitude [2] of an audio signal,
> 
> Why do you assume that ? Let's say I take a signal and divide it by its 
> recent peak volume. The output of [osc~] will stay unchanged. A signal 
> made of plenty of sharp spikes will have a much lower RMS/peak ratio and 
> still be unchanged.
> 
> Are you confusing this with waveshaping such as [expr tanh($v1)] ? It may 
> be a special case of compression, but is not what is usually meant by 
> that.
> 
> http://en.wikipedia.org/wiki/Dynamic_range_compression
> 


I hope I'm not confusing dynamic range compression with wave shaping.
Actually, depending on the compressor settings (short attack times,
etc.) a dynamic compressor indeed acts a bit as a wave shaper.

You mention constant oscillator signals as an example. On those a
compressor wouldn't have (or only little, I should say in order to not
contradict what I said above) any effect. Instead of constant amplitude
signals think of signal with ever changing amplitudes which I believe
what we call music normally belongs to, especially acoustic (as opposed
to synthesized) music. Since compression/limiting allows to increase the
RMS value of a signal without amplifying the peaks, I think compression
decreases the difference between RMS amplitude and peak amplitude.

The problem with calculating an average with peak amplitude is that
peaks by definition occur only at certain points in time. In order to
get an average you need a constant signal which is constructed by
holding a reached peak value for a certain time and the slowly lowering
the amplitude until a new peak value appears. Assuming that hold time
usually is longer than one period of the measured signal, this would
again decrease the difference between average peak amplitude and average
RMS amplitude. Does that make sense?

Roman




___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] change in compression detection

2011-01-11 Thread Theron Trowbridge
If you normalize the output of the filter you describe to the same peak
amplitude as the original, it's RMS value will certainly increase.  Having
the peaks at a common reference point is critical.


-Theron
^

On Tue, Jan 11, 2011 at 10:33 AM, Mathieu Bouchard wrote:

> On Mon, 10 Jan 2011, Roman Haefeli wrote:
>
>  Assuming that the more compression is applied, the more the RMS amplitude
>> [1] approaches the Peak amplitude [2] of an audio signal,
>>
>
> Why do you assume that ? Let's say I take a signal and divide it by its
> recent peak volume. The output of [osc~] will stay unchanged. A signal made
> of plenty of sharp spikes will have a much lower RMS/peak ratio and still be
> unchanged.
>
> Are you confusing this with waveshaping such as [expr tanh($v1)] ? It may
> be a special case of compression, but is not what is usually meant by that.
>
> http://en.wikipedia.org/wiki/Dynamic_range_compression
>
>
>  ___
> | Mathieu Bouchard  tél: +1.514.383.3801  Villeray, Montréal, QC
>
> ___
> Pd-list@iem.at mailing list
> UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list
>
>
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] change in compression detection

2011-01-11 Thread Mathieu Bouchard

On Mon, 10 Jan 2011, Roman Haefeli wrote:

Assuming that the more compression is applied, the more the RMS 
amplitude [1] approaches the Peak amplitude [2] of an audio signal,


Why do you assume that ? Let's say I take a signal and divide it by its 
recent peak volume. The output of [osc~] will stay unchanged. A signal 
made of plenty of sharp spikes will have a much lower RMS/peak ratio and 
still be unchanged.


Are you confusing this with waveshaping such as [expr tanh($v1)] ? It may 
be a special case of compression, but is not what is usually meant by 
that.


http://en.wikipedia.org/wiki/Dynamic_range_compression

 ___
| Mathieu Bouchard  tél: +1.514.383.3801  Villeray, Montréal, QC
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] change in compression detection

2011-01-10 Thread Ludwig Maes
Or more generally, watch the histogram of samples

On 10 January 2011 11:09, Roman Haefeli  wrote:
> On Sun, 2011-01-09 at 20:26 -0500, Mathieu Bouchard wrote:
>> On Mon, 10 Jan 2011, ~E. wrote:
>>
>> > I'm searching how i can detect the change in the compression of an audio
>> > signal. The purpose is to detect (and quantified) the compression
>> > changes between the music and the ads in a radioshow. Have any ideas ?
>>
>> If you don't have the original uncompressed recordings, I don't see how
>> you could be doing that. You'd have to guess how complex sounds are
>> supposed to fade out normally, to find out how much the fade out has been
>> messed with.
>>
>> And then, in the compressor, you have both a measurement of input volume
>> and a formula for turning that input volume into a gain to be applied, and
>> both of those parts are subject to a lot of variation and tweaking.
>
> Assuming that the more compression is applied, the more the RMS
> amplitude [1] approaches the Peak amplitude [2] of an audio signal, you
> could measure the two and probably get a raw grasp how much compression
> was applied. This is simply an idea for which I don't have any reference
> that it is really working.
>
> I could imagine that recordings of certain sets of natural instruments
> show always a similar relation between peak and RMS amplitude for that
> set. However, usually there is already some compression applied when
> releasing the recording which makes it hard to distinct compression
> applied in the radio station from the compression shipped with the
> recording. I also could imagine, that it's much harder to find
> applicable rules for synthesized sounds.
>
> Roman
>
>
> [1] http://en.wikipedia.org/wiki/Amplitude#Root_mean_square_amplitude
> [2] http://en.wikipedia.org/wiki/Amplitude#Peak_amplitude
>
>
>
>
> ___
> Pd-list@iem.at mailing list
> UNSUBSCRIBE and account-management -> 
> http://lists.puredata.info/listinfo/pd-list
>

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] change in compression detection

2011-01-10 Thread Roman Haefeli
On Sun, 2011-01-09 at 20:26 -0500, Mathieu Bouchard wrote:
> On Mon, 10 Jan 2011, ~E. wrote:
> 
> > I'm searching how i can detect the change in the compression of an audio 
> > signal. The purpose is to detect (and quantified) the compression 
> > changes between the music and the ads in a radioshow. Have any ideas ?
> 
> If you don't have the original uncompressed recordings, I don't see how 
> you could be doing that. You'd have to guess how complex sounds are 
> supposed to fade out normally, to find out how much the fade out has been 
> messed with.
> 
> And then, in the compressor, you have both a measurement of input volume 
> and a formula for turning that input volume into a gain to be applied, and 
> both of those parts are subject to a lot of variation and tweaking.

Assuming that the more compression is applied, the more the RMS
amplitude [1] approaches the Peak amplitude [2] of an audio signal, you
could measure the two and probably get a raw grasp how much compression
was applied. This is simply an idea for which I don't have any reference
that it is really working.

I could imagine that recordings of certain sets of natural instruments
show always a similar relation between peak and RMS amplitude for that
set. However, usually there is already some compression applied when
releasing the recording which makes it hard to distinct compression
applied in the radio station from the compression shipped with the
recording. I also could imagine, that it's much harder to find
applicable rules for synthesized sounds. 

Roman
 

[1] http://en.wikipedia.org/wiki/Amplitude#Root_mean_square_amplitude
[2] http://en.wikipedia.org/wiki/Amplitude#Peak_amplitude




___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] change in compression detection

2011-01-09 Thread Theron Trowbridge
You are correct - you can't know for sure without the original audio to
compare.  But there is a tool called TAU Analyzer that attempts to detect
signs of bitrate (as opposed to dynamic range) compression in audio:

http://en.true-audio.com/Tau_Analyzer_-_CD_Authenticity_Detector

(Windows only, unfortunately)

Since most lossy audio codecs slice audio into frequency bands and look to
see which of those can be eliminated based on human psychoacoustic models,
bands of missing frequencies are often a tell-tale sign of compression.  But
not always - it can also indicate heavy or sloppy DSP.


-Theron
^

On Sun, Jan 9, 2011 at 5:26 PM, Mathieu Bouchard  wrote:

> On Mon, 10 Jan 2011, ~E. wrote:
>
>  I'm searching how i can detect the change in the compression of an audio
>> signal. The purpose is to detect (and quantified) the compression changes
>> between the music and the ads in a radioshow. Have any ideas ?
>>
>
> If you don't have the original uncompressed recordings, I don't see how you
> could be doing that. You'd have to guess how complex sounds are supposed to
> fade out normally, to find out how much the fade out has been messed with.
>
> And then, in the compressor, you have both a measurement of input volume
> and a formula for turning that input volume into a gain to be applied, and
> both of those parts are subject to a lot of variation and tweaking.
>
>  ___
> | Mathieu Bouchard  tél: +1.514.383.3801  Villeray, Montréal, QC
>
> ___
> Pd-list@iem.at mailing list
> UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list
>
>
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] change in compression detection

2011-01-09 Thread Mathieu Bouchard

On Mon, 10 Jan 2011, ~E. wrote:

I'm searching how i can detect the change in the compression of an audio 
signal. The purpose is to detect (and quantified) the compression 
changes between the music and the ads in a radioshow. Have any ideas ?


If you don't have the original uncompressed recordings, I don't see how 
you could be doing that. You'd have to guess how complex sounds are 
supposed to fade out normally, to find out how much the fade out has been 
messed with.


And then, in the compressor, you have both a measurement of input volume 
and a formula for turning that input volume into a gain to be applied, and 
both of those parts are subject to a lot of variation and tweaking.


 ___
| Mathieu Bouchard  tél: +1.514.383.3801  Villeray, Montréal, QC
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


[PD] change in compression detection

2011-01-09 Thread ~E.
Hi, 

I'm searching how i can detect the change in the compression of an audio signal.
The purpose is to detect (and quantified) the compression changes between the 
music and the ads in a radioshow.

Have any ideas ?

thanks

dtx.
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list