Skip to content
Apexify.jsDocs
Apexify.js version v5.4.5

Advanced / Audio · guide

Audio — advanced workflows

Current Apexify.js 6.0.0 documentation for Audio — advanced workflows.

apexify.jsRuntime: nodeCURRENTSince 6.0.0

Procedural SFX with painter.createAudio — WAV Buffers on the server without sound files. Pair with video muxing or use standalone (games, bots, notifications).

FFmpeg audio on video (extractAudio, mixAudio, normalizeAudio, …) stays in the Video & FFmpeg feature guide — those are createVideo keys, not synthesis.


Reading order

ChapterTopic
01 — createAudioPresets, synth, sequence, compose, mix, save
Video pipelinevideoPipeline().audio() — file + preset / sequence / wav tracks
Video audio (FFmpeg)mixAudio, normalizeAudio, strip/mute/duck on createVideo

When to use which API

GoalAPI
Generate laser/coin/UI bleeps in codepainter.createAudio
Mux music or WAV onto one video filecreateVideo({ mixAudio }) — Video audio (FFmpeg)
Editor stack (trim + SFX + bed)videoPipeline().audio([...]) — Video pipeline
Only demux / normalize / strip existing soundtrackcreateVideo — no createAudio needed

No FFmpeg required for createAudio itself (PCM → WAV). Muxing onto video needs ffmpeg on PATH.


Quick start

SOURCEtypescript
typescript
Studio
const painter = new ApexPainter({ type: 'buffer' }); const coin = painter.createAudio.preset('coin');await painter.createAudio.save(coin, './coin.wav'); const levelComplete = painter.createAudio.sequence({  events: [    { at: 0, preset: 'success' },    { at: 0.2, preset: 'coin', gain: 0.9 },    { at: 0.35, preset: 'powerup' },  ],  tail: 0.15,}); await painter.createVideo({  source: './gameplay.mp4',  mixAudio: {    outputPath: './gameplay-sfx.mp4',    keepOriginalAudio: false,    overlays: [{ source: levelComplete, startTime: 0 }],  },});

Next steps