Trying to get AudioTK working with JUCE

I’m relatively new to both Juce and c++ and wanted to try Audio Toolkit, but am unable to get it working with Juce.

Here’s the instructions provided in gihub:

How to add AudioTK as JUCE modules

Get an official relase version of ATK from github

Copy modules/JUCE/ATK/config.h in the folder ATK and modify to select a FFT implementation

In Projucer
    Add to the extra compiler flag -I/path/to/ATK/folder -I/path/to/Boost/headers
    Add also the path to Eigen if you selected it
    Depending on the choice of FFT backend, add the compiler and linker extra flags
    Add the modules you want to your project

Can someone instruct me on how to get this working?

I don’t understand the syntax for adding extra compiler flags or linker flags, might have some other problems as well, so step by step would be most helpful, but even explaining how to add the flags would be a huge help.

Summoning @Matthieu_Brucher, the author of AudioTK.

Summoning Cthulhu done :smiley:

What is your problem? The selection of the FFT implementation? (you can use the one shipping with JUCE if I remember properly) What’s the problem with the compiler flags?

This is already step by step, so I need more info on what’s the actual problem.

Hello Cthulhu :smiley:

Yep, that’s step by step it’s just that I’m pretty new to both JUCE and c++ and lack some probably obvious knowledge, so I was unable to follow.

Other than getting boost and Eigen to work with JUCE this is a first library I’m installing, so I’ll just list here everything I’m not 100% about. Btw Audio toolkit looks to be an amazing library so thanks for making it available.

  • So when I first add the modules, do I add them by making a new project and choosing static library or do I add them to each project separately?

  • I’m supposed to copy config.h into folder audioTK-master/ modify it to choose FFT implementation and leave the modules where they are right?

  • I don’t yet really understand adding flags at all, but if I am right extra compiler and linker flags are added in projucer under exporters and then in my case Visual Studio. Do I just drag the folders there or do I add -l/ before (e.g. -l/Libraries/AudioTK…) ?

  • I have the newest boost 168.0 installed, but I can’t find folder Boost/headers anywhere. Do I just use the path to …/boost/ or what should I do?

  • If I choose to use JUCE built in FFT-backend, I assume these are again added in Projucer->Exporter->Visual Studio, but again I don’t understand flags yet, so can you provide me with syntax or example?

I’m supposed to copy config.h into folder audioTK-master/ modify it to choose FFT implementation and leave the modules where they are right?

Meant audioTK-master/ATK

  1. I found that the easiest was to use modules, so you just need to add the modules/JUCE folder to the projucer module path. Once it’s done, you can add the module you want to any project
  2. yes, you should copy config.h in the root ATK folder. Modify it, for instance by default it uses FFTW (GPL), but you may want to use IPP instead.
  3. the projucer should set up the Visual Studio solution, so you must add the flags in the projucer.
  4. for Boost, you need to add the root folder of Boost (the one that contains the “boost” folder), I use its standard layout.
  5. you cannot use the JUCE FFT, but as I think it uses IPP, you should have all the headers and libraries you need automatically. If not, you can install IPP (from Intel, free) and add the include folders with -I/… and you need to link against IPP libraries core, s and vm.

Let’s try with he first steps and let me know where you are stuck!

I think this is not right. When I looked at the dsp::fft internals some time ago, I it used the fft from the accellerate framework on Apple platforms and a quite unoptimized juce-internal fallback implementation on all other platforms as default.
JUCE allows you to supply an Intel FFT or fftw optionally that will be used instead of the default implementations, but they don’t come with JUCE, so you cannot expect them to be present in a normal JUCE installation.

Thanks for the precision, I suppose the one choice is then to install IPP!

Ok, got close with the instructions. Thanks.

I linked to IPP with using default linking in Projucer instead of doing it with -l/ .
Also needed to link to GSL.

Tested by trying to add EQ module (+ core and utility) Now, I’m down to 3 errors.

  1. Cannot open include file: ‘ipp.h’ no such file or directory. Maybe I need to add the include folders to IPP manually instead of using default linking in Projucer?

  2. Cannot open include file: 'ATK/EQ/FourthOrderFilter.cpp - Seems to be missing from the folder. I can comment it out of course. Also if I switch to Distortion there’s only 2 errors.

  3. Cannot open file ‘testATK.lib’

That’s wrong, it’s a header only library!

  1. yes, you need to add the IPP header path
  2. you have to have the path to ATK to your include path, otherwise… well, you won’t get ATK!
  3. obviously.

Sorry, was tired. I meant I had to add header search path in Projucer.

  1. Thanks, that fixed it.

  2. I had added that and I can access it. It’s only the FourthOrderFilter.cpp that is missing and I can just comment it out no problem, but I did check the folder and github and everything else has .h .hxx. cpp except for FourthOrderFilter, which is missing the .cpp, so maybe that’s by accident.

  3. This error is no more, but instead I get Linker tools error now saying cannot open file …/AudioTK-master/ATK.obj
    I’ll try to look into this later when I have time, but if you know what the problem is would really appreciate it if you could tell me how to solve it. That’s the last error I have, so hopefully everything should work after.

Got it working now :smiley:

Except for the fourth order filter missing .cpp of course.

Excited to test the library this evening when I have more than a moment.

Thanks for helping with my noobie questions!

Great! Indeed, that may be a bug (for the FourthOrderFilter), feel free to submit a bug for it if there is a file missing.
No problem at all with helping a fellow DSP developer :smiley:

Hello Matthieu and Neon Owl,
I am running into similar issues as Neon_Owl trying to get up and running with Audio Tool Kit in JUCE and was hoping you might be able to point me in the right direction.

I am getting an error C1083 Cannot open the include file GSL/GSL in the BaseFilter.h and FFT.h

I have the Extra Compiler Flags for ATK and Boost working but it seems as though my Header Search Path to the IPP header files isn’t working correctly. I am not sure what I am missing from the step by step instructions but any help would be greatly appreciated. Thanks and hope you have a great day!

I

am struggling with this too, any ideas yet?

Hi all & @Matthieu_Brucher,

i’m trying to implement Audio Toolkit as well but can’t get it working.

What I’ve done so far:

  • downloaded AudioTK and submodules (pybind, eigen, gsl), using git clone command.
  • also downloaded Intel IPP, boost_1_66_0 and extracted both to my working directory.
  • also copied config.h to ATK folder.

In Projucer my Extra Compiler Flags settings are:
-I/D:\DEV_VST_Plugins\AudioTK\ATK
-I/D:\DEV_VST_Plugins\boost_1_66_0
-I/D:\DEV_VST_Plugins\Intel\compilers_and_libraries_2020.2.254\windows\ipp

My External Libraries to Link:
D:\DEV_VST_Plugins\AudioTK\ATK
D:\DEV_VST_Plugins\boost_1_66_0
D:\DEV_VST_Plugins\Intel\compilers_and_libraries_2020.2.254\windows\ipp

i activated atk_core and atk_utility in projucer as well (use global path, without copy to project folder)

When i open up the project in VisualStudio (2019, do i need 2017?) and try to compile i get:

1>D:\DEV_VST_Plugins\Projects\ATKTest\JuceLibraryCode\include_atk_core.cpp(8,10): fatal error C1083: Datei (Include) kann nicht geöffnet werden: “atk_core/atk_core.cpp”: No such file or directory
1>D:\DEV_VST_Plugins\Projects\ATKTest\JuceLibraryCode\include_atk_utility.cpp(8,10): fatal error C1083: Datei (Include) kann nicht geöffnet werden: “atk_utility/atk_utility.cpp”: No such file or directory
1>D:\DEV_VST_Plugins\Projects\ATKTest\JuceLibraryCode\JuceHeader.h(16,10): fatal error C1083: Datei (Include) kann nicht geöffnet werden: “atk_core/atk_core.h”: No such file or directory (Quelldatei wird kompiliert …\Source\PluginProcessor.cpp)
1>D:\DEV_VST_Plugins\Projects\ATKTest\JuceLibraryCode\JuceHeader.h(16,10): fatal error C1083: Datei (Include) kann nicht geöffnet werden: “atk_core/atk_core.h”: No such file or directory (Quelldatei wird kompiliert …\Source\PluginEditor.cpp)
1>Die Erstellung des Projekts “ATKTest_SharedCode.vcxproj” ist abgeschlossen – FEHLER.
2>------ Erstellen gestartet: Projekt: ATKTest_VST3, Konfiguration: Debug x64 ------
2>LINK : fatal error LNK1104: Datei “D:\DEV_VST_Plugins\AudioTK\ATK.obj” kann nicht geöffnet werden.
2>Die Erstellung des Projekts “ATKTest_VST3.vcxproj” ist abgeschlossen – FEHLER.
========== Erstellen: 0 erfolgreich, 2 fehlerhaft, 0 aktuell, 0 übersprungen ==========

Any ideas? Do i also need to somehow set Extra Linker Flags in Projucer? do i need to run cmake audiotk for this?

Best regards,
Johannes

Sorry I didn’t look at the forum in a long time.
First, for gel/gsl, this looks like missing submodules, did you initialize them properly?

Concerning the JUCE modules, it worked with the JUCE 5, but I think format may have changed since then. Still, the missing files come from the JUCE/modules folder, so you can add -I/path/to/main/AudioToolkit/folder/JUCE/module

Thanks for mentioning me, otherwise I don’t see the messages that are posted here.

i think, i’m doing something wrong…
My Settings are:

before that, i git cloned the atk repo, and from inside the cloned folder i did: “git submodule init” and “git submodule update” which downloaded 3rdparty stuff.
Do i need to do “cmake AudioTK” after this?

No, with the custom config.h that you copied, the JUCE modules should be self-sufficient.
Clearly, if you still have the same missing “atk_core/atk_core.h” error, then something is off. Can you make sure that you have this file in the modules/JUCE folder? Can you check in the generated Visual Studio that you have also the proper include directories? It may be that the “-I/” is not correct, I usually do “-ID:…”, maybe VS doesn’t understand?

You shouldn’t put include directories in “Extra Compiler Flags”. There is a “Header Search Paths” setting for that, on the project level, and on each configuration.

“External Libraries to Link” should be library names, not folders that contain libraries. There is “Extra Library Search Paths” on each configuration for folders where the linker should look for libraries.

I hope this helps.