Tokens
Track, visualize, and compete on AI coding assistant token usage across Claude Code, Cursor, OpenCode, Codex, Gemini, Kimi, and Qwen. The Kardashev Scale for AI Devs.
翻譯準備中
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Dynamic spectrogram visualizations
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗dynaSpec creates dynamic spectrograms: spectrograms that move along with the sound, ready for presentations, teaching or sharing online, without taking screen recordings of another program. They are shown as interactive web pages (with the sound embedded, click-to-play and buttons to slow the sound down), which work in R Markdown and Quarto documents, and can also be saved as videos (mp4). It builds on seewave and tuneR.
Dynamic spectrograms are built in layers, as ‘ggplot2’ graphs:
dynaspec() takes the sound, and layers are added with + (only the
panels added are shown):
| Layer | What it does |
|---|---|
ds_spectrogram() | Adds a spectrogram (window length, palette, amplitude range, …) |
ds_oscillogram(), ds_envelope() | Add an oscillogram or an amplitude envelope (above or below the spectrogram) |
ds_spectrum() | Adds a power spectrum next to the spectrogram |
ds_overview() | Adds a lower panel with the whole sound to scrolling spectrograms |
ds_annotations() | Highlights parts of the sound with translucent boxes, borders and labels (e.g. from a selection table) |
ds_captions() | Text at a fixed position shown during a time range, like subtitles |
ds_theme(), ds_theme_dark(), … | Axis titles, fonts, colors of the figure and plot, and preset themes |
ds_player() | Playback controls of web pages (speed slider, loop, volume, download, …) |
ds_static(), ds_scrolling() or ds_paged() | Style of the dynamic spectrogram (see below) |
The package offers three styles of dynamic spectrogram:
| Style | What it looks like |
|---|---|
Static (ds_static(), default) | A play line moves over the whole spectrogram (and oscillogram), which can be split in several rows |
Scrolling (ds_scrolling()) | The spectrogram scrolls from right to left past a fixed “play” line, as in the Macaulay Library |
Paged (ds_paged()) | A spectrogram (or several “pages”) revealed by a sliding highlight box, as in Adobe Audition’s spectral view |
The previews below are silent animations made from videos saved with
save_dynaspec() (in R, printing the objects shows interactive web
pages with sound).
Static spectrogram with an oscillogram, annotation lines and the ‘mako’ theme:
st <- data.frame(start = c(0.34, 1.13, 1.75, 2.34), end = c(1.03, 1.68, 2.33, 2.55),
labels = c("long note", "arched notes", "trill", "end note"), y = c(4.6, 4.9, 5.4, 4))
dynaspec(scythebill, flim = c(1.5, Inf)) +
ds_spectrogram(wl = 200, collevels = seq(-50, 0, 1)) +
ds_oscillogram() +
ds_annotations(st, type = "line", line.freq = "y", labels = "labels") +
ds_theme_mako()
Scrolling spectrogram with an overview of the whole sound and the Macaulay Library look:
dynaspec(antshrike, flim = c(0.5, 5.5), tlim = c(0.1, 5)) +
ds_spectrogram(wl = 256, collevels = seq(-50, 0, 1)) +
ds_overview() +
ds_theme_macaulay() +
ds_scrolling(t.display = 2, fix.time = FALSE)
Paged spectrogram, revealed by a sliding highlight box:
dynaspec(antshrike, flim = c(0.5, 5.5), tlim = c(0.1, 5)) +
ds_spectrogram(wl = 256, collevels = seq(-50, 0, 1)) +
ds_paged(t.display = 2.5)
Contents: Installation · Quick start · Background · Citation
[!TIP] Vignette and articles (on the package website):
- Creating dynamic spectrograms (vignette; also
vignette("dynaSpec")in R): basic usage of every layer and of the three styles, and how to save and embed them- Themes for dynamic spectrograms: theme settings and preset themes, including looks inspired by the Xeno-canto and Macaulay Library players
- Customizing dynamic spectrograms: spectrograms, panels, styles, annotations, captions, player controls and videos
Install latest version from CRAN:
install.packages("dynaSpec")
Or install the development version from GitHub (requires remotes):
remotes::install_github("maRce10/dynaSpec")
Web pages do not need any external software. However, to create videos dynaSpec uses ffmpeg, which must be installed and available in the system path:
| Operating system | Command (in a terminal) |
|---|---|
| Windows | winget install --id Gyan.FFmpeg -e (or download a build from gyan.dev and add its bin folder to the PATH) |
| macOS | brew install ffmpeg |
| Debian/Ubuntu | sudo apt install ffmpeg |
You can check that R finds it with:
Sys.which("ffmpeg")
If ffmpeg is installed somewhere else, point R to the executable with
Sys.setenv(ffmpeg = "path/to/ffmpeg").
Please cite dynaSpec as follows:
Araya-Salas, M. & Wilkins, M. R. (2026). dynaSpec: dynamic spectrogram visualizations in R. R package version 2.0.0.9000. https://github.com/maRce10/dynaSpec
Bugs and feature requests can be reported at https://github.com/maRce10/dynaSpec/issues.