Skip to content

Commit 233cede

Browse files
author
Kenth Fagerlund
committed
feat(ui): add beat-reactive animated animal DJ visualizers, improve UI preview docs, and bump to v0.0.3
1 parent ea39157 commit 233cede

12 files changed

Lines changed: 567 additions & 133 deletions

File tree

Formula/halpradio.rb

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,22 @@
44
class Halpradio < Formula
55
desc "LazyVim-inspired Terminal Internet Radio Streamer"
66
homepage "https://github.com/halpworld/halpradio"
7-
version "0.0.2"
7+
version "0.0.3"
88
license "MIT"
99

1010
on_macos do
1111
if Hardware::CPU.arm?
12-
url "https://github.com/halpworld/halpradio/releases/download/v0.0.2/halpradio_0.0.2_darwin_arm64.tar.gz"
13-
sha256 "e7d344645a807558f10125b9da2087acc14e09682b0837f197201d3e62682c0f"
12+
url "https://github.com/halpworld/halpradio/releases/download/v0.0.3/halpradio_0.0.3_darwin_arm64.tar.gz"
1413
else
15-
url "https://github.com/halpworld/halpradio/releases/download/v0.0.2/halpradio_0.0.2_darwin_amd64.tar.gz"
16-
sha256 "70f89615278eec4105460cc1ea6a2adb80975050baf2a287c4b534af58271e88"
14+
url "https://github.com/halpworld/halpradio/releases/download/v0.0.3/halpradio_0.0.3_darwin_amd64.tar.gz"
1715
end
1816
end
1917

2018
on_linux do
2119
if Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
22-
url "https://github.com/halpworld/halpradio/releases/download/v0.0.2/halpradio_0.0.2_linux_arm64.tar.gz"
23-
sha256 "022baff84f0e21a985690617938ec707f02938bd00a0505f46f000bdd2f96c49"
20+
url "https://github.com/halpworld/halpradio/releases/download/v0.0.3/halpradio_0.0.3_linux_arm64.tar.gz"
2421
else
25-
url "https://github.com/halpworld/halpradio/releases/download/v0.0.2/halpradio_0.0.2_linux_amd64.tar.gz"
26-
sha256 "3c1aaae06b31394e5c4a2c538af0ee40981ee5b1047adc1ad015e323d4ad1a33"
22+
url "https://github.com/halpworld/halpradio/releases/download/v0.0.3/halpradio_0.0.3_linux_amd64.tar.gz"
2723
end
2824
end
2925

README.md

Lines changed: 47 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,35 +46,66 @@ halpradio
4646
- **🐙 1-Key GitHub PR Export**: Press `p` on any station to copy a clean YAML snippet directly to your clipboard, ready for submitting a PR to [`stations.yaml`](./stations.yaml)!
4747
- **🔒 Private / Custom Stations**: Add private stream URLs locally via interactive `[ a ] Add Station` dialog (saved in `~/.config/halpradio/stations.yaml`).
4848
- **🎨 6 Vibrant Themes**: Tokyo Night, Catppuccin Mocha, Retro Synthwave '84, Nord, Gruvbox Dark, and Dracula.
49-
- **🔊 Live Audio Equalizer**: Dynamic animated TUI visualizers (Bars, Waveform, Spectrum, Minimal).
49+
- **🎧 Animated Animal DJ Visualizers**: Beat-reactive terminal DJs (Cat 🐱, Dog 🐶, Bear 🐻, Frog 🐸, Bunny 🐰) spinning vinyl, scratching decks, and pumping a smooth multi-frequency equalizer rack!
5050
- **📻 Real-time ICY Metadata**: Displays live song title and artist information for supported Icecast/Shoutcast HTTP streams.
5151
- **⭐ Favorites System**: Bookmark stations with `f` for 1-key instant access across restarts.
5252

5353
---
5454

5555
## 📺 Preview
5656

