Audio processing library and Audacity

Audio software developers forum.

If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like

Audio processing library and Audacity

Permanent link to this post Posted by xtv » Fri Apr 14, 2017 5:00 pm

Hello everyone,

First and foremost, I'd like to thank everyone involved in Audacity development. You are responsible for providing an awesome tool for the community, and being an audio/music lover since a teenager, where Cool edit was one of the only tools to go (and a quite expensive one at that time), I know how much value you offer with this incredible tool.
I work in a telecom equipment company, and Audacity comes handy sometimes to debug call problems by analysing the audio recording.
So, thanks! Twice. :)

For a personal / hobby project, I was searching for an audio processing library that could both analyse and apply some effects in audio files automatically.
The first experience I'd like to do is to build a dynamic equalizer that would be based on the audio file frequency spectrum.
Explaining better, let's say I'd like to reach a flat spectrum out of an audio file that contains high amplitude on low frequencies, and low amplitude on high frequencies. I'd have to equalise it to lower low frequencies and rise high frequencies.

Since I know Audacity is pretty capable of doing that, I've started to get to know how the code is structured. I was hoping to find an audio library that Audacity was built over, and for my surprise, It seems that the analysis and audio effects code is part of the Audacity project itself. Pretty cool.

I've read though that the GUI/audio code is somehow coupled, and there was an intention of separating them, by building a library (that was initially called Mezzo, and then LibAudacity), but it seems that this is currently in hold.

Since I have near zero experience with audio programming and libraries, I'd like to ask you for suggestions, and to point out the options I have. Being my main questions:

- Saving me the time to get familiar with Audacity code, how hard would it be to implement just a command line tool to do what I'm willing to do, using what Audacity currently have?

- Is there any audio library out there that you would recommend me to use for such task (say, saving me the hard work of doing Frequency spectrum analyser, and also audio equaliser) ?

Thank you for your time.

Stevan.
xtv
 
Posts: 3
Joined: Tue Apr 11, 2017 9:58 pm
Operating System: Linux Mint

Re: Audio processing library and Audacity

Permanent link to this post Posted by steve » Fri Apr 14, 2017 7:58 pm

xtv wrote:For a personal / hobby project, I was searching for an audio processing library that could both analyse and apply some effects in audio files automatically.
The first experience I'd like to do is to build a dynamic equalizer that would be based on the audio file frequency spectrum.

Could you tell us a bit more about the purpose of this project and what you mean by "automatically".
For example, if you are looking for real-time signal processing, then Audacity is not likely to be much help because it's not designed for real-time processing.
Are you wanting to write an effect in C++, or some other programming language, or are you hoping to avoid actual programming and in some way "automate" existing functionality in Audacity? I'm not sure how to advise you as I don't have a clear idea of what exactly you want to do.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 44627
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Audio processing library and Audacity

Permanent link to this post Posted by xtv » Sun Apr 16, 2017 4:07 am

steve wrote:
xtv wrote:For a personal / hobby project, I was searching for an audio processing library that could both analyse and apply some effects in audio files automatically.
The first experience I'd like to do is to build a dynamic equalizer that would be based on the audio file frequency spectrum.

Could you tell us a bit more about the purpose of this project and what you mean by "automatically".
For example, if you are looking for real-time signal processing, then Audacity is not likely to be much help because it's not designed for real-time processing.
Are you wanting to write an effect in C++, or some other programming language, or are you hoping to avoid actual programming and in some way "automate" existing functionality in Audacity? I'm not sure how to advise you as I don't have a clear idea of what exactly you want to do.


Hello Steve,
I'm sorry for not being completely clear; My goal would be to build an embedded audio player, both for home system, as for my car.
I have a good set of speakers / amps on both systems, and an old, but still amazing DEH-P880PRS Pioneer head unit at the car.
Thought of using some generic single board computer like a raspberry pi or one of it's clones, with a good quality DAC to convert the processed digital audio to analog.

So, initially, it feels like a real-time signal processing - as I'm processing audio that would be instantly going to be reproduced.
BUT, since I'll have access to the entire media (one entire music file), I could pre-process it before playing, and saving as an output file to be reproduced. Of course this operation will take some time, but I believe I can overcome it by doing the processing before the current track being played finishes.
Also, for a full track spectrum analisys, It gets a bit away of the real time approach.

Not sure if I was clear enough.
Being more specific about your questions, I'm not willing to get into writing real-time audio effect functions (I had a look a libPortAudio before posting here, and that wasn't really what I'm looking for) =), and Yes, what I was looking for is exactly this; automate existing functions in Audacity.

Thanks for being careful to understand my intention here. :geek:
Cheers.
xtv
 
Posts: 3
Joined: Tue Apr 11, 2017 9:58 pm
Operating System: Linux Mint

Re: Audio processing library and Audacity

Permanent link to this post Posted by steve » Sun Apr 16, 2017 1:22 pm

I don't think that Audacity will be useful for this, other than perhaps testing analysis / processing algorithms for your project.
Audacity will just about run on a Raspberry Pi, but because of the large number of library dependencies and the low spec of the Pi, it is a bit of a challenge to get it to run at all, and that's before considering doing any practical work with it.

As you're considering using a Raspberry Pi, it's perhaps worth considering writing an application in Python. There's quite a lot of audio libraries available for Python.
A couple of links that may help:
https://wiki.python.org/moin/Audio/
https://wiki.python.org/moin/PythonInMusic
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 44627
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Audio processing library and Audacity

Permanent link to this post Posted by xtv » Thu Apr 20, 2017 11:51 am

steve wrote:I don't think that Audacity will be useful for this, other than perhaps testing analysis / processing algorithms for your project.
Audacity will just about run on a Raspberry Pi, but because of the large number of library dependencies and the low spec of the Pi, it is a bit of a challenge to get it to run at all, and that's before considering doing any practical work with it.

As you're considering using a Raspberry Pi, it's perhaps worth considering writing an application in Python. There's quite a lot of audio libraries available for Python.
A couple of links that may help:
https://wiki.python.org/moin/Audio/
https://wiki.python.org/moin/PythonInMusic


Thanks a lot, Steve! I agree with you, if it isn't possible to decouple specifically the audio code from the rest of the project, it will be something hard for such a modest hardware to handle.

Thanks for the python libs. I'm taking a look at them.
xtv
 
Posts: 3
Joined: Tue Apr 11, 2017 9:58 pm
Operating System: Linux Mint


Return to General Audio Programming



Who is online

Users browsing this forum: No registered users and 3 guests