Useful for plugin development without the need to use hardware module.
After ./tbd-sim command is executed, a local web server is running on port 8080. Simply open a browser and enter [http://localhost:8080]. You will land on exactly the same web UI used by the hardware module. CV, Pot and Trig simulation is possible by adjusting settings on the URL [http://localhost:8080/ctrl]. You can use a .wav file (stereo float32) using the -w option if you want to simulate the audio input instead of using the real-time data of the sound card. You can use the -s option to specify your own sample-rom file (e.g. exported through the module's web ui). The simulator uses 99% the same code as the hardware unit. Only difference is the plugin manager and the web server part. You can start developing your plugins just like you do for the hardware module, same directory and file structures. You can run your plugin prior to flashing it to the hardware on your local host. Once the plugin is stable, you build and flash your project for the real hardware. The simulator greatly speeds up plugin development.
-h [ --help ] this help message
-s [ --srom ] file for sample rom emulation, default ../../sample_rom/sample-rom.tbd
-l [ --list ] list sound cards
-d [ --device ] sound card device id, default 0
-o [ --output ] use output only (if no duplex device available)
-w [ --wav ] read audio in from wav file (arg), must be 2 channel stereo float32 data, will be cycled through indefinitely
Full duplex sound card running at 44100Hz sampling rate and 32-bit float sampling. Adaptations can be made in the code, RTAudio will open the first available device with such capabilities.
You can use a Github action to build binaries for windows + mac. For this make sure GitHub Actions are activated for your fork by going to the corresponding tab at your fork and clicking on the green button. You can customize the actions in the .github/workflows folder to suit your needs.
- Boost Asio, FileSystem, Thread, ProgramOptions
- RTAudio
- Simple-Web-Server (by C. Eidheim)
- CMake Version 3.16 or higher
Installation instructions for the dependencies needed to compile the simulator on a selection of platforms can be seen below.
sudo apt-get install libboost-filesystem-dev libboost-thread-dev libboost-program-options-dev libasound2-dev
sudo pacman -S boost
brew install boost
Install msys2.org and launch the MinGW 64-bit shell from the Start menu, not the default MSYS shell. Update the package manager itself:
pacman -Syu
Then restart the shell and install packages:
pacman -Su git mingw-w64-x86_64-make mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-libtool mingw-w64-x86_64-jq mingw-w64-x86_64-boost
When running cmake use:
cmake -G "MinGW Makefiles" ..
instead of just using "cmake .." as written below.
To make run:
mingw32-make
- Getting the simulator running on Windows has been tested using the MingW GCC environment (32-bit)
- Tests with the MS Visual Studio Compiler resulted in many errors
- Here are the steps which lead to a success
- Required tools / steps:
- JetBrains CLion IDE (could work also with others)
- MingW follow these steps (but use 32-bit, i686)
- Install Boost, follow these steps (update the version number accordingly and use the 32-bit MingW locations)
- Set Boost_DIR environment variable (e.g. Boost_DIR=c:\boost)
- Required tools / steps:
git clone https://github.com/ctag-fh-kiel/ctag-tbd.git
cd ctag-tbd
git submodule update --init --recursive
Compile with a C++17 compliant compiler:
cd simulator (from ctag-tbd folder)
mkdir build
cd build
cmake ..
make
./tbd-sim
- General module configuration not supported
- Demo wav files by