A simple wrapper for controlling sushi over gRPC via c++.
Clone the repository and generate the build directory by using:
$ git submodule update --init --recursive
$ ./third-party/vcpkg/bootstrap-vcpkg.sh
$ mkdir build && cd build
$ cmake -DCMAKE_TOOLCHAIN_FILE=../third-party/vcpkg/scripts/buildsystems/vcpkg.cmake ..Build the library by using:
$ makeFinally install with:
$ make installPrinting errors to std::cout can be enabled by setting the PRINT_ERRORS_TO_CONSOLE option.
First, build and then install elkcpp. The installations includes a CMake package that other projects can use to find the library.
In your CMake project, add these lines:
find_package(gRPC REQUIRED)
find_package(elkcpp CONFIG REQUIRED)
target_link_libraries($YOUR_TARGET elkcpp::elkcpp)If you don't have gRPC available in your system, you can make it available through vcpkg:
- Copy the file
vcpkg.jsonof this project to your project folder (or, if you already have vcpkg, add the grpc dependency listed there) - Add vcpkg as a submodule:
$ git submodule add https://github.com/Microsoft/vcpkg.git third-party/vcpkg- Bootstrap vcpkg in your project directory:
$ ./third-party/vcpkg/bootstrap-vcpkg.sh- Pass the option
-DCMAKE_TOOLCHAIN_FILE=../third-party/vcpkg/scripts/buildsystems/vcpkg.cmakewhen configuring your project
Include the library to your source file using:
#include "sushi_client.h"To create a controller instance use:
std::shared_ptr<sushi_controller::ControlInterface> controller = sushi_controller::CreateSushiController();A more in depth example can be found here.
elkcpp is licensed under the GNU General Public License v3 (“GPLv3”). Commercial licenses are available on request at tech@elk.audio.
Copyright 2017-2022 Modern Ancient Instruments Networked AB, dba Elk, Stockholm, Sweden.