diff --git a/README.md b/README.md index 957ac712..5db5060a 100644 --- a/README.md +++ b/README.md @@ -1 +1,40 @@ # sfizz + +## Building + +Sfizz depends on the `sndfile` library. +The Jack client that you will probably build depends on the `jack` library. +To build `sfizz` you need to install both as shared libraries on the system. +In Debian-based distributions, this translates into +``` +sudo apt install libjack-jackd2-dev libsndfile1-dev +``` + +The process is as follows: +1. Clone the repository with all the submodules +2. Create a build directory for CMake and `cd` into it +3. Prep the Makefiles with the `SFIZZ_CLIENTS` option +4. Build +5. Enjoy :) + +In the shell world, this means +```sh +git clone --recursive https://github.com/paulfd/sfizz.git +cd sfizz +mkdir build && cd build +cmake -D CMAKE_BUILD_TYPE=Release -D SFIZZ_CLIENTS=ON .. +make +``` +You can then find the Jack client in `clients/sfizz_jack`. +Just specify an `.sfz` file as a parameter and you are good to go. +The client will forcefully connect to the system output, and open an event input in Jack for you to connect a midi capable software or hardware (e.g. `jack-keyboard`). +If no Jack server is already started it will start one with basic options. + +### Possible pitfalls and alternatives + +If you already cloned the repository without the `--recursive` option, update the submodules manually with +``` +git submodule update --init --recursive +``` + +You can build with `clang`, although in that case the CMakeFile defaults to using `libc++` instead of `libstdc++`. \ No newline at end of file diff --git a/scripts/asan_clang.sh b/scripts/asan_clang.sh index 84acfcf9..65cea03f 100755 --- a/scripts/asan_clang.sh +++ b/scripts/asan_clang.sh @@ -1,3 +1,3 @@ #!/bin/sh script_dir="$(dirname "$0")" -cmake -D CMAKE_C_COMPILER=clang-9 -D CMAKE_CXX_COMPILER=clang++-9 -D CMAKE_CXX_FLAGS="-fsanitize=address" -D CMAKE_BUILD_TYPE=Release -D SFIZZ_TESTS=ON -D SFIZZ_BENCHMARKS=ON -D SFIZZ_CLIENTS=ON -S "$script_dir/.." -B . \ No newline at end of file +cmake -D CMAKE_C_COMPILER=clang-10 -D CMAKE_CXX_COMPILER=clang++-10 -D CMAKE_CXX_FLAGS="-fsanitize=address" -D CMAKE_BUILD_TYPE=Release -D SFIZZ_TESTS=ON -D SFIZZ_BENCHMARKS=ON -D SFIZZ_CLIENTS=ON -S "$script_dir/.." -B . \ No newline at end of file diff --git a/scripts/debug_clang.sh b/scripts/debug_clang.sh index 6b72ed93..e4623c56 100755 --- a/scripts/debug_clang.sh +++ b/scripts/debug_clang.sh @@ -1,3 +1,3 @@ #!/bin/sh script_dir="$(dirname "$0")" -cmake -D CMAKE_C_COMPILER=clang-9 -D CMAKE_CXX_COMPILER=clang++-9 -D CMAKE_BUILD_TYPE=Debug -D SFIZZ_TESTS=ON -D SFIZZ_BENCHMARKS=ON -D SFIZZ_CLIENTS=ON -S "$script_dir/.." -B . \ No newline at end of file +cmake -D CMAKE_C_COMPILER=clang-10 -D CMAKE_CXX_COMPILER=clang++-10 -D CMAKE_BUILD_TYPE=Debug -D SFIZZ_TESTS=ON -D SFIZZ_BENCHMARKS=ON -D SFIZZ_CLIENTS=ON -S "$script_dir/.." -B . \ No newline at end of file diff --git a/scripts/release_clang.sh b/scripts/release_clang.sh index 7759e67c..b5c7f1d8 100755 --- a/scripts/release_clang.sh +++ b/scripts/release_clang.sh @@ -1,3 +1,3 @@ #!/bin/sh script_dir="$(dirname "$0")" -cmake -D CMAKE_C_COMPILER=clang-9 -D CMAKE_CXX_COMPILER=clang++-9 -D CMAKE_BUILD_TYPE=Release -D SFIZZ_TESTS=ON -D SFIZZ_BENCHMARKS=ON -D SFIZZ_CLIENTS=ON -S "$script_dir/.." -B . \ No newline at end of file +cmake -D CMAKE_C_COMPILER=clang-10 -D CMAKE_CXX_COMPILER=clang++-10 -D CMAKE_BUILD_TYPE=Release -D SFIZZ_TESTS=ON -D SFIZZ_BENCHMARKS=ON -D SFIZZ_CLIENTS=ON -S "$script_dir/.." -B . \ No newline at end of file