Fun Jingles & Sound Design (fun-jingles.js)
Since 2026-08-11 the station can generate singing karaoke jingles and a
24-design sound-effects library from pure synthesis. fun-jingles.js is
self-contained (requires only paths.js + imaging-engine).
1. Karaoke jingles (generateKaraokeJingle)
An Arabic "karaoke song" built from a TTS station phrase (ar-EG-SalmaNeural,
rate +12%):
spoken hook → pitch-layered sung harmony stack (semis 0 / +3 / +5 / −2,
staggered by beat via pitchShift)
+ synthesized groove (makeBeatLoop: kick/hat/bass from aevalsrc)
+ riser intro + sub impact
→ amix → compressor → limiter → two-pass R128
- Outputs
media/jingles/JKL_<ts>_<bpm>.mp3(~7.3–7.4 s, Break-tagged). countnow loops withbpm + 6/iso each run produces distinct files (e.g. 112 / 118 / 124 BPM).
2. Sound design FX (generateSoundDesign)
A 24-design library (SOUND_DESIGNS) into media/sfx/SFX_<NAME>_<n>.mp3:
DEEP_BOOM, TOM, VINYL_SCRATCH, PHONE_RING, STATIC_BURST, AIR_HORN, RISER_LONG,
BRIDGE, DOWNFALL, ALERT, SOFT_BEEP, GLITCH_STUTTER, HEARTBEAT, IMPACT_BIG,
SIGNAL, BEAT_DROP, REVERSE_BOOM + more. On regenerate the old SFX_ files are
archived to sounddesign_old_<ts>.
Critical ffmpeg gotchas (hard-learned)
<breaksaevalsrc— this ffmpeg build rejects<insideaevalsrcexpressions (silentInvalid argument, no useful log → designs just vanished). Uselt(a,b)everywhere.- Ternary
?:also rejected — useif(...)instead.- Real bugs hit:
makeBeatLoopkick/hat used<(beat synth failed) and VINYL_SCRATCH used both<and?:.
- Real bugs hit:
amixinput count must match labeled inputs — the karaoke amix was declaredinputs=5+layersbut only4+layersstreams were labeled (riser/impact/beat/hook = 4) →Cannot find a matching stream for unlabeled input pad amix. Now uses the actual stream count.
CLI
node scripts/run-fun-jingles.js [--text "لوك لوك إف إم"] [--bpm 112] [--jingles N] [--fx N] [--no-archive]
Runs standalone (mirrors run-imaging.js); the karaoke jingles land in the
jingles deck and sound designs in the sfx deck, both immediately schedulable.
Deployed live 2026-08-11: 3 karaoke jingles (112/118/124 BPM) + 24/24 sound designs → jingles deck 8, sfx deck 36.
See also
- Imaging engine — sweepers + stingers module.
- Smart scheduler — imaging decks & cooldowns.