brickworks/examples
2024-12-04 11:27:03 +01:00
..
common/src change ios deployment target to 14.0 in examples 2024-12-04 10:26:34 +01:00
fx_ap1/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_ap2/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_balance/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_bitcrush/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_cab/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_chorus/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_clip/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_comb/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_comp/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_delay/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_dist/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_drive/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_eq_3band/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_flanger/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_fuzz/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_hp1/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_hs1/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_lp1/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_ls1/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_mm1/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_mm2/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_noise_gate/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_notch/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_one_pole/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_pan/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_phaser/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_reverb/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_ring_mod/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_satur/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_slew_lim/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_svf/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_trem/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_vibrato/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fx_wah/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_ap1/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_ap2/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_balance/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_bitcrush/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_cab/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_chorus/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_clip/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_comb/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_comp/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_delay/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_dist/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_drive/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_eq_3band/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_flanger/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_fuzz/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_hp1/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_hs1/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_lp1/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_ls1/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_mm1/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_mm2/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_noise_gate/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_notch/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_one_pole/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_pan/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_phaser/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_reverb/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_ring_mod/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_satur/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_slew_lim/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_svf/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_trem/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_vibrato/src oops, removed generated files 2024-08-26 17:31:07 +02:00
fxpp_wah/src oops, removed generated files 2024-08-26 17:31:07 +02:00
synth_mono/src oops, removed generated files 2024-08-26 17:31:07 +02:00
synth_poly/src oops, removed generated files 2024-08-26 17:31:07 +02:00
synth_simple/src oops, removed generated files 2024-08-26 17:31:07 +02:00
synthpp_mono/src oops, removed generated files 2024-08-26 17:31:07 +02:00
synthpp_poly/src oops, removed generated files 2024-08-26 17:31:07 +02:00
synthpp_simple/src oops, removed generated files 2024-08-26 17:31:07 +02:00
README.md fix tibia tag link 2024-12-04 11:27:03 +01:00
tibia_clean.sh oops, removed generated files 2024-08-26 17:31:07 +02:00
tibia_gen.sh adjusted to latest tibia updated 2024-08-26 17:30:25 +02:00

Examples

Premise

Each of these examples consists of a common part of code, shared by all examples, which contains all necessary boilerplate code and is not Brickworks-related, and a specific part which actually implements the audio engine. The common code is copied/generated by an external tool called Tibia, which you first need to run as outlined below.

Each subfolder contains an example, except the common folder, which contains a good deal of common code and common Tibia-related metadata. In order to build an example just cd to example/platform and use the following platform-specific instructions. Building for any platform requires a recent enough version of GNU Make installed.

Tibia

Prerequisites

You need Node.js and npm to be installed.

Usage

Get Tibia 0.0.4, place it in the same directory as the Brickworks folder, and rename it as tibia. Then either cd to the Tibia folder and npm install dot, or install the dot npm package globally and make sure that the NODE_PATH environment variable is corretly set to find it.

Now you can cd to the examples folder and run ./tibia_gen.sh to copy/generate files for all examples, or otherwise run ./tibia_gen.sh common to only copy/generate files in examples/common or ./tibia_gen.sh example to do the same for files in examples/example.

If you want to remove all files copied/generated by Tibia, and thus restore the examples directory as it would appear in the official repository, run ./tibia_clean.sh from the examples directory.

VST3

Prerequisites

Windows (via MSYS2/Mingw-w64), macOS, and Linux OSes are supported. Building tested with GCC, probably also works with Clang.

You also need to download or clone the VST3 C API and place it in the same folder as the Brickworks folder, or otherwise edit common/src/vst3-make.json and change cflags to point to the correct directory then finally run Tibia, or invoke make with appropriate CFLAGS straight from the command line.

Build

In order to build just type make. You'll find the resulting VST3 directory in build/bw_example_example.vst3.

Installation

If all went fine, you can install for the current user (i.e., into the user VST3 folder) by invoking make install-user or for all users (i.e., into the system VST3 folder) by make install.

