It's C and Python, not C++
C can be used in C++ code, no?
AudioFlux: A C/C++ library for audio and music analysis
11–20 of 58 posts
Re: AudioFlux: A C/C++ library for audio and music analysis
#12Re: AudioFlux: A C/C++ library for audio and music analysis
#13Earlier 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.
Re: AudioFlux: A C/C++ library for audio and music analysis
#14It's C and Python, not C++
C can be used in C++ code, no?
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
#15Re: AudioFlux: A C/C++ library for audio and music analysis
#16Earlier 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.
Re: AudioFlux: A C/C++ library for audio and music analysis
#17Re: AudioFlux: A C/C++ library for audio and music analysis
#18Earlier 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.
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
#19If 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.
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.
Re: AudioFlux: A C/C++ library for audio and music analysis
#20What's this C/C++ language?