[LAU] dynamic range analysis tool

Raffaele Morelli raffaele.morelli at gmail.com
Tue Aug 19 07:59:35 UTC 2014


2014-08-08 19:42 GMT+02:00 Fons Adriaensen <fons at linuxaudio.org>:

> On Fri, Aug 08, 2014 at 08:46:54AM +0200, Raffaele Morelli wrote:
>
> > Great tool, I finally leaved it untouched as cumulative probability it's
> > enough for the scope*.
> >
> > My 0.02€: I would suggest to add a cli option for output filename,
> leaving
> > 'ebur128-prob' as default if none is specified
>
> Yes, the cumulative plots look less sexy but will give a better idea of
> dynamic range than a histogram. The 'loudness range' as displayed by
> ebumeter and printed by ebur128 is actually computed from the (modified)
> cumulative plots - details in the paper.
>

​cumulative plot is way better to graphically compare two (or a bunch of)
audio files dynamic.

statistician here ;-)
here's a few R lines to generate "sexy" plots, the script is supposed to be
ran in the same dir where prob files are

​
require(ggplot2)
require(reshape2)

# read prob files, a shell script is being used to create and rename prob
files as outputted from ebur128
files <- list.files(".", "*.prob$")

# load prob files as tables in a list
data.list <- lapply(files, read.table)

# create an empty matrix
s<-matrix(nrow=751, ncol=length(files))

# loads cumulative probabilities into the matrix
for( i in 1:length(files)) {
    s[,i]<- data.list[[i]]$V2
}

# matrix to dataframe and proper columns name
s2 <- as.data.frame(s)
colnames(s2) <- files
s2$dbs <- data.list[[1]]$V1 # add X-axis variable (dB)

# melt the data to a long format
df2 <- melt(data = s2, id.vars = "dbs")

# plot, using the aesthetics argument 'colour'
g<-ggplot(data = df2, aes(x = dbs, y = value, colour = variable)) +
geom_line()
plot(g)
​

Next release will have the histograms as well, it's only a few chars extra
> code, and the filename as you suggest.
>

​great
/r
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-user/attachments/20140819/cca9a55a/attachment-0001.html>


More information about the Linux-audio-user mailing list