node-gyp, per platform
- A prebuilt binary for each OS and CPU architecture you ship
- Can break on an Electron or Node ABI upgrade
- Extra weight in the packaged app for a feature you barely need
- Right choice for real-time DSP or pro audio — not a click
Electron packages Chromium, so anything a browser can do with the Web Audio API, an Electron renderer can do too — synthesize a click, a toggle, or an alert with no audio file, no native module, and nothing to rebuild for Windows, macOS, and Linux separately.
The renderer, always. Web Audio needs a browser-like context — a window, effectively — and in Electron that only exists in a renderer process (including a hidden or offscreen one). The main process is plain Node, with no Web Audio object to call.
If the event that should trigger a sound happens in the main process — a background job finishing, a native menu action — send an IPC message to the renderer and play the sound from there, the same way you would dispatch any other UI update.
The same rule as on the web: create (or resume) the AudioContext on a real user gesture — a click, a keypress — rather than on load. Electron renderers are Chromium under the hood, so they follow the same autoplay policy a browser tab does. Following it also means the exact same code keeps working if the app ever ships a web version alongside the desktop one. See the full node-by-node breakdown of the graph behind a click — it applies here unchanged.
No. The Web Audio API ships with Chromium, which Electron already bundles — there is no native dependency to add, and nothing that needs a matching prebuilt binary for your Electron version.
Yes. Web Audio behaves identically on every platform Electron supports, because it's the same Chromium engine underneath. A native audio module, by contrast, typically needs a separate prebuilt binary per OS and CPU architecture.
Not directly — Web Audio only exists where there is a browser context, which in Electron means a renderer. Send an IPC message from the main process to the renderer and play the sound there.
Yes — design and preview a sound in the studio with no account and no cost. The exported Web Audio JavaScript pastes into a renderer file unchanged; only exporting past the first five sounds needs a sign-in.
Open Blip Blip, shape a cue, and paste the export straight into your renderer.