question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Preemphasis generates a glitch in the start of the output signal

See original GitHub issue

The current implementation of the preemphasis generates a glitch in the output signal.

Steps to reproduce:

a = np.array([9.12e-05, 9.15e-05, 9.13e-05, 6.10e-05, 3.05e-05, 3.07e-05, 6.10e-05])
b = librosa.effects.preemphasis(a)
print(b)

Out: 
array([-9.699088e-01,  3.036000e-06,  2.545000e-06, -2.756100e-05,
       -2.867000e-05,  1.115000e-06,  3.122100e-05])

Here b[0] is clearly off.

What can be done is to asign b[1] to b[0]. This hack would deal with the glitch while keeping the lengths of b and a the same.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
gerazovcommented, Jun 12, 2020

Awesome 😎 keep up the good work guys!

1reaction
lostanlencommented, Jun 9, 2020

Yes, considering that values of coef are typically very close to 1, i would still support linear extrapolation. Replicating y[0] (“constant”) or y[1] (“reflect”) would break the continuity of the first derivative, and thus create potential artifacts in the emphasized output.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The issues of pre-emphasis, de-emphasis, clipping and ...
The output of a direct FM transmitter with pre-emphasis can not be ... Of course, clipping an audio signal produces major distortion in...
Read more >
What is Signal De-Emphasis and When is it Used? - Total Phase
Pre-emphasis works by boosting the high-frequency portion of the signal. This compensates for the high-frequency loss in the cable.
Read more >
Pre–emphasis - Signal Processing - MATLAB Answers
I used filter h=[1 -0.95] twice. Each time, x is the input of the filter and y is the output. At both examples,...
Read more >
Application Note: Ideal Pre-Emphasis Constant Setting
The MP1825B 4 Tap Emphasis generates emphasis signals up to 4 taps with a maximum transmission speed of 28.1 Gbit/s. As shown in...
Read more >
impulse response - pre-emphasis filter - parameter a
I can not find any formula for this problem... Suppose we filter singals with the below pre-emphasis filter: y(n)= ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found