Found a scientific publication, wanted to implement but I'm dumb

hal.inria.fr/hal-01159700v1/document

It seems like a useful thing (for example if could be used to cure many clipped music albums which were made by cucked producers), and there's currently no free software which does that.

From what I see, the algorithm is not very hard for those who can read math language…

What do you think?

Other urls found in this thread:

stackoverflow.com/questions/17222492/how-to-change-frequency-pitch-and-the-amplitude-in-wave-file-using-c-sharp
marketplace.visualstudio.com/items?itemName=severino.AudioSoundEditorAPIforNET
twitter.com/SFWRedditGifs

FUCK OFF YOU Holla Forums CUNT

Lel

Jesus, too much reading.
Wouldn't it be easier to write a simple application which iterated over the entire piece twice, finding the maximum amplitude first and then normalizing the rest based on that the second time around?

Using C# because it's great for getting started running in Windows...
A cursory google found this: stackoverflow.com/questions/17222492/how-to-change-frequency-pitch-and-the-amplitude-in-wave-file-using-c-sharp which seems promising.
You could do it in C# with a library like marketplace.visualstudio.com/items?itemName=severino.AudioSoundEditorAPIforNET I suspect, too.

We know

|
|>
|3
|

shoot yourself you niggerly leftist

You can try emailing the first author (and maybe the second) and explaining what you want to do. Chances are he still has the code and will be willing to send it to you or release it as GPL. Just don't expect it before the new year. Expect the code to be shitty because usually there's no time to polish it.
Failing that you can probably get him to explain the part of the algorithm you didn't find clear.


Easier, yes, but if you do that you risk effectively muting the whole thing. Everything should be as simple as possible, but not simpler. Also, the paper isn't that long. The margins are huge and you probably only need to understand a page or two to get the algorithm, the rest is experiments and background info.

As mentioned in paper, the codez are in MATLAB, so they are of little use.
I'd rather do it in free language, that also allows for some speed, for example C, OCaml, or even fucking Rust.


Unfortunately you didn't understand what it signal clipping or didn't read the post.
There is no point in simply scaling down amplitude values; the publication is about guessing original values which were out of representable range of the medium and consequently were clamped to the representable range.
Links you given are 100% unrelated to the subject.

Matlab has a tool to convert Matlab code to C. Failing that, learn the matrix math used and you can reimplement it with a C/C++ matrix library fairly easily. Plenty of other Matlab tools have implementations in other languages as well.

I believe GNU Octave is largely compatible with MATLAB code.


No idea how fast it is, though.

Python. Tons of former MATLAB users are switching to scientific python. You just import a few libraries and you have clones of just about every MATLAB function.

sage for doublepost.
I want to like Octave, I really do, but I found it to be buggy as hell, and any little syntax error crashes the whole damn thing. It was a huge impetus for me to just switch to scientific python.

Yeah, that's the point. These special symbols are hard and non-searchable when you see them first time. Reading an entire book about linear algebra seems like overkill if I want to simply convert some fucking formulas into some fucking code, right?

But I will need to call this from other code which should be fast, too… so python is not an option, I guess.

WEW LAD.

You wanna reimplement someone's work without learning the basis of their work. You want to build a house without learning how to pour concrete.

If you're converting Matlab code then, aside from a few things like matrix exponentiation, transpose, and elementwise operations, are all done as member functions. If you're working off of the paper, then quit being a whiny little shit, do some fucking research, and learn something.

There's a filter in GoldWave that already does a pretty good job at "healing" clipping in audio.

It suffers from poor implementation though. It's essentially like a pop filter, but when you isolate a particular audio segment to apply it on, the beginning and end of that segment have noticeable seams...because the developer didn't add any concept of "fading the healing in and out", so it's just an abrupt edit.

this method is not applicable to clipping, because it doesn't respect the constraint that restored value must have same sign and have value ≥ original
and of course it has to be "abrupt" edit, because non-clipped samples must not be touched

You can't read the math, ok, that's not something you can learn in an afternoon. But matlab has functions with googleable names. Even if you don't understand the code you should still be able to convert it to any other language unless they used some really clever code.

Mathfag here, does anyone have an example of a clipped audio file? I might give it a spin in Scheme, would be interesting to create something useful for once.

You can take any audio file and clip it. This is trivial.

That means, for all sample values (a) clamp a to range (-M..M): -M < a < M, and choose M such that there are quite a lot of samples which will be changed.