Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
# Setting up the Environment
## Requirements
Make sure you have the following requirements before starting:
- A [GitHub account](https://github.com/join)
- [`git`](https://git-scm.com/download)
- [Python 3](https://www.python.org/downloads/)
- [Homebrew](https://brew.sh) on macOS X
- [Xcode](https://developer.apple.com/xcode/) on macOS X
- [Faust](https://faust.grame.fr/downloads/)
- [VCV Rack](https://vcvrack.com/Rack)
You then only need minimum knowledge on how the terminal works to get going.
## Setting up Faust
The Faust compiler comes with some additional programs, but also a set of headers, and it should be configured so
that Faust headers are available to the development environment.
In general it is best to install it with your package manager. This will make sure that both
the Faust programs and development environment are correctly installed.
This is typically done like this on macOS:
```
brew install faust
```
or on Linux:
```
sudo apt-get install faust
```
## Cloning
Then, clone the repository. This will create a `eurorack-blocks` directory **into the current working directory**, with all dependencies.
```shell-session
~$ git clone --recurse-submodules git@github.com:ohmtech-rdi/eurorack-blocks.git
~$ cd eurorack-blocks
~/eurorack-blocks$
```
## Setting up
Install by running the script below:
```shell-session
~/eurorack-blocks$ ./build-system/install.py
```
This will add the `erbb` script to your `PATH`, but the `PATH` will be set only for new terminals.
You can either close your current terminal and open a new one, or source the `erbb` environment
explicitly into your current shell session:
```shell-session
~/eurorack-blocks$ source ./build-system/init.sh
```
Then:
```shell-session
~/eurorack-blocks$ erbb setup
```
This will install all the needed dependencies. You would typically re-run this command when
upgrading `eurorack-blocks`.
In particular, this will install Kicad. Don't worry if you already have installed this
application! The setup script won't overwrite your installation.
You can now start to use `eurorack-blocks` with Faust 🎉
## Testing a Sample
Let's test a sample. We'll use the Faust sample.
```shell-session
~/eurorack-blocks$ cd samples/faust
~/eurorack-blocks/samples/faust$ erbb configure
```
If you inspect the `faust` folder, it now contains an `artifacts` directory, with some files.
```{image} setup-configure.png
:width: 100%
:align: center
```
## Building in Xcode
If you are using Xcode, a `project_vcvrack.xcodeproj` has been created,
which is the project to use to develop and test in the VCV Rack simulator.
This will open the project in Xcode:
```shell-session
~/eurorack-blocks/samples/faust$ open artifacts/project_vcvrack.xcodeproj
```
Press {guilabel}`⌘B` to build.
The build process will output the VCV Rack module in the `Rack/plugins-v1` folder.
## Building from the command line
Alternatively, you can build the VCV Rack module using the command line.
```shell-session
~/eurorack-blocks/samples/faust$ erbb build simulator
ACTION Transpile Faust
warning: non mapped checkbox /FLANGER/0x00/Bypass
warning: non mapped hslider /FLANGER/Delay Controls/Delay Offset
ACTION Transpile Ui
...
CXX /Users/raf/Desktop/dev/eurorack-blocks/src/vcvrack/BoardGeneric.cpp
LINK /Users/raf/Desktop/dev/eurorack-blocks/samples/faust/artifacts/build/Release/plugin.dylib
ACTION Copy to VCV Rack plug-ins folder
** BUILD SUCCEEDED **
```
The build process will output the VCV Rack module in the `Rack/plugins-v1` folder.
## Testing in VCV Rack
Now run VCV Rack, and the `FLANGER` module will appear in the library when right-clicking
in the rack empty space.
```{image} setup-rack.png
:width: 100%
:align: center
```
```{important}
Before starting to play with it, make sure to setup your audio device,
and set the sample rate to 48kHz!
This requirement will be explained later in the tutorial.
```
```{image} setup-rack-audio.png
:align: center
```
a6208f052This file is pinned to the selected release. Download the original to open it in your design tool.