FIR-LADSPA: A LADSPA plugin for FIR filtering

Hmm, OK. I developed the code using gcc version 7.5.0 and did not need to add any special commands to support the C11++ standard. It was supposedly fully supported by version 4.8, but I have not tested the compilation on earlier versions of gcc.

Can you please edit the Makefile:
In the line:
Code:
CFLAGS          =       -I. -Ofast -Wall -c -fPIC -DPIC
Please add:
Code:
-std=c++11
Just before
Code:
-I.
Make sure to keep a space between them.

Then try to run the make command again. Please let me know if that works and I will update the file in the download.

You can edit the Makefile using e.g. the nano editor:
nano Makefile
(make the changes I show above)
control-s to save the file
control-x to exit the editor.
 
Successful!


flavio-PC LADSPA-FIR # make
g++ -std=c++11 -I. -Ofast -Wall -c -fPIC -DPIC -o LADSPA_FIR.o LADSPA_FIR.cpp
g++ -shared -o LADSPA_FIR.so LADSPA_FIR.o
rm LADSPA_FIR.o
flavio-PC LADSPA-FIR # make install
test -d /usr/local/lib/ladspa/ || mkdir /usr/local/lib/ladspa/
cp *.so /usr/local/lib/ladspa/


Thank you very much!


  • Aggiungi al Frasario
    • Non ci sono elenchi di parole per Inglese -> Italiano...
    • Crea un nuovo elenco di parole...
  • Copia

  • Aggiungi al Frasario
    • Non ci sono elenchi di parole per Inglese -> Italiano...
    • Crea un nuovo elenco di parole...
  • Copia
 
Wait, maybe that's not all.
The following steps are unclear:

5. Navigate to the directory where the FIR engine code has been downloaded/saved.
6. Modify the FIR engine compile shell script so it can be run using the command:
chmod +x ./compile_fir_engine.exe


The file "compile_fir_engine.sh" is in same folder "LADSPA-FIR", inside it there is nothing to edit.
So I renamed it "compile_fir_engine.exe" and then,

flavio-PC LADSPA-FIR # chmod +x ./compile_fir_engine.exe
chmod: unable to access './compile_fir_engine.exe': File or directory does not exist
 
Wait, maybe that's not all.
The following steps are unclear:

5. Navigate to the directory where the FIR engine code has been downloaded/saved.
6. Modify the FIR engine compile shell script so it can be run using the command:
chmod +x ./compile_fir_engine.exe


The file "compile_fir_engine.sh" is in same folder "LADSPA-FIR", inside it there is nothing to edit.
So I renamed it "compile_fir_engine.exe" and then,

flavio-PC LADSPA-FIR # chmod +x ./compile_fir_engine.exe
chmod: unable to access './compile_fir_engine.exe': File or directory does not exist

The file "compile_fir_engine.sh" should NOT be empty. It contains the commands needed to compile the FIR engine. If you run the command
Code:
ls -l compile_fir_engine.sh
You should see the following output:
Code:
[email protected]:~/test$ ls -l ./compile_FIR_engine.sh
-rwxrwxr-x 1 charlie charlie 940 Mar 26 13:28 ./compile_FIR_engine.sh
The output shows that the file is 940 bytes in size. To see the contents, you can run the command:
Code:
cat ./compile_FIR_engine.sh
You will see the lines of the shell script on the screen.

Please download the file again. It is probably already executable when it is downloaded on your system. Just skip the chmod command for now.

You can then verify that the shell script is working by running it without the extra parameter (e.g. float/double) like this, and you should get the output shown below:
Code:
[email protected]:~/test$ ./compile_FIR_engine.sh
You must supply float or double as a command line parameter
   to indicate the FFTW precision for the FIR engine.
