Skip to content

Instantly share code, notes, and snippets.

@baconpaul

baconpaul/bw.md Secret

Last active February 10, 2026 14:44
Show Gist options
  • Select an option

  • Save baconpaul/0498e47e8566ee19b757f808727c7841 to your computer and use it in GitHub Desktop.

Select an option

Save baconpaul/0498e47e8566ee19b757f808727c7841 to your computer and use it in GitHub Desktop.
Debugging Bitwig Clap on MacOS

Here's how I do it

  1. Start bitwig and modify it so everything is "with engine"

Screen Shot 2022-06-22 at 3 04 52 PM

  1. Pull in your clap in a new session and look at the process table. You will see something like this:
paul ~/dev/music/b-step (cje-jun22) % ps -ef | grep Bitwig
  501 82805     1   0  2:28PM ??         1:13.59 /Users/paul/Desktop/Bitwig Studio 43b7.app/Contents/MacOS/BitwigStudio
  501 84578 82805   0  3:04PM ??         0:04.03 /Users/paul/Desktop/Bitwig Studio 43b7.app/Contents/MacOS/Bitwig Audio Engine ARM64-NEON.app/Contents/MacOS/BitwigAudioEngine-ARM64-NEON 1234 6 not-dpi-aware
  501 84604 76802   0  3:06PM ttys000    0:00.00 grep Bitwig
  1. Make a temporary directory somewhere on your computer. I made ~/dev/bws-debug/engine and copy the Audio Engine to it with a new name
cp "/Users/paul/Desktop/Bitwig Studio 43b7.app/Contents/MacOS/Bitwig Audio Engine ARM64-NEON.app/Contents/MacOS/BitwigAudioEngine-ARM64-NEON" ~/dev/bws-debug/engine/engine-43b7
  1. Strip the code signature from that engine just in case
codesign -f -s - ~/dev/bws-debug/engine/engine-43b7
  1. In your running bitwig terminate the audio engine by right mouse on the transport and choosing terminate process

Screen Shot 2022-06-22 at 3 08 06 PM

  1. Quickly check from the command line if you run the engine with no arguments, it should attach to bitwig and load your plugin
paul ~  % ~/dev/bws-debug/engine/engine-43b7 
Detected instruction set: ARM64
Registering modules...
Initializing CoreMIDI client ...
Connecting to server :1234
Loading audio system...
Analyzing CoreAudio device with ID BuiltInSpeakerDevice ... OK
The list of available CoreAudio devices has changed
Scanning available CoreAudio devices ...
Found input device with identifier BuiltInMicrophoneDevice

This is super hadny because that process now shows you stdout. If it does, ctrl c to kill it. But the real trick is

  1. Set that target as the "run" command for your CLAP in clion (or xcode or whatever)

Screen Shot 2022-06-22 at 3 10 47 PM

If I am set up like this, then I can just press 'debug' in clion and it starts the engine and runs my breakpoints. And the same session loads every time because I don't have to quit bitwig just restart the engine (which ending debug does). And if I press 'run' i see the console output in clion with my stdout.

As of 5 you also need to do

install_name_tool -change @rpath/../Frameworks/libFLAC++.10.dylib  /Applications/Bitwig\ Studio.app/Contents/Frameworks/libFLAC++.10.dylib engine-504
install_name_tool -change @rpath/../Frameworks/libFLAC.12.dylib  /Applications/Bitwig\ Studio.app/Contents/Frameworks/libFLAC.12.dylib engine-504
install_name_tool -change @rpath/../Frameworks/libogg.0.dylib  /Applications/Bitwig\ Studio.app/Contents/Frameworks/libogg.0.dylib engine-504
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment