From d7833f66606c6fe417e85e8758fddd1d1fae6516 Mon Sep 17 00:00:00 2001 From: LastLife Date: Sat, 25 Apr 2026 01:17:52 +0000 Subject: [PATCH] Update README.md --- README.md | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 432500c..e6bb371 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,32 @@ -# WaveSurfer_for_SB +# WaveSurferSB -A SpiderBasic wrapper for WaveSurfer \ No newline at end of file +A SpiderBasic wrapper for [wavesurfer.js v7](https://wavesurfer.xyz) — 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 + +```spiderbasic +IncludeFile "WaveSurferSB/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 \ No newline at end of file