1Csound for Bela
2=========================================
3
4Csound for Bela is provided in two forms:
5
61. BelaCsound.cpp: setup(), render(), an cleanup() functions
7to be used in Bela C++ projects, requiring linking to the Csound library
8
92. belacsound: a standalone executable, built from CMake with
10-DBUILD_BELA=1
11
12Build instructions
13=========================================
14
15To build Csound on the board (as root), just do, from the
16top-level sources
17
18```
19$ cp Bela/Custom.cmake.bela Custom.cmake
20$ mkdir build && cd build
21$ cmake .. -DBUILD_BELA=1 -DUSE_DOUBLE=0 -DCMAKE_BUILD_TYPE=Release
22$ make && make install
23$ sudo ldconfig
24```
25
26Csound is installed by default in /usr/local. Other locations can be
27selected by setting the CMake variable CMAKE_INSTALL_PREFIX.
28
29Cross-compiling instructions
30=========================================
31
32A file crosscompile-setup.sh is provided to either build the pre-requisites
33(xenomai and Bela libs) or at least guide you through what is needed.
34
351. Setup your cross-compiling toolchain for armhf. On Debian stretch
36this means apt-get install arm-linux-gnueabihf-g++ cross-compile-essential-arm
37libsndfile1-dev:armhf libasound-dev:armhf and possibly other things.
38
392. Build and install xenomai for armhf.
40
413. Build libbela and libbelaextra for armhf.
42
434. Build libNE10 for armhf and replace the one in Bela/lib/libNE10.a.
44
455. Build Csound for armhf
46
47```
48$ cmake -DCMAKE_TOOLCHAIN_FILE=../Bela/crosscompile.cmake \
49      -DUSE_DOUBLE=0 -DBUILD_BELA=1 -DCMAKE_BUILD_TYPE=Release ..
50$ make
51$ make install
52```
53
54The belacsound program should appear in your binary install directory. Read access
55to /root/Bela/lib and /root/Bela/include is needed even if these directories are
56empty.
57
58
59
60
61
62
63
64
65
66