Live data from Hacker News

AudioFlux: A C/C++ library for audio and music analysis

github.com

11–20 of 58 posts

Re: AudioFlux: A C/C++ library for audio and music analysis

#13
post #12
post #9

Earlier quoted context omitted.

C can be used in C++ code, no?

Yes. And C can also be used with Python and Rust. That does not make this a Rust library.

Right, but C++ started as an extension of C and is mostly compatible and historically you could compile C with the C++ compiler. I don't think it's a good comparison.

Re: AudioFlux: A C/C++ library for audio and music analysis

#14
post #9
post #8

It's C and Python, not C++

C can be used in C++ code, no?

It is true that there is C code that is conforming C++ code. However I would say if you’re using a C compiler with with “extern C” in the headers for C++ linker compatibility (as this library does) then saying C++ is about as misleading as saying a Rust library is C++ as you can link to that too.

As far as compatibility and “history” the languages are different enough now. There are both: features in C that do not exist in C++, and code that is conforming C that would be UB in C++. Saying C/C++ (for real) is usually a dumb target when it’s better to pick one and settle with that.

If it’s C, just say so. Everyone knows what extern C is, you don’t need to confuse.

Re: AudioFlux: A C/C++ library for audio and music analysis

#16
post #13
post #12

Earlier quoted context omitted.

Yes. And C can also be used with Python and Rust. That does not make this a Rust library.

Right, but C++ started as an extension of C and is mostly compatible and historically you could compile C with the C++ compiler. I don't think it's a good comparison.

Zig can compile C. That makes this C/C++/Zig library. Right? :^)

Re: AudioFlux: A C/C++ library for audio and music analysis

#18
post #13
post #12

Earlier quoted context omitted.

Yes. And C can also be used with Python and Rust. That does not make this a Rust library.

Right, but C++ started as an extension of C and is mostly compatible and historically you could compile C with the C++ compiler. I don't think it's a good comparison.

> historically you could compile C with the C++ compiler.

not any C, only the C++-compatible subset.

    int* foo = malloc(sizeof(int)); 
has never worked in C++ for instance while it's valid C. Code that worked is code that people actually did effort to express in a way compatible with a C++ compiler.

Re: AudioFlux: A C/C++ library for audio and music analysis

#19
post #5
post #2

If this is supposed to be used for deep-learning, shouldn't all the transforms be GPU-accelerated torch functions?

By the looks of it, those functions extract features (like frequency peaks). You do that once for a sound. The output could function as input for an NN, in which case it would be a tokenizer for sound.

Given what I've seen in audio ML research:

1) Tuning hyperparameters of your audio preprocessing is a pain if it's a preprocessed CPU step. You have to redo preprocessing every time you want to tune your audio feature hyperparams

2) It's quite common to use torchaudio spectrograms, etc. purely because they are faster (I can link to a handful of recent high-impact audio ML github repos if you like)

3) If you use nnAudio, you can actually backprop the STFT or mel filters and tune them if you like. With that said, this is not so commonplace.

4) Sometimes the audio is GENERATED by a GPU. For example, in a neural vocoder, you decode the audio from a mel to a waveform. Then, you compute the loss over the true versus predict audio mel spectrograms. You can't do this with these C++ features. (Again, I can link a handful of recent high-impact audio ML github repos if you like.)

Again, I just don't get it.

Post reply on HN