LV2

Prerequisites

Windows (via MSYS2/Mingw-w64), macOS, and Linux OSes are supported. Building tested with GCC, probably also works with Clang.

You also need to download/install LV2, so that either header files are found by the compiler in its default include path, or otherwise you could add an appropriate cflags value to common/src/lv2-make.json and run Tibia, or invoke make with appropriate CFLAGS straight from the command line.

Build

In order to build just type make. You'll find the resulting LV2 bundle in build/bw_example_example.lv2.

Installation

If all went fine, you can install for the current user (i.e., into the user VST3 folder) by invoking make install-user or for all users (i.e., into the system VST3 folder) by make install.

Web

Prerequisites

You need Clang with WebAssembly target support and OpenSSL installed.

Build

In order to build just type make. You'll find the resulting output directory in build/web.

Running

The output files need to be served over HTTPS. A self-signed certificate is generated in the output directory (hence the OpenSSL requirement) to make it possible to run an HTTPS-enabled web server, e.g. http-server -S, directly on/from the output folder.

Daisy Seed

Prerequisites

Building and firmware upload was only tested on Linux. You need arm-none-eabi-gcc (for building) and dfu-util (for firmware upload) installed.

You also need to clone/download libDaisy (beware that since version 7.0.0 you also need to clone submodules, see the release notes), cd to it, and run make. You should either place it in the same folder as the Brickworks folder, or otherwise edit common/src/daisy-seed-make.json and change libdaisyDir to point to the correct directory then finally run Tibia.

Build

In order to build just type make. You'll find the resulting output files in build.

Firmware upload

To upload the firmware:

  1. branch the board to the uploading machine via USB;
  2. put the board in DFU mode by pressing BOOT, then RESET, then letting go of RESET and then of BOOT;
  3. type make program-dfu.

Effect examples report output parameter values and CPU usage statistics via USB serial. You can read the output by, e.g., screen /dev/ttyACM0.

Android

Prerequisites

Android examples are built without the help of Android Studio or Gradle. You'll however need to have a recent enough JDK (we need javac), as well as to download the latest stable:

Then you'll probably also need to adjust paths and values in common/src/android-make.json and run Tibia.

* You can install both the needed parts of the Android SDK and the NDK by downloading the so-called "command line tools" (https://developer.android.com/studio#command-line-tools-only) and using the included sdkmanager program. In such case you need to install the following packages: "platforms;android-latest", "build-tools;latest", "platform-tools", and "ndk;latest".

Build

In order to build just type make. You'll find the resulting .apk file in build.

Installation

If all went fine, you can branch your device and install using make install or otherwise install manually.

Usage and known issues

Effect examples process audio input signals, therefore they will require permission to use the capture device.

Synth examples use input MIDI and support hotplugging.

iOS

Prerequisites

iOS examples are not directly built by the supplied Makefiles. These rather generate the corresponding XCode projects and required files.

For this to work you need to have the latest Xcode and XcodeGen installed, as well as a copy of the latest miniaudio.h.

Finally, you might need to adjust header search path for miniaudio in common/src/ios-make.json, common/src/ios-make-cxx-fx.json, and common/src/io-make-cxx-synth.json, and run Tibia.

Build

Typing make will generate the required Xcode project in build/gen.

You'll need to open it and select a development team (click on the project root in the left side pane, then choose the "Signing & Capabilities" tab, and finally pick a "Team").

At this point you can build and run as with any other iOS app.

Usage

Effect examples process audio input signals, therefore they will require permission to use the capture device.

Synth examples use input MIDI and support hotplugging.

Command line program

Prerequisites

Windows (via MSYS2/Mingw-w64), macOS, and Linux OSes are supported. Building tested with GCC, probably also works with Clang.

Depending on the specific example, you might need to download or clone tinywav and/or midi-parser and place them in the same folder as the Brickworks folder, or otherwise edit common/src/cmd-make.json

Build

In order to build just type make. You'll find the resulting executable file in build.

Usage

Just run the executable without arguments to get usage instructions.