[sdiy] MinBlep generation and minimum phase reconstruction

Olivier Gillet ol.gillet at gmail.com
Tue Aug 30 13:41:29 CEST 2011


Hi all,

I was trying to generate a minBLEP table and had trouble with the
minimum phase reconstruction.

My first attempt:

function [out] = minblep(num_zero_crossings, oversampling)
  n = num_zero_crossings * oversampling * 2 + 1;
  t = 0:(n - 1);
  s = sinc(-num_zero_crossings + 2.0 * t / (n - 1) * num_zero_crossings);
  windowed_sinc = s' .* blackman(n);
  [_, out] = rceps(windowed_sinc);


Yielded something like this:

plot(minblep(16, 64));
http://img109.imageshack.us/img109/9332/screenshot20110830at105.png

The "echo" appearing at the 1024th sample is certainly not something I expected!


If I pad the input to rceps with zeros, the "echo" is shifted further away:

function [out] = minblep(num_zero_crossings, oversampling)
  n = num_zero_crossings * oversampling * 2 + 1;
  t = 0:(n - 1);
  s = sinc(-num_zero_crossings + 2.0 * t / (n - 1) * num_zero_crossings);
  windowed_sinc = s' .* blackman(n);
  padded_windowed_sinc = windowed_sinc;
  padded_windowed_sinc(2 * n) = 0;
  [_, out] = rceps(padded_windowed_sinc);
  out = cumsum(out);

http://img683.imageshack.us/img683/7269/screenshot20110830at116.png

The bigger the padding, the smaller the echo.


I actually found this alternative minimal phase reconstruction code
which doesn't use rceps:
http://old.nabble.com/Simplified-MinBLEP-generation--td1914775.html

It pads the windowed sinc with zeros as I tried ; and then discard the
second half of the result (which has the "echo"). The results are very
close to those obtained with padding + rceps:
http://img18.imageshack.us/img18/8856/screenshot20110830at121.png


My questions is:

Which phenomenon explains this "echo"? Is it a part of the minBLEP or
is it an artifact of the minimum phase reconstruction process that
should be discarded?

The figures in the original minBLEP paper and some pre-computed tables
found online seem to suggested that it should be discarded. While
pretty much every minBLEP code I have found online generates this
"echo" and doesn't seem to truncate it. I am pretty sure I am missing
something obvious.

Thanks!
Olivier



More information about the Synth-diy mailing list