Compile last Audio Toolkit on Bela with Clang

This entry is part 3 of 3 in the series Playing with a Bela

More than a year ago, I started playing with the Bela board. At the time, I had issues compiling Audio ToolKit with clang. The issue was that the gcc shipped with the Debian image the BeagleBoard used was too old and didn’t fully support C++11. The one that ships now is GCC 6, which is even C++14 compliant. Meaning that everything is available to build Audio Toolkit with Python support.

Setting up Bela

Starting from a fresh image, the main things to install are:

  • Boost
  • FFTW
  • Python and Numpy

With the BeagleBoard, it’s easy as one apt-get line:

apt-get install python3-dev python3-numpy python3-scipy python3-nose libfftw3-dev libboost-dev libboost-system1.62-dev libboost-test1.62-dev

And one line to install nosetests:
pip3 install nosetests

After all the dependent packages are downloaded, the git repository can be cloned:

git clone https://github.com/mbrucher/AudioTK.git
git submodule init
git submodule update

Direct build

Let’s create a new folder named AudioTK-build on the same level as AudioTK. We can then run cmake from it:

cmake ../AudioTK

Once this is done, let’s build ATK:

make

It will take some time, but then we can run the tests. First, we want to export the building Python path to be able to test in place before the install step.
export PYTHONPATH=/root/local/src/AudioTK-build/Python/:$PYTHONPATH

And then:

make test

The result should look something like this:

Test project /root/local/src/AudioTK-build
Start 1: Adaptive
1/23 Test #1: Adaptive ......................... Passed 9.54 sec
Start 2: Core
2/23 Test #2: Core ............................. Passed 481.68 sec
Start 3: Delay
3/23 Test #3: Delay ............................ Passed 168.64 sec
Start 4: Distortion
4/23 Test #4: Distortion ....................... Passed 0.50 sec
Start 5: Dynamic
5/23 Test #5: Dynamic .......................... Passed 23.90 sec
Start 6: EQ
6/23 Test #6: EQ ............................... Passed 158.12 sec
Start 7: IO
7/23 Test #7: IO ............................... Passed 0.66 sec
Start 8: Mock
8/23 Test #8: Mock ............................. Passed 2.98 sec
Start 9: Preamplifier
9/23 Test #9: Preamplifier ..................... Passed 1.45 sec
Start 10: PyAdaptive
10/23 Test #10: PyAdaptive ....................... Passed 10.51 sec
Start 11: PyCore
11/23 Test #11: PyCore ........................... Passed 6.26 sec
Start 12: PyDelay
12/23 Test #12: PyDelay .......................... Passed 5.78 sec
Start 13: PyDistortion
13/23 Test #13: PyDistortion ..................... Passed 7.13 sec
Start 14: PyDynamic
14/23 Test #14: PyDynamic ........................ Passed 16.39 sec
Start 15: PyEQ
15/23 Test #15: PyEQ ............................. Passed 9.83 sec
Start 16: PyPreamplifier
16/23 Test #16: PyPreamplifier ................... Passed 13.20 sec
Start 17: PyReverberation
17/23 Test #17: PyReverberation .................. Passed 4.45 sec
Start 18: PySpecial
18/23 Test #18: PySpecial ........................ Passed 4.41 sec
Start 19: PyTools
19/23 Test #19: PyTools .......................... Passed 5.79 sec
Start 20: Reverberation
20/23 Test #20: Reverberation .................... Passed 12.18 sec
Start 21: Special
21/23 Test #21: Special .......................... Passed 1295.59 sec
Start 22: Tools
22/23 Test #22: Tools ............................ Passed 13.43 sec
Start 23: Utility
23/23 Test #23: Utility .......................... Passed 0.13 sec

100% tests passed, 0 tests failed out of 23

Obviously, this is very slow. It’s more or less 50 times slower than the same on my old MacBook Pro!

Conclusion

Clearly I’m not in a place where I can use ATK on the BeagleBoard. While looking at the assembler code, it seems that almost no Neon instructions were generated.

So the next entry in this series will tackle optimizing ATK on ARM!

Buy Me a Coffee!
Other Amount:
Your Email Address:
Series Navigation<< Compile last Audio Toolkit on Bela

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.