57+
<p align="center">
58+
<img src="./docs/images/preview.jpg" alt="halpradio TUI Preview" width="850" />
59+
</p>
60+
5761
```
58-
┌── 📻 HALPRADIO v0.0.2 ───────────────────────────────────────────────────────────── [ TOKYO NIGHT ] ┐
62+
┌── 📻 HALPRADIO v0.0.3 ───────────────────────────────────────────────────────────── [ TOKYO NIGHT ] ┐
5963
│ │
60-
│ [1] All Stations (128) [2] Favorites (12) [3] Categories [4] Online Search (30,000+)
64+
│ [ 1: Catalog (128) ] [ 2: Work Modes ] [ 3: Genres ] [ 4: Online Search ] [ ▶ PLAY ]
6165
│ ────────────────────────────────────────────────────────────────────────────────────────────────── │
62-
│ ▶ ⭐ Lofi Girl Radio [ Lofi / Chill ] FR • 128 kbps MP3 │
63-
│ ⭐ Nightwave Plaza [ Vaporwave / Synth ] US • 320 kbps MP3 │
64-
│ Chillhop Music Radio [ Lofi / HipHop ] NL • 192 kbps MP3 │
65-
│ SomaFM Groove Salad [ Ambient / Downtempo ] US • 128 kbps MP3 │
66-
│ KEXP 90.3 FM [ Indie / Alternative ] US • 160 kbps AAC │
67-
│ BBC Radio 6 Music [ Eclectic / Rock ] GB • 128 kbps AAC │
66+
│ ▶ ⭐ 🇫🇷 Lofi Girl Radio [ Lofi / Beats ] FR • 320 kbps MP3 │
67+
│ ⭐ 🇺🇸 Nightwave Plaza [ Vaporwave / Synth ] US • 192 kbps MP3 │
68+
🇳🇱 Chillhop Music Radio [ Lofi / Jazz ] NL • 320 kbps MP3 │
69+
🇺🇸 SomaFM Groove Salad [ Downtempo / Ambient ] US • 128 kbps MP3 │
70+
🇺🇸 KEXP 90.3 FM [ Indie / Alt Rock ] US • 160 kbps AAC │
71+
🇬🇧 BBC Radio 6 Music [ Eclectic / Rock ] GB • 128 kbps AAC │
6872
│ ────────────────────────────────────────────────────────────────────────────────────────────────── │
69-
NOW PLAYING: Lofi Girl Radio — Kupla & Philanthrope - Soft Wind
70-
VOLUME: [████████████████░░░░] 80% • BACKEND: mpv • VISUALIZER: ▃▅▇█▇▅▃ ▂▄▆█
71-
72-
│ [?] WhichKey [/] Search [Space] Play/Pause [f] Fav [p] Export PR [t] Theme [q] Quit
73+
🇫🇷 Lofi Girl Radio (Lofi / Beats) 🔊 [████████░░] 80%
74+
♪ Kupla & Philanthrope - Soft Wind 🎧 (=^・ω・^=)ノ [💿 ◓] ♫ ▂▃▄▅▆
75+
──────────────────────────────────────────────────────────────────────────────────────────────────
76+
│ [?] WhichKey [/] Search [Space] Play/Pause [v] Visualizer [f] Fav [t] Theme [q] Quit │
7377
└────────────────────────────────────────────────────────────────────────────────────────────────────┘
7478
```
7579

7680
---
7781

82+
## 🎧 Beat-Reactive Animal DJ Visualizers
83+
84+
<p align="center">
85+
<img src="./docs/images/visualizers.jpg" alt="halpradio Animated Animal DJ Visualizers" width="850" />
86+
</p>
87+
88+
Press `v` anytime in **halpradio** to cycle through 5 animated animal DJs, classic bars, waveform, spectrum, or minimal meters:
89+
90+
| Visualizer Mode | Animal Character | DJ Booth & Live Equalizer Preview |
91+
|---|---|---|
92+
| `dj-cat` *(default)* | 🐱 **DJ Cat** | `🎧 (=^・ω・^=)ノ [💿 ◓] ♫ ▂▃▄▅▆` |
93+
| `dj-dog` | 🐶 **DJ Dog** | `🎧 (∪・ω・∪) ノ [💿 ◑] ♫ ▂▃▄▅▆` |
94+
| `dj-bear` | 🐻 **DJ Bear** | `🎧 ʕ •ᴥ•ʔ ノ [💿 ◒] ♫ ▂▃▄▅▆` |
95+
| `dj-frog` | 🐸 **DJ Frog** | `🎧 ( •⊖• ) ノ [💿 ◐] ♫ ▂▃▄▅▆` |
96+
| `dj-bunny` | 🐰 **DJ Bunny** | `🎧 ( •ㅅ• ) ノ [💿 ◓] ♫ ▂▃▄▅▆` |
97+
| `bars` | 📊 **Bars Equalizer** | `♫ ▂▃▄▅▆▇█▇▆▅▄▃▂ ♬` |
98+
| `wave` |**Waveform** | `∿ _⎽⎼─⎻⎺▔⎺⎻─⎼⎽_ ∿` |
99+
| `spectrum` | 🔊 **Spectrum** | `🔊 BASS ███ MID ███ TREB ███` |
100+
| `minimal` | 🎚️ **Minimal VU** | `L:████░░░░ R:██████░░` |
101+
102+
- **Zero-Jitter Normalized Poses**: Every pose (head + arm + deck) has an exact, invariant width (24 visual columns) for smooth, stable rendering without horizontal shifting.
103+
- **Harmonic Multi-Frequency Equalizer Rack**: Solid 6-bar mini-EQ (` ▂▃▄▅▆`) driven by harmonic frequency physics (sub-bass kick, mid melody, treble shimmer) with smooth attack and exponential decay.
104+
- **Rhythmic Groove**: Head bobbing and turntable vinyl rotation (``, ``, ``, ``) tempo-matched to audio playback.
105+
- **Sleep State**: When stopped/paused, the DJ rests peacefully on the turntable (`🎧 (= - ω - =)..zzZ [ 💿 ] ⏹ STOPPED`).
106+
107+
---
108+
78109
## 📦 Installation Options
79110

