Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem in Sushi normalization/clipping #26

Open
dead opened this issue Sep 29, 2016 · 5 comments
Open

Problem in Sushi normalization/clipping #26

dead opened this issue Sep 29, 2016 · 5 comments

Comments

@dead
Copy link

dead commented Sep 29, 2016

I have an audio that the Sushi normalization/clipping does not work.
The problem is that np.median (code) is zero for this audio.

Graphs from the audio that shows why both max_value and min_value medians are 0:

max_value
min_value

When max_value and min_value are zeros the clipping zeroes all the audio, resulting in Sushi not working properly.

@CoffeeFlux
Copy link

Hey, not sure I understand the bug - could you label the axes on your graph?

@dead
Copy link
Author

dead commented Sep 29, 2016

The bug is that the median is zero for both max and min values, and since both values are zero the clipping basically zeroes all the data from the audio.

The graphs are a simple visualization from the audio sorted by its values.
plt.plot(np.sort(audio_source[audio_source >= 0]))

X axis is the sorted sample index, and Y the value of this sample.
And from np.median:

Given a vector V of length N, the median of V is the middle value of a sorted copy of V, V_sorted - i e., V_sorted[(N-1)/2], when N is odd, and the average of the two middle values of V_sorted when N is even.

And as you can see in both graphs, the middle values are zero.

@tp7
Copy link
Owner

tp7 commented Sep 29, 2016

What kind of audio is that and why are you using sushi on it? It sure looks like a synthetic case.

@dead
Copy link
Author

dead commented Sep 29, 2016

I'm using sushi to sync subs from a work raw to a final one. It's not a synthetic case.

@tp7
Copy link
Owner

tp7 commented Sep 29, 2016

Could you upload it somewhere please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants