Skip to content

Miscend/JUCE_SHARED

Repository files navigation

alt text

JUCE is an open-source cross-platform C++ application framework for creating high quality desktop and mobile applications, including VST, VST3, AU, AUv3, AAX and LV2 audio plug-ins and plug-in hosts. JUCE can be easily integrated with existing projects via CMake, or can be used as a project generation tool via the Projucer, which supports exporting projects for Xcode (macOS and iOS), Visual Studio, Android Studio, Code::Blocks and Linux Makefiles as well as containing a source code editor.

Getting Started

The JUCE repository contains a master and develop branch. The develop branch contains the latest bugfixes and features and is periodically merged into the master branch in stable tagged releases (the latest release containing pre-built binaries can be also downloaded from the JUCE website).

JUCE projects can be managed with either the Projucer (JUCE's own project-configuration tool) or with CMake.

The Projucer

The repository doesn't contain a pre-built Projucer so you will need to build it for your platform - Xcode, Visual Studio and Linux Makefile projects are located in extras/Projucer/Builds (the minimum system requirements are listed in the System Requirements section below). The Projucer can then be used to create new JUCE projects, view tutorials and run examples. It is also possible to include the JUCE modules source code in an existing project directly, or build them into a static or dynamic library which can be linked into a project.

For further help getting started, please refer to the JUCE documentation and tutorials.

CMake

Version 3.22 or higher is required. To use CMake, you will need to install it, either from your system package manager or from the official download page. For comprehensive documentation on JUCE's CMake API, see the JUCE CMake documentation. For examples which may be useful as starting points for new CMake projects, see the CMake examples directory.

Building Examples

To use CMake to build the examples and extras bundled with JUCE, simply clone JUCE and then run the following commands, replacing "DemoRunner" with the name of the target you wish to build.

cd /path/to/JUCE
cmake . -B cmake-build -DJUCE_BUILD_EXAMPLES=ON -DJUCE_BUILD_EXTRAS=ON
cmake --build cmake-build --target DemoRunner

Local Integration Notes

This repository is a JUCE fork used primarily by DeclarativeStyle/DSTYLE, with particular focus on WASM builds and shared build infrastructure consumed by sibling repos.

This shared tree also carries DeclarativeStyle/AVML build-graph support:

  • juce_add_module_bundle(...) materializes concrete JUCE bundle targets so module sources compile once per real build context.
  • Apple .mm exclusion policy for JUCE bundle sources lives in the shared helper layer.
  • juce::juceaide remains the compatibility/default helper tool target.
  • juce::juceaide_icons and JUCEAIDE_ICONS_PATH are exported for icon-generation workflows that need a dedicated tool surface.
  • Source-mode consumers can set both JUCEAIDE_PATH and JUCEAIDE_ICONS_PATH before add_subdirectory(JUCE...) to reuse prebuilt helper binaries and skip the recursive configure/build bootstrap.

Fork-Specific Plugin Consumer Notes

  • examples/CMake/SiblingPluginConsumer/CMakeLists.txt shows the intended sibling-repo source-mode flow: set optional JUCEAIDE_PATH / JUCEAIDE_ICONS_PATH, call add_subdirectory(JUCE_SHARED ...), then call juce_add_plugin(...).
  • juce_add_plugin(...) keeps COPY_PLUGIN_AFTER_BUILD opt-in. JUCE_COPY_PLUGIN_AFTER_BUILD defaults to OFF, and per-format copy directories still fall back to the upstream platform defaults in extras/Build/CMake/JUCEUtils.cmake.
  • Default copy directories are:
    • macOS: ~/Library/Audio/Plug-Ins/VST, ~/Library/Audio/Plug-Ins/VST3, ~/Library/Audio/Plug-Ins/Components, ~/Library/Audio/Plug-Ins/LV2, ~/Library/Audio/Plug-Ins/Unity
    • Windows: %ProgramW6432%/Steinberg/Vstplugins or %ProgramFiles(x86)%/Steinberg/Vstplugins, %CommonProgramFiles%/VST3, %CommonProgramFiles%/Avid/Audio/Plug-Ins, %APPDATA%/LV2, %APPDATA%/Unity
    • Linux/BSD: ~/.vst, ~/.vst3, ~/.lv2, ~/.unity
  • VST3_AUTO_MANIFEST still defaults to TRUE. Override it only when a consumer's packaging or signing flow needs manual manifest generation.
  • This fork does not change JUCE's bypass contract for plugin consumers. If a plugin exposes getBypassParameter(), handle bypass in the consumer's processBlock() with any required smoothing and latency preservation.

Fork-Specific Runtime Notes

Recent fork-only maintenance changes intended to reduce allocator churn and clip-management overhead in common DSTYLE/UI paths:

  • modules/juce_dsp/frequency/juce_FFT.cpp: fallback real-only FFT now reuses per-thread heap scratch for large FFT sizes instead of allocating a fresh HeapBlock on each call.
  • modules/juce_graphics/native/juce_RenderingHelpers.h: software-renderer transparency layers now skip offscreen buffering for opacity >= 1.0, skip allocation for empty clips, and route exact-size ARGB layer reuse through a small per-thread pool.
  • modules/juce_graphics/native/juce_RenderingHelpers.h: software-renderer glyph drawing now caches the derived axis-aligned transformed Font per saved-state instead of rebuilding it per glyph.
  • modules/juce_gui_basics/components/juce_Component.cpp: StandardCachedComponentImage now consolidates fragmented cached-valid regions and falls back to a full cache repaint once rectangle fragmentation crosses a threshold.
  • modules/juce_audio_utils/gui/juce_AudioThumbnail.cpp: waveform drawing now reuses the cached window's RectangleList<float>, and thumbnail block ingestion/background scanning route temporary storage through dedicated scratch buffers.
  • modules/juce_audio_basics/sources/juce_ResamplingAudioSource.cpp: resampling now pre-grows its internal buffer during prepareToPlay() and when setResamplingRatio() increases demand, reducing reallocations in getNextAudioBlock().
  • modules/juce_dsp/frequency/juce_Convolution.cpp: the convolution background loader now uses thread wait/notify instead of 10 ms polling, and IR resampling avoids cloning the entire impulse buffer before streaming it through MemoryAudioSource.
  • modules/juce_graphics/contexts/juce_GraphicsContext.cpp: glyph-arrangement caching now uses a per-thread cache and a larger capacity, avoiding the previous global cache lock and reducing layout churn in text-dense views.
  • modules/juce_graphics/native/juce_CoreGraphicsContext_mac.mm: tiled CoreGraphics image fills now keep the fast tiled-image path for positive axis-aligned scale transforms by folding scale into the tile rect instead of forcing the manual per-tile draw loop.

Fork Troubleshooting

If one of the fork-only hot-path changes regresses, check the narrow fork delta first before widening the search:

  • modules/juce_dsp/frequency/juce_Convolution.cpp: if background IR loads stall or shutdown hangs, inspect BackgroundMessageQueue::push() / run() wakeups and confirm Thread::notify() still reaches the waiting thread. If resampled IR data looks wrong, temporarily restore the defensive AudioBuffer<float> copy before constructing MemoryAudioSource to rule out buffer-lifetime assumptions.
  • modules/juce_dsp/frequency/juce_FFT.cpp: if large-window FFT workloads start allocating again, inspect the thread-local fallback scratch path rather than the small-FFT alloca path.
  • modules/juce_gui_basics/components/juce_Component.cpp: if cached components suddenly repaint too much, inspect the validArea fragmentation threshold and whether the fallback full invalidation is firing more often than expected.
  • modules/juce_graphics/contexts/juce_GraphicsContext.cpp and modules/juce_graphics/native/juce_RenderingHelpers.h: if text rendering changes or software-renderer output diverges, compare against a build that disables the per-thread glyph caches. If transparency-layer allocations do not drop, inspect the layer-bounds match used by the software-renderer image pool.
  • modules/juce_graphics/native/juce_CoreGraphicsContext_mac.mm: if tiled image fills regress only on macOS under positive scale transforms, bypass the scale-folding fast path and confirm the manual tiling fallback still behaves correctly for that asset/transform pair.
  • modules/juce_audio_basics/sources/juce_ResamplingAudioSource.cpp: if audio-thread reallocations return, log host block sizes and ratio changes to confirm prepareToPlay() and setResamplingRatio() still pre-grow the ring buffer before getNextAudioBlock().
  • modules/juce_audio_utils/gui/juce_AudioThumbnail.cpp: if thumbnail scans still show allocator churn, inspect ensureScratchSpace() and AddBlockScratch::ensureSize() first; the current HeapBlock::malloc() calls still free and reallocate storage on each resize request.

MIDI Ingestion Guidance

MidiMessage still heap-allocates message storage when payloads exceed its inline bytes, so high-frequency long sysex traffic should be handled by preallocating higher-level buffers (MidiBuffer::ensureSize, MidiMessageCollector::ensureStorageAllocated) or by preferring partial-sysex callback paths where the backend supports them.

When these behaviours change, update both this README section and AGENTS.md so fork-specific documentation stays in sync.

Minimum System Requirements

Building JUCE Projects

  • C++ Standard: 17+
  • macOS/iOS: Xcode 10.1 (macOS 10.13.6)
  • Windows: Windows 8.1 and Visual Studio 2017
  • Linux: g++ 7.0 or Clang 6.0 (for a full list of dependencies, see here).
  • Android: Android Studio on Windows, macOS or Linux

Deployment Targets

  • macOS: macOS 10.9
  • Windows: Windows Vista
  • Linux: Mainstream Linux distributions
  • iOS: iOS 9.0
  • Android: Jelly Bean (API 16)

Contributing

Please see our contribution guidelines.

Licensing

The core JUCE modules (juce_audio_basics, juce_audio_devices, juce_core and juce_events) are permissively licensed under the terms of the ISC license. Other modules are covered by a GPL/Commercial license.

There are multiple commercial licensing tiers for JUCE, with different terms for each:

  • JUCE Personal (developers or startup businesses with revenue under 50K USD) - free
  • JUCE Indie (small businesses with revenue under 500K USD) - $40/month or $800 perpetual
  • JUCE Pro (no revenue limit) - $130/month or $2600 perpetual
  • JUCE Educational (no revenue limit) - free for bona fide educational institutes

For full terms see LICENSE.md.

The JUCE framework contains the following dependencies:

The JUCE examples are licensed under the terms of the ISC license.

Dependencies in the examples:

Dependencies in the bundled applications:

Dependencies in the build system:

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages