nada नाद
music player · Linux and Android

nada

नाद · “sound”

A music player for your desktop and your phone: your files and YouTube Music, with synced lyrics, autoplay and downloads.

चैतन्यं सर्वभूतानां विवृत्तं जगदात्मना ।
नादब्रह्म तदानन्दमद्वितीयमुपास्महे ॥

The awareness in all beings, unfolded as the world: we honour it as Brahman in sound, joy without a second. Saṅgīta Ratnākara 1.3.1
v0.4.0 latest11 releases9 decisions recordedMIT license

nāda's Home: the lyrics of the playing song fill the left, scrolling with it; the right shows the cover, the singers, views, release date and what plays next

Nāda (नाद) is Sanskrit for "sound": in Indian music theory, the primordial sound every note comes from.

nāda is a music player for people who live on the keyboard. Songs on your disk and music from YouTube share one queue. Play a song and, like YouTube, nāda lines up what comes next; reorder or remove anything with vim keys. Lyrics scroll along with the song. If you like a YouTube song, D saves it to your music folder, with its tags, cover and lyrics, while it keeps playing. It runs on MPD, so your library, queue and playback carry on with the window closed. Its phone side, nāda for Android, brings the same music to your pocket.

#Download

#Features

The queue: played songs dimmed, the playing one highlighted, then your songs, then autoplay; each with its views and age The lyrics panel: every version the sources have, which fits the song's length, the script and the timing

The search panel: the top result from your library, more from it, then YouTube's results, with the keys The mini player: cover, title, the current lyric line, controls

#On your phone

nāda for Android, four screens: Home with a mix made for tonight; Now playing, the cover as a turning record ringed by a spectrum, the seek bar a waveform; synced lyrics, the sung line lit; Insights, listening time, streak and a 24-hour clock of when you listen

nāda for Android is the same player made for a phone: dark glass over colour taken from the cover that's playing, with pink always marking where you are. There is nothing to sign in to and no server. Songs come from YouTube Music, and everything else stays on the phone.

The widgets on an Android home screen (Now playing with a waveform and controls, an Orb that fills as the song plays, Today's minutes and streak, Made for tonight mixes, a thin Pulse strip), beside the Search and Library screens

Widgets: Now playing (4×2), Orb (2×2), Today (2×2), Made for tonight (4×2) and Pulse (4×1), plus the playing song on the lock screen and the always-on display. Each plays, pauses and skips without opening the app.

The Android app is being built (Expo and React Native, with SQLite on the phone); the screens above are its design. The first APK will be on the Releases page.

#Install

#Android

Download nada.apk from the Releases page on your phone and open it (Android asks once to allow installs from your browser). It updates the same way. The first APK isn't out yet.

#Linux: what it needs

# Arch
sudo pacman -S --needed python-gobject gtk4 mpd yt-dlp ffmpeg python-ytmusicapi python-mutagen gtk4-layer-shell ttf-jetbrains-mono-nerd
systemctl --user enable --now mpd

MPD needs a music_directory and an audio output; the Arch wiki has a five-line config. nāda finds MPD the way every MPD client does: MPD_HOST / MPD_PORT, else MPD's socket in $XDG_RUNTIME_DIR/mpd/socket, else localhost:6600.

#Linux: nāda

git clone https://github.com/Theyashsawarkar/nada ~/.local/share/nada
ln -s ~/.local/share/nada/bin/nada ~/.local/bin/nada
nada            # opens the player (it starts itself the first time)

Update with git -C ~/.local/share/nada pull && nada quit.

#Usage

nada                       open the player, or close it if it's open
nada show | hide | mini    the full player, hidden, the mini player
nada tab <name>            open on a tab: home queue library youtube playlists downloads
nada add [--next|--play] <YouTube URL | file | search words>
nada ctl toggle|play|pause|stop|next|prev
nada ctl seek +10 | seek -10 | seek 1:30
nada ctl vol +5 | vol -5 | vol 40
nada status [--json]       what's playing
nada waybar                JSON for a waybar module
nada daemon | quit         start / stop the player (MPD keeps playing)

The player is one resident process; nada only sends it a D-Bus message, so it opens at once. ctl, status and waybar talk to MPD directly and work even when the player isn't running. q and Esc only hide the window: the music, autoplay and downloads carry on. :q (or nada quit) closes nāda itself; MPD finishes what's queued.

nada is a toggle: closed, it opens; open and focused, it hides; open but behind other windows or on another workspace, it comes to you, focused.

#Keys

nāda is vim-driven, with Space as the leader, the same grammar as every Vayu tool: a key you use all the time is one key (j/k, p play/pause, H/L tabs, dd, yy); everything else is Space, then a group, then the thing (Space p s shuffle, Space t l the library). Wait a moment after Space (or g, d, y) and a strip shows what can come next; Esc cancels. Space Space opens a palette of every action, ? or Space ? shows every key of the tab you're on. Counts work like vim: 5j, 3., 2dd; digits are always counts (tabs are H/L, Space t, Ctrl+0..4). While typing, Ctrl+j/Ctrl+k move. Confirmations take y only.

Moved in this release (the old key says where, then goes away): Space play/pause is p; queue paste p/P is gp/gP; s shuffle is Space p s; r repeat is Space p r (r now refreshes); L lyrics is Space u l (L is the next tab); i info is Space i; zz is Space g p; a lone 0-4 is H/L or Space t.

Everywhere

KeyAction
jMove down a song (counts work: 5j)
kMove up a song
g gJump to the top (12gg: to the 12th)
GJump to the bottom (12G: to the 12th)
Ctrl+dScroll half a page down
Ctrl+uScroll half a page up
HSwitch to the previous tab (wraps around)
LSwitch to the next tab (wraps around)
Ctrl+TabSwitch to the next tab (also from the search box)
Ctrl+Shift+TabSwitch to the previous tab (also from the search box)
Ctrl+0Switch to Now at once (Ctrl+1 Queue, 2 Library, 3 Playlists, 4 Downloads)
pToggle play / pause
EnterPlay the selected song
.Seek forward 10 seconds (3. = 30 s)
,Seek back 10 seconds
>Play the next song
<Play the previous song
=Raise the volume
-Lower the volume
mToggle mute
MToggle autoplay (more like this after your songs)
VSelect several songs (visual mode)
uRestore the last change (undo)
Ctrl+rRestore an undone change (redo)
DSave the playing YouTube song to your music folder (download)
rRefresh: rescan the music folder and reload the lists
/Open the search panel (your library, YouTube, playlists, : commands, this list)
oOpen the search panel to paste a YouTube link
:Run a command (:w name, :sleep 30m, :yt query…)
?Show every key of this tab
zSwitch to the mini player
qClose the window (the music keeps playing)
EscGo back, or close the window
sShow where shuffle moved (Space p s; for one release)
iShow where song info moved (Space i; for one release)
0Show where the tab numbers moved (H / L, Space t; for one release)
Space SpaceOpen the palette (every action of this tab, fuzzy)
Space ?Show every key of this tab
Space qClose the window (the music keeps playing)
Space t nSwitch to Now (the lyrics)
Space t qSwitch to the queue
Space t lSwitch to the library
Space t pSwitch to playlists
Space t dSwitch to downloads
Space u lToggle the lyrics on the right (Now: open the lyrics panel)
Space u mSwitch to the mini player
Space p sToggle shuffle
Space p rCycle repeat (off, all, this song)
Space p aToggle autoplay (more like this after your songs)
Space p zToggle the sleep timer (fades out in 30 min)
Space l lOpen the lyrics panel (pick a version, the script, the timing)
Space l sSwitch the lyrics script: Hinglish (Latin letters) or Devanagari
Space l [Show the lyrics earlier by 0.25 s (kept for the song)
Space l ]Show the lyrics later by 0.25 s (kept for the song)
Space y yCopy the playing song's title and artist
Space y lCopy the playing song's link (YouTube) or file path
Space f fSearch everything
Space f ySearch YouTube
Space f lSearch your library
Space f pSearch your playlists
Space f cSearch the : commands
Space f tSearch this list
Space x dSave the song to your music folder (download)
Space iShow the song's title, artist and link
Space g pGo to the song that's playing (in the queue)
Space o bOpen the playing song on YouTube in the browser
Space rRefresh: rescan the music folder and reload the lists
Space d cClear the queue (asks first; u brings it back)

Queue

KeyAction
d dRemove the song from the queue (2dd: two; u undoes it)
xRemove the song from the queue (like dd; u undoes it)
d GRemove every song from here to the end (u undoes it)
y yCopy the song (yank; 3yy: three)
g pPaste removed or copied songs below
g PPaste removed or copied songs above
JMove the song down
KMove the song up
AMove the song to play next
DSave the YouTube song to your music folder (download; V: the selection)
nJump to the next match (after a "This list" search)
NJump to the previous match
Space d dRemove the song from the queue (u undoes it)

Library

KeyAction
hMove to the column on the left
lMove to the column on the right
TabSwitch between artists, albums, genres and folders
EnterPlay the artist, album or song (replaces the queue)
aAdd to the end of the queue
AAdd to play next
Space a aAdd to the end of the queue
Space a nAdd to play next

YouTube results

KeyAction
EnterPlay the result
aAdd the result to the end of the queue
AAdd the result to play next
DSave the result to your music folder (download)
Space a aAdd the result to the end of the queue
Space a nAdd the result to play next

Playlists

KeyAction
hMove to the playlists
lMove to the playlist's songs
EnterPlay the playlist (replaces the queue)
aAdd the playlist to the end of the queue
AAdd the playlist to play next
d dDelete the playlist (asks first)
DSave the playlist's YouTube songs to your music folder (download)
Space a aAdd the playlist to the end of the queue
Space a nAdd the playlist to play next
Space d dDelete the playlist (asks first)

Downloads

KeyAction
EnterPlay the saved song
RRetry a failed download
d dDelete the saved file (asks first)
Space x rRetry a failed download
Space d dDelete the saved file (asks first)

Now

KeyAction
EnterToggle play / pause

Queue, visual mode (V)

KeyAction
dRemove the selected songs (u undoes it)
xRemove the selected songs (like d; u undoes it)
yCopy the selected songs (yank)
DSave the selected YouTube songs (download)
VLeave visual mode
EscLeave visual mode

YouTube results, visual mode (V)

KeyAction
aAdd the selected results to the end of the queue
AAdd the selected results to play next
DSave the selected results (download)
VLeave visual mode
EscLeave visual mode

Lyrics panel (Space l l)

KeyAction
jMove down through the versions the sources have
kMove up through the versions
EnterUse these lyrics (kept for the song)
sSwitch the script: Hinglish (Latin letters) or Devanagari
[Show the lyrics earlier by 0.25 s (kept for the song)
]Show the lyrics later by 0.25 s (kept for the song)
EscClose the lyrics panel (q too)

Search panel (/)

KeyAction
TabSwitch where to look (all, YouTube, library, playlists, commands, this list)
Shift+TabSwitch back where to look
Ctrl+jMove down through the results while typing
Ctrl+kMove up through the results while typing
EnterPlay the result (a playlist: replace the queue; a command: run it)
Ctrl+EnterPlay the result next
Shift+EnterAdd the result to the end of the queue
Ctrl+dDownload the result (YouTube)
Ctrl+uClear the search box
Ctrl+xClear recent searches
EscClose the search panel

Palette (Space Space)

KeyAction
Ctrl+jMove down through the actions (Down too)
Ctrl+kMove up through the actions (Up too)
EnterRun the action
EscClose the palette

While a key waits

KeyAction
EscCancel a pending key or count (Space, g, d…)

Mini player (z)

KeyAction
SpaceToggle play / pause
. / ,Seek forward / back 10 seconds
> / <Play next / previous song
z / EnterSwitch back to the full player
q / EscClose the mini player (the music keeps playing)

#Commands

Typed after :, like vim.

CommandDoes
:w <name>Save the queue as a playlist (YouTube songs included)
:e <name>Replace the queue with a playlist (:e alone opens Playlists)
:yt <search>Play the top YouTube result, and its mix after it
:play <search>Play a song from your library (falls back to YouTube)
:add <url or search>Add to the end of the queue
:seek 1:30 · :seek +30Jump to a time, or by an amount
:vol 40 · :vol +10Set or change the volume
:sleep 30m · :sleep offFade out and pause after a while
:lyrics <search>Pick the lyrics by hand (remembered for the song)
:autoplay on · offSame as M
:dlDownload the playing song
:clearEmpty the queue (u brings it back)
:q · :hideQuit nāda (the music keeps playing in MPD; the toggle key starts it again) · hide the window

#Configuration

Everything is optional, in ~/.config/nada/config.toml:

[nada]
autoplay = true          # line up more songs after yours (M toggles it, and it's remembered)
download_dir = "YouTube" # inside MPD's music directory
format = "opus"          # opus (no re-encoding) | mp3 | m4a
seek_step = 10           # seconds for , and .
volume_step = 5
notify = true            # a notification when the song changes (while the window is hidden)
opacity = 0.62           # window background: 1 is solid, lower shows the blur behind it
                         # (unset: your varna theme's panel glass, so it matches Vyom's panels)
music_dir = ""           # default: MPD's music_directory

~/.config/nada/style.css is loaded last, to restyle anything (the default look is Catppuccin Mocha with a mauve accent: see nada/style.css). With varna installed, nāda takes the current theme's colours instead (varna tool nada <theme> gives it its own) and restyles as soon as the theme changes.

#Desktop integration

sway (the same works with any compositor's key bindings):

exec nada daemon
bindsym $mod+Shift+m exec nada                       # open / hide
bindsym $mod+Mod1+space exec nada ctl toggle          # without opening anything
bindsym $mod+Mod1+period exec nada ctl next
bindsym $mod+Mod1+comma exec nada ctl prev
for_window [app_id="^dev\.vayu\.Nada$"] floating enable, resize set 1180 720, move position center

Media keys going through playerctl work as they are: nāda speaks MPRIS. On SwayFX, blur enable, corner_radius 20 in that for_window rule gives the window its glass look; the mini player is a layer-shell surface named nada (layer_effects "nada" { blur enable; corner_radius 18; }).

waybar, a module that shows what's playing (and disappears when nothing is):

"custom/nada": {
  "exec": "nada waybar",
  "return-type": "json",
  "on-click": "nada ctl toggle",
  "on-click-middle": "nada ctl next",
  "on-click-right": "nada",
  "on-scroll-up": "nada ctl seek +10",
  "on-scroll-down": "nada ctl seek -10"
}

Its class is play, pause or stopped, to style each state.

From other tools: nada add --play <url> plays a YouTube link with its mix after it; raga, the YouTube search panel, uses exactly that.

#How it works

 raga, keys, waybar ──► nada (bin/nada: D-Bus) ──► the player process ──► MPD ──► speakers
                                                    │
                                                    ├─ yt-dlp: search, mixes, stream links, downloads
                                                    ├─ LRCLIB: lyrics
                                                    └─ MPRIS: media keys, phone, playerctl

#Troubleshooting

#Contributing

Bug reports, ideas and pull requests are welcome: see CONTRIBUTING.md for the development setup and the rules the code follows, and CHANGELOG.md for what changed in each release. Please report security issues privately (SECURITY.md).

nāda is part of Vayu, a keyboard-driven Wayland desktop, and works on its own on any desktop with MPD.

#License

MIT