deephaven_plugin_tones
deephaven_plugin_tones adds musical audio feedback to
deephaven.ui panels in the
Deephaven Web IDE. It wraps Tone.js behind two Python entry points:
tonesis an object you import and call directly —tones.play("C4"),play_chord,play_chords,play_sequence,play_value. There is no hook to call and nothing to mount; each call sends an event that the browser plays. Sounds are self-terminating.use_table_tones_listener(...)is a render hook that sonifies a ticking table: map a column to pitch (and optionally loudness or voice), or fire chord and melody triggers per row. The server auto-tracks each column's live min/max range and turns each new row into sound.
[!NOTE] Browsers block audio until you interact with the page. Click anywhere in the browser tab (opening or clicking the panel counts) before you will hear sound; until then triggers play silently. Most users simply using the UI will unlock audio without any extra clicks.
Install
Install from PyPI into the Python environment that runs your Deephaven server, then restart the server:
pip install deephaven-plugin-tones
The plugin registers itself automatically. Once the server is back up, tones and
use_table_tones_listener are importable in any deephaven.ui panel.
Use it
from deephaven import ui
from deephaven_plugin_tones import tones
@ui.component
def my_panel():
return ui.flex(
ui.button("C", on_press=lambda _e: tones.play("C4")),
ui.button("Chord", on_press=lambda _e: tones.play_chord(["C4", "E4", "G4"])),
direction="row",
)
my_panel = my_panel() # a top-level variable becomes an openable panel
Call tones from the render thread — while a component renders, or from a handler it triggered.
From a background thread (a table listener, a worker), queue it with ui.use_render_queue. The
browser unlocks audio on the first user interaction with the panel, so the very first button press
may be silent; every press after that plays immediately.
Any sound option can ride along with a single call, or be kept as a named voice:
tones.play("C4", instrument="pluck", reverb_wet=0.5)
bell = tones.configure(instrument="metal", volume=-14)
bell.play("C6")
Sonify a ticking table with the use_table_tones_listener(...) hook:
from deephaven_plugin_tones import use_table_tones_listener
@ui.component
def market_sounds(prices):
use_table_tones_listener(prices, pitch="Price", scale="pentatonic", root="C3", octaves=3)
return ui.table(prices)
There are no preset "earcon" methods; a success or error chime is just a short play_sequence
with a plucky envelope. In a sequence each note lasts its own duration, a list is a chord and
None is a rest — enough to play a real tune. See
SKILL.md for the full API: every sound option, the
trigger methods, table-sonification modes, data-driven effect params, multi-dimensional "duet"
mode, and the gotchas.
Let an AI write the sound design
This repo ships SKILL.md, an agent skill that teaches AI coding assistants (Claude Code, etc.) the full plugin API: every parameter, the trigger methods, table-sonification modes, and the gotchas. Install it into your own project with skills.sh:
npx skills add dsmmcken/deephaven-plugin-tones
With the skill loaded, the best way to prompt is to describe the sound you want rather than the API calls. The plugin has no preset chimes; you build every earcon from notes, envelopes, and timing, and a descriptive prompt lets the model do that composition for you:
- "Play a pleasant confirmation tone when the export finishes, and a low ominous buzz if it fails."
- "Add a soft two-note ping whenever a new row matches the filter."
- "Sonify the
Pricecolumn on a pentatonic scale, calm and ambient, upticks should sound higher." - "Make the buy and sell sides sound like different instruments."
Examples
The examples/ directory has ready-to-run panels:
| Script | Demonstrates |
|---|---|
buttons_demo.py |
Button-driven play / play_chord / earcons |
jingles_jukebox.py |
Tunes built from durations, chords and rests |
table_tones_demo.py |
Value-to-pitch table sonification (pitch=) |
table_blink_tick.py |
Blink-table tick sonification (mode="last" / "all") |
table_multi_tones.py |
Multi-dimensional "duet" (pitch + loudness + voice) |
table_chord_trigger.py / table_chord_progression.py |
Chord triggers + per-row chord(s) from a table cell |
table_chords_from_cell.py |
Whole chord progression stored in a single cell |
table_sequence_trigger.py / table_twinkle.py |
Melodic sequence triggers |
table_melody_from_cell.py |
Per-row melody from a table cell |
table_fx_showcase.py / table_service_health.py |
Data-driven effect params |
Documentation
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deephaven_plugin_tones-0.2.0.tar.gz.
File metadata
- Download URL: deephaven_plugin_tones-0.2.0.tar.gz
- Upload date:
- Size: 190.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
642efa58133053d50cd6ef481cd04c90aa5038599231b92fe89a7f17ff71d98a
|
|
| MD5 |
7946f23f9f3c9332543c49a0cc038a00
|
|
| BLAKE2b-256 |
3a346f516f9739b308fd9ffb6a97302029f480be8814c3f58670de0776491c33
|
Provenance
The following attestation bundles were made for deephaven_plugin_tones-0.2.0.tar.gz:
Publisher:
publish.yml on dsmmcken/deephaven-plugin-tones
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deephaven_plugin_tones-0.2.0.tar.gz -
Subject digest:
642efa58133053d50cd6ef481cd04c90aa5038599231b92fe89a7f17ff71d98a - Sigstore transparency entry: 2452933469
- Sigstore integration time:
-
Permalink:
dsmmcken/deephaven-plugin-tones@2be1b78b8a51f3bbf1fcbc1bc4af30e5c7b72a8b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/dsmmcken
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2be1b78b8a51f3bbf1fcbc1bc4af30e5c7b72a8b -
Trigger Event:
release
-
Statement type:
File details
Details for the file deephaven_plugin_tones-0.2.0-py3-none-any.whl.
File metadata
- Download URL: deephaven_plugin_tones-0.2.0-py3-none-any.whl
- Upload date:
- Size: 182.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3a59dd56821d810cbd39c557186d177c5a4aca0233d351664d3fbbc02b05a92
|
|
| MD5 |
a811e1fdace5fbac1bd45f6541495cf8
|
|
| BLAKE2b-256 |
f035f92555bfa9552316f797937ccb7692ef2d49161f9f991b5bf0062cda1ea3
|
Provenance
The following attestation bundles were made for deephaven_plugin_tones-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on dsmmcken/deephaven-plugin-tones
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deephaven_plugin_tones-0.2.0-py3-none-any.whl -
Subject digest:
d3a59dd56821d810cbd39c557186d177c5a4aca0233d351664d3fbbc02b05a92 - Sigstore transparency entry: 2452933635
- Sigstore integration time:
-
Permalink:
dsmmcken/deephaven-plugin-tones@2be1b78b8a51f3bbf1fcbc1bc4af30e5c7b72a8b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/dsmmcken
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2be1b78b8a51f3bbf1fcbc1bc4af30e5c7b72a8b -
Trigger Event:
release
-
Statement type: