ftz.Lyberta.net

Modern C++ goodness

ftz Music

High level abstractions for music software

Key features

  • Cross platform - written in pure ISO C++17 (+ #pragma once).
  • Free software - released under the terms of GNU GPLv3 or any later version.

Dependencies

Compiler support

  • G++ 8 or newer with libstdc++

How to get

You need to use Conan to install and use this library. To install Conan on APT-based distros you would typically do:

# apt install python-pip
$ pip install conan

Then add official ftz repository:

$ conan remote add ftz https://conan.ftz.lyberta.net

Then you need to follow a Conan tutorial to declare that your project depends on this library, for example, using conanfile.txt:

[requires]
ftzMusic/Latest@Lyberta/Latest

Or using conanfile.py:

build_requires = "ftzMusic/Latest@Lyberta/Latest"

The rest depends on your build system. In CMake you would do:

# Importing Conan settings.
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(TARGETS)

# Adding example executable target.
add_executable(Example ...)

# Specifying libraries to link executable to.
target_link_libraries(Example PRIVATE CONAN_PKG::ftzMusic)

After that in your source code you include files like this:

#include <ftz/Music/SomeHeader.h>

To build your code, remember to execute conan install before calling conan build or cmake so your dependencies will be set correctly.

Source code

API reference

Manually building the library

Build dependencies:

  • Git
  • G++ 8 or newer
  • CMake 3.8 or newer
  • Conan 1.2 or newer

To install dependencies on Debian Testing you would invoke:

# apt install git g++-8 cmake python-pip
$ pip install conan

If you didn’t have Conan installed before, you probably need to configure the default profile:

$ conan profile new --detect default
$ conan profile update settings.compiler.version=8 default
$ conan profile update settings.compiler.libcxx=libstdc++11 default
$ conan profile update settings.cppstd=17 default

Add official ftz repository to Conan:

$ conan remote add ftz https://conan.ftz.lyberta.net

Clone the repository and switch into it:

$ git clone https://gitlab.com/ftz/music.git
$ cd music

Build the Conan package with your specified user and channel:

$ conan create . User/Channel