Prerequisites
Before building Csound on macOS, ensure you have:- Xcode Command Line Tools or full Xcode
- CMake
- Newer versions of Bison and Flex (macOS includes older versions)
Method 1: Using Homebrew
This is the recommended approach for most users.Method 2: With dependencies installed manually
If you have libsndfile and other dependencies installed manually:Method 3: Vanilla build (no Homebrew)
Build Csound with no dependencies installed and no Homebrew:
Csound will be fully functional, with CoreAudio and CoreMIDI support, and libsndfile (statically linked) and all its command-line programs.
Method 4: Universal binary for distribution
To build a universal binary (arm64 + x86_64) for distribution:Build dependencies as universal binaries
Build libsndfile, portmidi, portaudio, libsamplerate, and liblo with both architectures:
Customizing the build
You can customize the build by:- Modifying the
platform/osx/custom-osx.cmakefile - Using CMake options (see Build requirements)
- Setting
CMAKE_INSTALL_PREFIXto install in a custom location
Troubleshooting
Bison or Flex version too old
macOS includes older versions of Bison and Flex. Install newer versions via Homebrew:Framework not found at runtime
If the CsoundLib64 framework is not found, ensure it’s installed in one of these locations:$HOME/Library/Frameworks/Library/Frameworks/Applications/Csound/