The Infinite Crate is an open source experimental DAW plugin built on the new Lyria RealTime live music model in the Gemini API. The plugin allows users to mix together text prompts to steer a live music model in real-time, feeding audio directly into your DAW for sampling, live performance, or just giving you a practice partner to jam with.
The plugin is built with Typescript/React for the UI (with hot reload for rapid iteration) and C++/JUCE for audio processing and Lyria streaming. You can download prebuilt VST3 (Windows/Mac), AU (Mac), and Standalone (Mac) versions on the Magenta website.
Table of Contents
Initial Setup
MacOS
- Install IDE and dependencies:
- Xcode + command line tools
- Download "JUCE and Projucer": https://juce.com/download/
- Use brew to install "npm" and "openssl@3"
- Clone this repo
- Run "cd react_ui && npm run init"
- Open the-infinite-crate.jucer file in Projucer:
- If prompted: follow Projucer's instructions to specify the location of the JUCE folder and modules folder
- In Projucer Exporters->Xcode->Debug/Release->Header Search Paths and Extra Library Search paths: make sure this includes the location of your homebrew installation (typically /opt/homebrew or $(HOME)/homebrew)
- Export the Xcode project in Projucer
Windows
- Install IDE and dependencies:
- Visual Studio 2022
- Download "JUCE and Projucer": https://juce.com/download/
- Install "OpenSSL" from Shining Light Productions or other source
- Clone this repo
- Run "cd react_ui && npm run init"
- Git bash is recommended over powershell
- Open the .jucer file in Projucer:
- If prompted: follow Projucer's instructions to specify the location of the JUCE folder and modules folder
- In Projucer Exporters->Visual Studio 2022->Debug/Release->Header Search Paths and Extra Library Search paths: make sure this includes the location of your OpenSSL installation
- Generate the Visual Studio project
- Open the generated Visual Studio project:
- Right click on VST3, select "Set as Startup Project"
- Add Microsoft.WebView2 NuGet package (eg. version 2.1.0.3405.78) to the solutions via the NuGet Package Manager
- In Projucer:
- Update Header Search Paths and Extra Library Search Paths to reference the exact WebView2 version (eg. 2.1.0.3405.78) and location
- Export the project again
Building and Debugging
The project can be built in "development" mode or "production" mode. Development mode runs the UI on a Vite local server (npm run dev) and allows for hot reload of UI changes in the react_ui folder. Production mode compiles the UI into static files bundled into the plugin itself (npm run compile).
Building as a Standalone app
- Run
npm run devfrom the react_ui folder - Run the "Standalone" scheme in Xcode or Visual Studio
- The standalone app will be located inside
Builds/MacOS/build/Debug/**
Building as a VST3
- Run
npm run devfrom the react_ui folder - Run the "VST3" scheme in Xcode or Visual Studio
- The VST3 will be located inside
Builds/MacOS/build/Debug/**orBuilds/VisualStudio2022/x64/Debug/**
Building for production
- Run
npm run compilefrom the react_ui folder - Open the file plugin->utils->constants.cpp:
- Set "DEV" to false
Installing the plugin
Set the VST3 Plug-In Custom Location in Ableton settings to the location of the compiled VST3 in Builds or move the VST3/AU into your system VST3/AU folder
On Mac this is typically /Library/Audio/Plug-Ins/VST3 for VST3 and /Library/Audio/Plug-Ins/Components for AU. On Windows, this is typically C:\Program Files\Common Files\VST3 for VST3.
Debugging
MacOS
We recommend debugging in Ableton or Reaper.
Debugging on MacOS in Ableton requires downloading the add_debug_entitlement.sh script and running it on the Ableton Live app (sudo ./add_debug_entitlement.sh "/Applications/Ableton Live 12 Suite.app).
- Edit the VST3 Xcode scheme.

- Navigate to Run->Info->Executable and choose your DAW as the target from your Applications folder.

Windows
Debugging on Windows can be done by right clicking on "The Infinite Crate_VST3" solution and changing the debugging properties.
Notes
- To fix resolution issues in Ableton in Windows, click on the
...icon on the plugin and deselect "Auto-Scale Plugin Window". - The project currently does not support standalone mode on windows due to the way resources are bundled in the VST3. It should be possible by bundling the resources in the .exe or placing then next to the .exe.
- We do not provide instructions for building for multiple architectures (eg. MacOS Universal). Doing so requires creating a fat binary for OpenSSL (libSSL.a, libCrypto.a) and codesigning these properly.
- Building the plugin for other users on MacOS requires enabling hardened runtime in projucer and codesigning.
- To remove the notification bar in standalone mode, comment out this line in juce_StandaloneFilterWindow:
enum { height = 0 };
Codebase Architecture
The codebase leverages C++/JUCE for audio processing and websockets connection to the Gemini API. The UI is built in Typescript using React, and Shadcn UI for components, Zustand for state management. The React app is served using Vite with hot-reload in development mode and compiled with Vite for production. The core codebase components are described below.
plugin
- audio
AudioEngine- core audio processing engine and buffer managementCircularBuffer- circular buffer class for audio processingTransport- transport class for DAW transport comms (currently unused)
- data
- types
GeminiTypes- types for Gemini/Lyria APIStateTypes- types for plugin state (mirrored with Zustand)Types- types for C++/JUCE params
State- Plugin state updating, syncing (to React/Zustand), saving, and loading
- types
- networking
Gemini- Gemini API clientWebBridge- bridge code between C++ and React UI for bidirectional comms and state syncingWebSocket- websocket connection management
- ui
Container- JUCE plugin editor container that creates and wraps the webview for the React UI
- utils
Aliases- type aliases for common types (to reduce verbosity of std:: and juce:: namespaces)Constants- constants valuesFunctions- utility functionsOptionals- macro for json to struct conversion supporting optionals
Processor- JUCE AudioProcessor that creates and routes calls to AudioEngine, State, and WebBridge
react_ui
config- typescript and vite config files- src
- components
- lyria
controls- React components for Lyria controlsprompts- React components for prompts
- ui
atoms- custom UI componentsshadcn- Shadcn UI components
- lyria
- data
params- definition of parameters used by the React UI and mapped to C++ & Juce params (int, float, choice, bool). params with daw=true are exposed to the DAW for automationslices- Zustand slices (state management and update methods)- state
bridge- bridge code between React UI and C++ leveraging Zustand state storage middleware and JUCE webview native functions for bidirectional comms and state syncingstate- Zustand state creator and accessor methods
- `types
factory- factory functions for parameter definitionslyria- lyria types (mirrored with C++ structs)types- typescript types
- layout
geometry- React components for div, grid, flexbox, and window resizingviews- React components for views
- lib
juce- JavaScript bindings for JUCE C++ bidirectional commstheme- light/dark color theme and fontsutils- constants and utility/helper functions
- components
resources
dom- location of compiled DOM files (html/css/js) for production builds (ie. "npm run compile")fonts- font filesimg- image filesjson- generated schema files used by C++ code to define JUCE parameters / AudioProcessorValueTreeState
scripts
codesign- Script to assist codesigning MacOS plugingenerate- Script to generateschema.jsonandstates.jsonfrom TypeScript types and parametersinitialize- Script to initialize the project and copy juce/shadcn files into the react_ui folder
third_party
asio- C++ library for async networkingjson- nlohmann/json C++ library for JSON to C++ struct conversionjuce- JavaScript bindings for JUCE C++ bidirectional commsshadcn- React UI components based on Radix UIwebsocketpp- C++ library for websockets
State, Params, Types, and Structs
Updating plugin parameters
- Update or create parameters in
react_ui/src/data/params/*.ts - Set
daw: trueto expose parameters to the DAW for DAW control, midi mapping, and automation - Run
npm run generateto regenerateschema.jsonandstates.json - Regenerate the Xcode or Visual Studio project in Projucer
The projucer file converts the schema.json to a binary resource and includes it in the plugin project. The plugin will automatically load and process the binary resource on plugin creation and generate a JUCE AudioProcessorValueTreeState from the schema (in plugin/data/State.cc | State::getDawParameters()).
Updating state types and structs across Typescript and C++
- Update Typescript types in
react_ui/src/data/types/*.ts - Update Zustand slices in
react_ui/src/data/slices/*.ts - Update C++ structs in
plugin/data/types/StateTypes.h
The State, WebBridge, and Bridge files will automatically sync state between the React UI and C++ and convert json to structs and back when state is updated using nlohmann/json. Typescript types, Zustand slices, and C++ structs should be kept in sync.
App and plugin data
App Data (eg. API key) is saved system wide, while plugin data (prompt and parameter values) is saved along with the project per plugin instance.
To delete App Data, delete the following files:
Mac:
rm ~/Library/Application\ Support/Magenta/The\ Infinite\ Crate/The\ Infinite\ Crate.settings
Windows:
rm C:\Users\<username>\AppData\Roaming\Magenta\The Infinite Crate\
License and Disclaimers
The Infinite Crate is licensed under Apache 2.0.
The project depends on third party libraries: asio, nlohmann/json, JUCE, shadcn, and websocketpp. Please refer to the third_party directory for information about these libraries.
To compile this project, you will need a valid JUCE license (free for starter, paid for commercial use).
This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.

