mirror of
https://github.com/Rigellute/spotify-tui.git
synced 2026-04-26 16:15:55 +03:00
[PR #294] [MERGED] Experimental audio visualiser #744
Labels
No labels
bug
enhancement
good first issue
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-tui#744
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Rigellute/spotify-tui/pull/294
Author: @Rigellute
Created: 2/13/2020
Status: ✅ Merged
Merged: 2/17/2020
Merged by: @Rigellute
Base:
master← Head:wip-visualiser📝 Commits (9)
3ddc4c9WIP music visualizerdd3c0b6Animate bar chartc785bffImprove visualisation and add analysis section5ad2d5dMake tick rate configurablea9eec8cAdd audio analysis view to help docs79679bcAdd tick_rate option to clie2888adMove audio_analysis ui to own filefb29752Add tick-rate to behavior config49b4d59Make bars fit📊 Changes
11 files changed (+203 additions, -5 deletions)
View changed files
📝
README.md(+2 -0)📝
src/app.rs(+23 -0)📝
src/event/events.rs(+5 -2)➕
src/handlers/analysis.rs(+7 -0)📝
src/handlers/common_key_events.rs(+1 -0)📝
src/handlers/mod.rs(+7 -0)📝
src/main.rs(+22 -3)➕
src/ui/audio_analysis.rs(+118 -0)📝
src/ui/help.rs(+1 -0)📝
src/ui/mod.rs(+2 -0)📝
src/user_config.rs(+15 -0)📄 Description
The spotify API has a audio analysis endpoint for a given track.
This is an experimental attempt to use that data to "visualise" a track using a bar chart.
Gif demo
Image
How does this work?
This is very basic but the visualisation is based on the "pitch" information for a given "section" of the piece. To make things more animated, in between the section data I create an offset and subtract from the pitch information based on the current beat.
You can now also configure the
tick_rateof the app. The lower this number the smoother the animations are. But this comes at a cost of higher CPU usage!TODO
vbinding to go to visualisation screentick_rateconfigurable via cli arg and config.yml🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.