80111
### Method 1: Homebrew (macOS & Linux) — Recommended
@@ -119,8 +150,8 @@ Download pre-compiled standalone tarballs from the [GitHub Releases](https://git
119150
**Manual Installation Steps:**
120151
```bash
121152
# Example for macOS Apple Silicon:
122-
curl -LO https://github.com/halpworld/halpradio/releases/latest/download/halpradio_0.0.2_darwin_arm64.tar.gz
123-
tar -xzf halpradio_0.0.2_darwin_arm64.tar.gz
153+
curl -LO https://github.com/halpworld/halpradio/releases/latest/download/halpradio_0.0.3_darwin_arm64.tar.gz
154+
tar -xzf halpradio_0.0.3_darwin_arm64.tar.gz
124155
sudo mv halpradio /usr/local/bin/
125156
```
126157

@@ -194,7 +225,7 @@ Press `?` or `F1` anywhere in **halpradio** to open the floating **WhichKey Over
194225
| | `r` | Play random station |
195226
| | `+` / `-` | Volume up / down (5% step) |
196227
| | `m` | Mute / unmute |
197-
| | `v` | Cycle visualizer (`bars`, `waveform`, `spectrum`, `minimal`) |
228+
| | `v` | Cycle visualizer (`dj-cat`, `dj-dog`, `dj-bear`, `dj-frog`, `dj-bunny`, `bars`, `wave`, `spectrum`, `minimal`) |
198229
| **Catalog** | `f` | Toggle Favorite star ⭐ |
199230
| | `/` | Live fuzzy search / filter stations |
200231
| | `a` | Open **Add Custom Station** modal |

docs/CONFIGURATION.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ All user state and settings are stored in your platform's standard configuration
2424
volume: 80
2525
player_backend: "auto" # auto, native, mpv, vlc, cvlc, ffplay, mplayer, mpg123
2626
theme: "tokyonight" # tokyonight, catppuccin, synthwave, nord, gruvbox, dracula
27-
visualizer_mode: "bars" # bars, waveform, spectrum, minimal
27+
visualizer_mode: "dj-cat" # dj-cat, dj-dog, dj-bear, dj-frog, dj-bunny, bars, wave, spectrum, minimal, off
2828
last_station_id: "" # Remembers last played station
2929
```
3030
@@ -33,31 +33,34 @@ last_station_id: "" # Remembers last played station
3333
## 🚩 Command-Line Flags
3434
3535
```bash
36-
# Force specific audio backend
37-
halpradio -backend mpv
36+
# Set audio player backend explicitly
37+
halpradio --backend=native
38+
halpradio --backend=mpv
39+
halpradio --backend=vlc
3840

39-
# Force native Go audio engine (no mpv or vlc needed)
40-
halpradio -backend native
41+
# Choose initial color theme
42+
halpradio --theme=synthwave
43+
halpradio --theme=catppuccin
4144

42-
# Launch with Synthwave '84 theme
43-
halpradio -theme synthwave
44-
45-
# Display version information
46-
halpradio -version
45+
# Print version and system diagnostic report
46+
halpradio --version
4747
```
4848

4949
---
5050

51-
## ⌨️ Complete Keybindings Reference (LazyVim Style)
52-
53-
Press `?` or `F1` anywhere in **halpradio** to toggle the floating **WhichKey Help Overlay**.
51+
## ⌨️ Global Keybindings Reference
5452

55-
### 🧭 Navigation & Tab Controls
53+
### 🎧 Audio & Playback Controls
5654

5755
| Keybinding | Action |
5856
|---|---|
59-
| `j` / `` | Move selection down |
60-
| `k` / `` | Move selection up |
57+
| `Space` / `Enter` | Toggle Play / Pause selected station |
58+
| `s` | Stop audio stream playback |
59+
| `r` | Play a random station |
60+
| `+` / `=` | Increase volume (+5%) |
61+
| `-` | Decrease volume (-5%) |
62+
| `m` | Mute / Unmute audio |
63+
| `v` | Cycle audio visualizer mode (`dj-cat``dj-dog``dj-bear``dj-frog``dj-bunny``bars``wave``spectrum``minimal``off`) |
6164
| `h` / `` | Focus left sidebar / Previous tab |
6265
| `l` / `` | Focus main list / Next tab |
6366
| `1` - `4` | Direct jump to Tab (1: All, 2: Favorites, 3: Categories, 4: Online Search) |

docs/THEME_SYSTEM.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,33 @@ type Theme struct {
5858

5959
## 🔊 Dynamic Audio Visualizers (`pkg/ui/components/visualizer.go`)
6060

61-
When audio is playing, `halpradio` renders an animated visualizer in the Player Bar. Press `v` to cycle through 4 visualizer modes:
61+
<p align="center">
62+
<img src="./images/visualizers.jpg" alt="halpradio Animated Animal DJ Visualizers" width="800" />
63+
</p>
64+
65+
When audio is playing, `halpradio` renders a zero-jitter, beat-reactive animated visualizer in the Player Bar. Press `v` to cycle through visualizer modes:
6266

6367
```
64-
Bars Mode: ▃▅▇█▇▅▃ ▂▄▆█▆▄▂
65-
Waveform Mode: ~≈∼-∼≈~-~≈∼-∼≈~
66-
Spectrum Mode: ░▒▓█▓▒░░▒▓█▓▒░
67-
Minimal Mode: ● ∙ ○ ∙ ● ∙ ○ ∙
68+
DJ Cat Mode: 🎧 (=^・ω・^=)ノ [💿 ◓] ♫ ▂▃▄▅▆
69+
DJ Dog Mode: 🎧 (∪・ω・∪) ノ [💿 ◑] ♫ ▂▃▄▅▆
70+
DJ Bear Mode: 🎧 ʕ •ᴥ•ʔ ノ [💿 ◒] ♫ ▂▃▄▅▆
71+
DJ Frog Mode: 🎧 ( •⊖• ) ノ [💿 ◐] ♫ ▂▃▄▅▆
72+
DJ Bunny Mode: 🎧 ( •ㅅ• ) ノ [💿 ◓] ♫ ▂▃▄▅▆
73+
Bars Mode: ♫ ▂▃▄▅▆▇█▇▆▅▄▃▂ ♬
74+
Waveform Mode: ∿ _⎽⎼─⎻⎺▔⎺⎻─⎼⎽_ ∿
75+
Spectrum Mode: 🔊 BASS ███ MID ███ TREB ███
76+
Minimal Mode: L:████░░░░ R:██████░░
6877
```
6978

70-
1. **Bars Equalizer**: Dynamic vertical block bars (` ▂▃▄▅▆▇█`) responding to time ticks.
71-
2. **Waveform**: Smooth sine wave unicode characters depicting audio oscillation.
72-
3. **Spectrum**: Multi-level block density visualizer.
73-
4. **Minimal**: Compact pulsing dot indicators for minimalistic terminal layouts.
79+
1. **Animated Animal DJs** (`dj-cat`, `dj-dog`, `dj-bear`, `dj-frog`, `dj-bunny`):
80+
- **Zero-Jitter Normalized Poses**: Every pose (head + arm + deck) has an exact, invariant width (24 visual columns) for smooth, stable rendering without horizontal shifting.
81+
- **Harmonic Multi-Frequency Equalizer Rack**: Solid 6-bar mini-EQ (` ▂▃▄▅▆`) driven by harmonic frequency physics (sub-bass kick, mid melody, treble shimmer) with smooth attack and exponential decay.
82+
- **Rhythmic Groove**: Head bobbing and turntable vinyl rotation (``, ``, ``, ``) tempo-matched to audio playback.
83+
- **Sleep State**: When stopped/paused, the DJ rests peacefully on the turntable (`🎧 (= - ω - =)..zzZ [ 💿 ] ⏹ STOPPED`).
84+
2. **Bars Equalizer**: Dynamic vertical block bars (` ▂▃▄▅▆▇█`) responding to time ticks.
85+
3. **Waveform**: Smooth sine wave unicode characters depicting audio oscillation.
86+
4. **Spectrum**: Multi-band frequency equalizer.
87+
5. **Minimal**: Compact stereo VU meters.
7488

7589
---
7690

docs/images/preview.jpg

568 KB
Loading

docs/images/visualizers.jpg

603 KB
Loading

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ if [ -z "${VERSION}" ]; then
3333
echo "🔍 Fetching latest halpradio release..."
3434
VERSION=$(curl -s "https://api.github.com/repos/${REPO}/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
3535
if [ -z "${VERSION}" ]; then
36-
VERSION="v0.0.2"
36+
VERSION="v0.0.3"
3737
fi
3838
fi
3939

pkg/app/app.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/halpworld/halpradio/pkg/util"
1313
)
1414

15-
var Version = "0.0.2"
15+
var Version = "0.0.3"
1616

1717
func Run(embeddedCatalog []byte) {
1818
backendFlag := flag.String("backend", "auto", "Audio player backend: auto, native, mpv, vlc, ffplay, mplayer, mpg123")

pkg/ui/components/playerbar.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ func RenderPlayerBar(
5959
Foreground(th.Highlight)
6060

6161
isPlaying := (status == player.PlayStatus(player.StatusPlaying))
62-
vizRendered := viz.Render(isPlaying, clamp(width/3, 15), th)
62+
vizWidth := clamp(width*2/5, 20)
63+
vizRendered := viz.Render(isPlaying, vizWidth, th)
6364

6465
line1Left := fmt.Sprintf("%s %s", currStation.CountryFlag(), titleStyle.Render(currStation.Name))
6566
if currStation.Genre != "" {
@@ -77,7 +78,11 @@ func RenderPlayerBar(
7778
if trackDisplay == "" {
7879
trackDisplay = currStation.Name
7980
}
80-
line2Left := trackStyle.Render("♪ " + truncate(trackDisplay, clamp(width/2, 20)))
81+
maxTrackWidth := width - lipgloss.Width(vizRendered) - 8
82+
if maxTrackWidth < 15 {
83+
maxTrackWidth = 15
84+
}
85+
line2Left := trackStyle.Render("♪ " + truncate(trackDisplay, maxTrackWidth))
8186

8287
space2 := width - lipgloss.Width(line2Left) - lipgloss.Width(vizRendered) - 6
8388
if space2 < 1 {

0 commit comments

Comments
 (0)