Skip to content

Wamphyre/lsp-plugins-macos

Repository files navigation

LSP Plugins (macOS Port)

This repository contains a version of LSP Plugins adapted to compile and function correctly on macOS (x86_64).

Version Platform

Port Status

  • Platform: macOS (Intel x86_64)
  • Compiler: Apple Clang
  • Support: Experimental / Unofficial

Credits

Huge thanks to the LSP Plugins Team for their incredible work and for making the original project open-source.
Repository: https://github.com/lsp-plugins/lsp-plugins

If you use or benefit from their work, don’t forget to support them with a donation.
Their project deserves it and helps keep development alive.

Build Instructions

An automated script has been included to facilitate compilation and packaging.

Prerequisites

Ensure you have Xcode Command Line Tools and necessary dependencies installed (can be installed via Homebrew):

brew install pkg-config gnu-sed

(Note: The project uses gmake, which usually comes installed or may require brew install make).

Automated Build

Run the build.sh script from the project root:

./build.sh

This script will perform the following steps:

  1. Clean environment (clean).
  2. Configure project (config).
  3. Compile (make).
  4. Install to a local release/ directory.

Upon completion, you will find the plugin bundle at: release/lsp-plugins.lv2

Installation

Copy the generated bundle to your LV2 plugins folder:

cp -r release/lsp-plugins.lv2 ~/Library/Audio/Plug-Ins/LV2/

Restart your DAW (REAPER, Ardour, etc.) to detect the new plugins.


Technical Details and Applied Patches

To achieve compilation and correct functionality on macOS, the following modifications have been made to the original code:

1. Disabling AVX2/AVX512 (Assembler Incompatibility)

The original code uses inline assembly syntax for AVX2 optimizations that is compatible with GCC/GAS but incompatible with the LLVM/Clang assembler on macOS (error expected relocatable expression with memory operands).

Modified Files:

  • modules/lsp-dsp-lib/src/Makefile: Commented out the inclusion of AVX2 and AVX512 objects in the CXX_OBJ_EXT variable for x86_64 architecture.
  • modules/lsp-dsp-lib/src/main/x86/x86.cpp: Commented out calls to avx2::dsp_init(f) and avx512::dsp_init(f), as well as their extern declarations, to avoid linking errors.

2. UI Overlay Fix

The original CocoaWindow implementation attached the plugin view directly to the window's contentView (NSWindow), causing the plugin interface to overlap other host interface elements (such as the FX list in REAPER).

Modified Files:

  • modules/lsp-ws-lib/include/private/cocoa/CocoaWindow.h: Added NSView *pParentView member to store the container view provided by the host.
  • modules/lsp-ws-lib/src/main/cocoa/CocoaWindow.mm:
    • Updated constructor to save the reference to pParentView.
    • In init(), modified logic to attach wrapperView as a subview of pParentView instead of [pCocoaWindow contentView].

3. Window Resizing Fix (UI Resizing)

The plugin attempted to resize the host window directly ([window setFrame:...]), which is blocked or ignored by hosts like REAPER, resulting in a window that did not adjust to the plugin size.

Modified Files:

  • modules/lsp-ws-lib/src/main/cocoa/CocoaWindow.mm: Modified set_geometry_impl for plugin mode (bWrapper):
    • Now resizes only the internal plugin view (pCocoaView).
    • Manually emits the UIE_RESIZE event.
    • This allows UIWrapper to capture the event and notify the host via the LV2 ui:resize extension, requesting the resize correctly through the protocol.

4. UI Scaling/Zooming Fix

The plugin interface appeared stretched or zoomed because the view was being forced to the full size of the host window's content area, and the view's internal resizing logic was blocked.

Modified Files:

  • modules/lsp-ws-lib/src/main/cocoa/CocoaWindow.mm:
    • In set_geometry_impl: Switched from setFrame to updateFrame because CocoaCairoView overrides setFrame to ignore size changes.
    • In show(): Removed logic that forced pCocoaView to match [[pCocoaWindow contentView] bounds]. Instead, it now respects the plugin's internal size (sSize), preventing stretching when the host window is larger than the plugin.

About

This repository contains a version of LSP Plugins adapted to compile and function correctly on macOS (x86_64).

Topics

Resources

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING

Stars

Watchers

Forks

Packages

 
 
 

Contributors