The program can be compiled with g++ on Linux or with mingw on Windows.
The project uses the CMake build system: http://www.cmake.org
The development versions of the following libraries need to be usable before compiling:
In Debian for example, you can run the following command to install all the dependencies: apt-get install cmake libqt4-dev libfftw3-dev libsndfile-dev libsamplerate-dev libmad0-dev
For flac and ogg format support libsndfile version 1.0.18 or higher with libflac and libogg plugins built-in has to be used.
To prepare the makefile, go to the build directory in the source tree and type cmake ..
If there are no errors (like missing libraries), you can build the program by typing make
The executable spectrogram will appear in the build directory.
Besides the dependencies you should have MinGW and MSYS installed.
Once you have all the dependencies configured and compiled with mingw, start the cmake-gui program and enter the source code directory and use the build directory to build the binaries in.
Then hit "Configure" and use the "MSYS Makefiles" generator. For each library that wasn't found automatically, enter the path manually and continue with the configuration process.
Once configuring is done, press "Generate"
A Makefile now appears in the build directory. Navigate to that directory in the MSYS shell and type make to compile the program.
The most interesting class of the program is Spectrogram, it holds the parameters for a spectrogram and performs analysis (turning sounds to images) and synthesis (turning images to sounds).
The MainWindow class handles the GUI. The MainWindow::ui member is used to access the widgets as designed in mainwindow.ui created with Qt Designer. In the main window the user can specify parameters for the spectrogram and supply audio data or a spectrogram to work with. The analysis and synthesis itself is then performed in a separate thread to keep the GUI responsive.
The Soundfile class provides abstraction for working with audio files. It implements high-level operations like reading a channel of audio data from a given file. It aggregates all implementations of SndfileData.
SndfileData is an abstract class whose implementations perform low-level format-dependent operations. Different libraries can be used to implement the class and thus provide support for multiple audio formats.
For more details, see documentation of these classes.
1.7.1