Music and audio
A presentation can have 3 audio layers: global music, music for a specific slide, and voice narration per slide.
Global music
Path: Toolbar → Music (note icon).
Opens the gallery of available tracks (PMGclub library + admin uploads). Functions:
- Pick = saves as
project.music_url - Volume slider (0–100, default 25%) — overall music volume in Present mode
- Remove = no music
Global music plays across all slides, seamlessly (loop).
Per-slide music (override)
You may want some slides with different music (or silence). In the slide properties panel (when no object is selected):
| Option | What it does |
|---|---|
| Use global (default) | Continues with project.music_url |
| No music | Slide has slide.music_url = "" → silence |
| Custom track | slide.music_url = "{url}" → specific track for this slide |
When transitioning between slides, music fades smoothly (fade out 1.2 s + fade in 1.2 s) — see FADE_STEPS, FADE_MS in PresentationPlayer.
Slide Music Manager (admin): central management of all slide.music_url across slides at once — useful for large presentations.
Voice narration
Per slide — AI-spoken commentary.
Path: select slide (click outside objects) → properties panel → Script / captions section.
Two approaches:
A) Upload own MP3
- Click Upload narration → pick
.mp3(max ~5 MB) - Upload to R2, saved as
slide.narration_url - Duration is auto-detected and saved to
slide.narration_duration_ms
B) Generate with AI voice (enabled by admin)
- Write text in Script / captions (=
slide.narration_text) - Click Generate voice → dialog with voice + speed choice
- AI generates MP3, saved as
slide.narration_url - Detail in AI features
Volume
The Narration volume slider (0–100, default 80%) in properties — works for the WHOLE presentation (one volume for all narrations).
Auto-script for captions
slide.narration_text also serves as a source for captions in Present mode (CC toggle on) and in MP4 export (Burn captions option).
The buildCaptionSegments function splits text into sentences and distributes evenly across the audio duration (narration_duration_ms) or duration_ms (manual slide duration).
For multi-language captions use the Translate AI feature — creates slide.translations[lang] and you can pick language in Present/Export.
Slide duration
If no narration plays on a slide but you have animations or music (e.g. static slide without voice over), set duration_ms (Slide duration) manually:
- In slide properties → Slide duration: enter seconds (default 6 s)
- Used in MP4 export for duration calculation
- In Present mode = user clicks for next (manual)
Mixing in Present mode
PresentationPlayer mixes 3 audio streams:
- Music — global or per-slide, volume =
musicVolume / 100 - Narration — per-slide, volume =
narrationVolume / 100 - Video objects — automatically muted (due to auto-play), audio only added in export
On slide change:
- Music: fade out → fade in (1.2 s each, if it's a different track or "no music")
- Narration: stop current, play next (no fade)
Tips
- Background music ducks automatically for narration? NO — they play simultaneously. If narration drowns out music, lower musicVolume (e.g. to 15%) and keep narrationVolume at 80%.
- Music without rights — PMGclub provides a royalty-free library. Custom uploads must be licensed (copyright law).
- Voice generation — short sentences (10–15 words) sound better
- Sync with animations — manually via
animation.delayandslide.duration_ms