Re: [ecasound] ecasound-2.5.2 wrongly displayes clipping info ?

From: Sergei Steshenko <sergstesh@email-addr-hidden>
Date: Mon Sep 01 2008 - 21:29:02 EEST

--- On Sat, 8/30/08, Sergei Steshenko <sergstesh@email-addr-hidden> wrote:

> From: Sergei Steshenko <sergstesh@email-addr-hidden>
> Subject: [ecasound] ecasound-2.5.2 wrongly displayes clipping info ?
> To: ecasound-list@email-addr-hidden
> Date: Saturday, August 30, 2008, 4:48 PM
> Hello All,
>
> I've noticed the following:
>
> 1)
> (audiofx) Peak amplitude, period: pos=0.99997 neg=0.99997.
> (audiofx) Peak amplitude, all : pos=0.99997 neg=0.99997.
> (audiofx) Clipped samples, period: pos=70 neg=122.
> (audiofx) Clipped samples, all : pos=70 neg=122.
> (audiofx) Max gain without clipping, all: 1.00003.
>
> 2)
> (audiofx) Peak amplitude, period: pos=0.99997 neg=0.99997.
> (audiofx) Peak amplitude, all : pos=0.99997 neg=0.99997.
> (audiofx) Clipped samples, period: pos=30 neg=6.
> (audiofx) Clipped samples, all : pos=30 neg=6.
> (audiofx) Max gain without clipping, all: 1.00003.
>
> 3)
> (audiofx) Peak amplitude, period: pos=0.99997 neg=0.99997.
> (audiofx) Peak amplitude, all : pos=0.99997 neg=0.99997.
> (audiofx) Clipped samples, period: pos=545 neg=260.
> (audiofx) Clipped samples, all : pos=545 neg=260.
> (audiofx) Max gain without clipping, all: 1.00003.
>
> 4)(audiofx) Peak amplitude, period: pos=0.99997
> neg=0.99997.
> (audiofx) Peak amplitude, all : pos=0.99997 neg=0.99997.
> (audiofx) Clipped samples, period: pos=152 neg=59.
> (audiofx) Clipped samples, all : pos=152 neg=59.
> (audiofx) Max gain without clipping, all: 1.00003.
> .
>
> In all these cases amplitude is leaa than 1, i.e. there is
> no clipping,
> the signal can still be amplified without clipping, but
> number of clipped
> samples is not 0.
>
> To me all these records are self-contradictory.
>
> Could anyoine please explain me what is happening here ?
>
> There are a lot of normal records, like these ones:
>
> (audiofx) Peak amplitude, period: pos=0.87939 neg=0.89938.
> (audiofx) Peak amplitude, all : pos=0.87939 neg=0.89938.
> (audiofx) Clipped samples, period: pos=0 neg=0.
> (audiofx) Clipped samples, all : pos=0 neg=0.
> (audiofx) Max gain without clipping, all: 1.11187.
>
> ,
> (audiofx) Peak amplitude, period: pos=1.00000 neg=1.00000.
> (audiofx) Peak amplitude, all : pos=1.00000 neg=1.00000.
> (audiofx) Clipped samples, period: pos=271 neg=197.
> (audiofx) Clipped samples, all : pos=271 neg=197.
> (audiofx) Max gain without clipping, all: 1.00000.
>
> - well, this latter one is not quite normal because
> amplitude is 1, and
> IMO for clipping to be true it should be more than 1.
>
>
> Thanks,
> Sergei.
>
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move
> Developer's challenge
> Build the coolest Linux based applications with Moblin SDK
> & win great prizes
> Grand prize is a trip for two to an Open Source event
> anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Ecasound-list mailing list
> Ecasound-list@email-addr-hidden
> https://lists.sourceforge.net/lists/listinfo/ecasound-list

Well, I added amplitude measurement to my plugins and now I better
understand what ecasound is doing.

It reports amplitude more or less in the place of a chain where
-ev -evp can be found. This is probably by itself is not bad, though
we are interested in possible clipping at the output, aren't we ?

I also think there is a bug:

(audiofx) Peak amplitude, period: pos=0.99997 neg=0.99997.
(audiofx) Peak amplitude, all : pos=0.99997 neg=0.99997.
(audiofx) Clipped samples, period: pos=152 neg=59.
(audiofx) Clipped samples, all : pos=152 neg=59.

are reported when -ev -evp are placed like this:

$FLAC --force-raw-format --endian=little --sign=signed -d -c INPUT.flac 4_seconds_silence.flac | $ECASOUND -D -z:nodb -f 16,2,44100 -i stdin -ev -evp ...
.

I think it's a bug because:

1) the amplitudes are OK, they are 32766 in terms of 16 bits audio,
maximum is 32787;
2) no conversion is made on sound yet, so there is no source of clipping
in the chain yet;
3) there can be no higher than allowed amplitude from FLAC decoder
because its output is short signed integer, not floating point.

Regards,
  Sergei.

      

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Tue Sep 2 00:15:02 2008

This archive was generated by hypermail 2.1.8 : Tue Sep 02 2008 - 00:15:02 EEST