The level of precision should be supported by FFTW (see
   configuring FFTW in the FFTW installation docs.
Please try again.
 
Last edited:
The file "compile_FIR_engine.sh" is present in folder "LADSPA-FIR" and has not been modified.



flavio-PC LADSPA-FIR # ls -l compile_fir_engine.sh
ls: unable to access 'compile_fir_engine.sh': File or directory does not exist

Didn't you rename the file? That is what you said HERE...

That is why I suggested that you download it again. Or you could try to rename compile_fir_engine.exe back to compile_fir_engine.sh...
 
flavio-PC LADSPA-FIR # cat ./compile_FIR_engine.sh
#! /bin/bash

if [ "$#" -ne 1 ]; then
echo "You must supply float or double as a command line parameter"
echo " to indicate the FFTW precision for the FIR engine."
echo "The level of precision should be supported by FFTW (see"
echo " configuring FFTW in the FFTW installation docs."
echo "Please try again."
exit 2
fi

if [ "$1" = "float" ] || [ "$1" = "single" ]; then
echo "compiling the FIR engine in single precision..."
g++ --std=c++11 -march=native -O2 -ffast-math -DFFT_DATATYPE=1 ./FIR_convolution_engine.cpp -lfftw3f -lm -o FIR_engine.exe
else
echo "compiling the FIR engine in double precision..."
g++ --std=c++11 -march=native -O2 -ffast-math -DFFT_DATATYPE=2 ./FIR_convolution_engine.cpp -lfftw3 -lm -o FIR_engine.exe
fi
if [ $? = 0 ]; then
echo "The FIR engine was successfully compiled into the executable file FIR_engine.exe"
else
echo "An error was encountered. Please try again."
fi
echo


flavio-PC LADSPA-FIR # ./compile_FIR_engine.sh
You must supply float or double as a command line parameter
to indicate the FFTW precision for the FIR engine.
The level of precision should be supported by FFTW (see
configuring FFTW in the FFTW installation docs.
Please try again.


flavio-PC LADSPA-FIR # ./compile_fir_engine.sh float
-bash: ./compile_fir_engine.sh: File o directory non esistente
 
You need to be more careful with your typing...
The file .//compile_FIR_engine.sh exists.
The file ./compile_fir_engine.sh does not exist!

Linux is case sensitive. Make sure you type the right command. Or did I write it wrong in the directions???

flavio-PC LADSPA-FIR # ./compile_fir_engine.sh float
-bash: ./compile_fir_engine.sh: File o directory non esistente


Edit: CRAP! I did write it incorrectly in the instructions! SORRY THAT WAS MY FAULT. :(

Well at least I can revise them now...
 
Last edited:
OK, here are the revised instructions for that section with changes in RED. Sorry about that. I wrote this section in a hurry...

PLUGIN AND FIR ENGINE INSTALLATION:
NOTE: FFTW must have been installed in single or double precision as described above before performing these steps.
1. If you not done so already, download and uncompress the LADSPA-FIR package
2. In a terminal window, navigate to the directory where the LADSPA-FIR package is located
3. Issue the command "make" to build the plugin object file
4. Issue the command "sudo make install" to install the LADSPA plugin on the system
5. Navigate to the directory where the FIR engine code has been downloaded/saved.
6. Modify the FIR engine compile shell script so it can be run using the command:
chmod +x ./compile_FIR_engine.sh
7. Run the shell script to compile the FIR engine code into an executable file.
If you are building the single precision version of the FIR engine, run the following command:
./compile_FIR_engine.sh float
If you are building the single precision version of the FIR engine, run the following command:
./compile_FIR_engine.sh double
A new file called FIR_engine.exe will be created. You may move this to a new directory if you wish.


I have updated the file with the instructions with the correct filename, etc. and uploaded the new file to my website.

Please keep reporting any bugs like this so I can fix them.
 
Last edited:
flavio-PC LADSPA-FIR # chmod +x ./compile_FIR_engine.sh
flavio-PC LADSPA-FIR # ./compile_FIR_engine.sh float
compiling the FIR engine in single precision...
The FIR engine was successfully compiled into the executable file FIR_engine.exe


Perfect.
And to think that I do everything with copy and paste in order not to be wrong!
I am happy to have had two saviors on your level.
Now that I have compiled my Ferrari, I greet you and thank you.
See you when I learn to drive.
Ciao.
 
..but advice from:
a) remove point 5.
b) and change the 6., which suggests that you have to make changes of some kind to the "compile_FIR_engine.sh" file.

Thanks. Good suggestions. I also made a couple of other minor changes to that part of the instructions. Please let me know if you run into any more problems. I am happy to fix them.