Skip to content

Ffgl bridge template 14315744905813068303#2

Open
12Matt3r wants to merge 5 commits intoNoizefield:mainfrom
12Matt3r:ffgl-bridge-template-14315744905813068303
Open

Ffgl bridge template 14315744905813068303#2
12Matt3r wants to merge 5 commits intoNoizefield:mainfrom
12Matt3r:ffgl-bridge-template-14315744905813068303

Conversation

@12Matt3r
Copy link

No description provided.

google-labs-jules bot and others added 3 commits February 10, 2026 07:05
Added a manual FFGL 2.0 bridge template for JUCE 8, bypassing juce_add_plugin.
Includes CMakeLists.txt, JuceWrapper.h, and PluginMain.cpp.
Handles JUCE initialization and parameter mapping via APVTS.

Co-authored-by: 12Matt3r <140649857+12Matt3r@users.noreply.github.com>
Added a comprehensive C++ template for building native Max/MSP Externals using JUCE 8 and the Min-DevKit (min-api).
- Implements `MaxWrapper.cpp` bridging Min-API audio processing to JUCE `AudioProcessor`.
- Implements `JuceBridge.h` for managing JUCE UI lifecycle within Max (floating window fallback with embedding hooks).
- Uses `SharedJuceInitializer` to ensure thread-safe MessageManager persistence across multiple instances.
- Optimized buffer handling in `operator()` to avoid real-time allocations.

Also improved the previous FFGL Bridge template:
- Fixed `JUCE_DLL_BUILD` definition to avoid static linking issues.
- Added basic `glClear` rendering to `ProcessOpenGL` to demonstrate functionality.
- Implemented parameter caching in `PluginMain.cpp` for efficiency.
- Applied `SharedJuceInitializer` pattern to FFGL bridge as well.

Co-authored-by: 12Matt3r <140649857+12Matt3r@users.noreply.github.com>
Introduces two new templates for integrating JUCE 8 with external host SDKs:

1. FFGL 2.0 Bridge (`templates/FFGL_Bridge`):
   - Bypasses `juce_add_plugin` to build a native FFGL shared library.
   - Links FFGL SDK directly and implements `plugMain` logic.
   - Uses `SharedJuceInitializer` for thread-safe MessageManager persistence.
   - Maps FFGL parameters to `juce::AudioProcessorValueTreeState` with atomic caching.

2. Max External Bridge (`templates/Max_External`):
   - Uses Min-DevKit (min-api) to wrap JUCE DSP and UI.
   - Implements `JuceBridge` for UI lifecycle management (floating window fallback with embedding hooks).
   - Optimized audio buffer handling to avoid realtime allocations.

Includes comprehensive documentation (`README.md` for each) and an `IMPROVEMENTS.md` guide.

Co-authored-by: 12Matt3r <140649857+12Matt3r@users.noreply.github.com>
@12Matt3r
Copy link
Author

Do it

12Matt3r

This comment was marked as outdated.

12Matt3r

This comment was marked as off-topic.

google-labs-jules bot and others added 2 commits February 10, 2026 08:03
FFGL Bridge Improvements:
- Implemented `ParameterCache` for strictly type-safe, lock-free atomic parameter access.
- Added `TextureUploader` framework for asynchronous PBO texture uploads.
- Mapped FFGL host time and transport info to `ProcessOpenGLStruct`.
- Added cross-platform OpenGL context detection.
- Fixed linker errors by adding `juce_audio_basics` and `juce_audio_processors`.

Max External Bridge Improvements:
- Templatized `JuceDSP` to support direct `double` precision processing, avoiding float conversion overhead.
- Implemented `MaxWindowHandle` helper for robust native window extraction (embedding).
- Added `gain` attribute example binding APVTS parameters to Max attributes.
- Implemented multi-channel support with dynamic configuration.
- Fixed `SharedJuceInitializer` lifecycle to prevent double initialization crashes.

General Improvements:
- Added GitHub Actions CI workflow (`build_bridges.yml`) for cross-platform builds.
- Added CMake presets for AddressSanitizer (ASan) and ThreadSanitizer (TSan).
- Comprehensive documentation updates.

Co-authored-by: 12Matt3r <140649857+12Matt3r@users.noreply.github.com>
Added `scripts/setup_bridges.bat` and `scripts/setup_bridges.ps1` to automate the configuration of FFGL and Max External templates on Windows.
The scripts check for prerequisites (CMake, Git), clone JUCE 8 if missing, and generate Visual Studio solutions.
Updated README.md to include instructions for using the setup scripts.

Co-authored-by: 12Matt3r <140649857+12Matt3r@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant