Audio Player (Radio)
App: apps/audio_player/
A radio-style player: tune with Left/Right arrow keys. When you’re on a station’s frequency, that channel plays; as you tune away, static increases. Stations are defined in channels.toml.
Run from root
Section titled “Run from root”% ./plume3d audio_playeror
Run from app directory
Section titled “Run from app directory”% ./../plume3d .Controls
Section titled “Controls”- Left / Right — Tune the FM frequency (88–108 MHz). On a station’s frequency that channel plays; off-frequency you hear static.
-
Channels — Edit
channels.toml. Each entry has:name— Display namepath— Path under the app (e.g.sounds/mytrack.wav)frequency— “Perfect” FM value (88.0–108.0) for tuning
-
Music — Put WAV (or supported) files in
sounds/and setpathinchannels.toml. -
Static — Generate
sounds/static.wavwith:Terminal window python3 sounds/gen_static.pyWithout it, the app runs but there’s no static effect.
- Config —
Config.load("channels.toml")returns the TOML as a Map; the app readsconfig["channels"](list ofname,path,frequency). - Audio —
newSource,play,stop,isPlaying. - Source —
setVolume,setLooping. - Window, Gui, Input, Math.
Data-driven stations
Section titled “Data-driven stations”Stations are fully data-driven: add or remove entries in channels.toml; no code changes needed.