A SpiderBasic wrapper for WaveSurfer
Go to file
2026-04-25 01:30:41 +00:00
LICENSE Initial commit 2026-04-25 01:13:52 +00:00
README.md Update README.md 2026-04-25 01:30:41 +00:00
WaveSurferSB_Plugins_Example_1.sb Initial commit 2026-04-25 03:20:06 +02:00
WaveSurferSB.sbi Initial commit 2026-04-25 03:20:06 +02:00
WaveSurferTestMusic.ogg Initial commit 2026-04-25 03:20:06 +02:00

WaveSurferSB

A SpiderBasic wrapper for wavesurfer.js v7 — audio waveform visualization and playback.

This is rough and partially untested. It covers the core API (create, load, play, pause, seek, zoom, events…) and three plugins: Timeline, Minimap, and Spectrogram. Other plugins can be loaded via the generic RegisterPlugin() procedure.

Quick Start

IncludeFile "WaveSurferSB.sbi"

Procedure OnLoaded(Success)
  If Success
    Global ws = WaveSurferSB::Create("#waveform", WaveSurferSB::#DragToSeek)
    WaveSurferSB::TimelineCreate(ws)
    WaveSurferSB::Load(ws, "audio.mp3")
  EndIf
EndProcedure

WaveSurferSB::Download(@OnLoaded(), "timeline")

Files

  • WaveSurferSB.sbi — the module
  • WaveSurferSB_Plugins_Example.sb — working example with all three plugins

Notes

  • Handles the AMD/UMD conflict with SpiderBasic's Dojo runtime automatically
  • Loads from unpkg CDN by default; pass UseLocalFiles = #True to load from LocalFiles/JS/
  • Each plugin procedure has a simple form and an _ex form accepting raw JSON options