This project is about an open-source music player built with Rust (backend) and Godot (frontend).
You can simply download from here
This application is separated into two different program, the backend (Rust) and the frontend (Godot).
The backend can run even when the frontend is closed, but you need the frontend to manage playlists.
The backend can listen to keyboard from anywhere so even when the backend is closed you can control some functionalities.
The controls listed below that is tagged GUI (e.g. press some key (GUI)) will only works when the frontend window is focused while the controls tagged Global (e.g. press some key (Global)) will work regardless if frontend window is focused.
The global controls only listen to keys on the left side (i.e. Shift left, Control left, Alt left).
- You can press W or Up (GUI) or press S or Down (GUI) to move up or down when the library is focused
- Similar feature exists for the playlist
- You can double click (GUI) or press Enter (GUI) while a song is selected to add it into playlist and play it instantly
- The play symbol beside the song works similarly
- Or you can also press shift (GUI) while you double click (GUI) or press Enter (GUI) to just add into playlist and not play it
- The plus symbol beside the song works similarly
- You can press Space (GUI) to search the library
- You can right click the library (GUI) to change to group by artists or albums
- When you play a song, there will be a new section under playlist that shows title, artist, album and lyrics
- You can press H (GUI) to hide this section
- You can also press P (GUI) to hide playlists
- You can drag the circled area (GUI) to change the size of each section
- Volume controls
- You can click the volume button (GUI) or press Alt+M (Global) to mute or unmute
- You can click (GUI) the volume bar to set volume
- You can also click and drag (GUI) the volume bar to change volume
- You can scroll up or down (GUI) or press Alt+Up or Alt+Down (Global) to change volume by a step (like +5% or -5%)
- Playback controls
- You can click the progress bar (GUI) to jump to that specific position of the song
- You can also click and drag the progress bar (GUI)
- You can click the play symbol (GUI) or press Alt+Space (Global) to play or pause or resume song
- You can click the rewind symbol left to the play symbol (GUI) or press Alt+Left (Global) to rewind by a set duration
- You can click the fast forward symbol right to the play symbol (GUI) or press Alt+Right (Global) to fast forward by a set duration
- You can click the jump to beginning symbol left to the rewind symbol (GUI) or press Alt+Ctrl+Left (Global) to jump to the beginning of the song or to de facto replay the song
- You can click the jump to end symbol right to the fast forward symbol (GUI) or press Alt+Ctrl+Right (Global) to jump to the end of the song or to de facto skip to next song
- You can click the history symbol left to the jump to beginning symbol (GUI) or press Alt+Ctrl+Up (Global) to go back to previous song in history, this feature works similarly to the history feature in browsers
- You can click the stop symbol right to the jump to end symbol (GUI) or press Alt+Shift+Space (Global) to stop the playback
- You can click the progress bar (GUI) to jump to that specific position of the song
- Playlist controls
- You can click the plus symbol (GUI) to add a new playlist
- You can click the T symbol (GUI) to rename playlist
- You can click the folder symbol (GUI) to import a playlist, note that you might need to reload library after importing
- You can click the disk symbol (GUI) to export a playlist
- You can click the X symbol (GUI) to delete a playlist, you cannot delete when only one playlist presents
- You can click and drag the tab (GUI) to reorder playlists
- You can select a song and press Delete (GUI) to remove a song from playlist
- You can select a song, then click and drag (GUI) to change the song's position in the playlist
- You can select a song and double click (GUI) or press Enter (GUI) to play it instantly
- Automatic playback controls
- You can click the Repeat symbol (GUI) or press Alt+R (Global) to toggle the repeat mode, the current symbol represents the repeat mode currently used
- Repeat All mode: The playlist is repeated when finished
- Repeat One mode: The same song is replayed again and again
- No Repeat mode: The playback will stop when the playlist is finished
- Stop Every Song mode: The playback will stop every time the song is finished
- You can click the Shuffle symbol (GUI) or press Alt+Shift+R (Global) to turn on or off the shuffle mode, the dimmed shuffle symbol means no shuffling is currently performed
- Shuffling is fair, every song in the playlist will be guaranteed to be played once before the playlist is considered finished
- If no shuffling is enabled, the next song will be the song below the currently played song in the order of the playlist
- You can click the Repeat symbol (GUI) or press Alt+R (Global) to toggle the repeat mode, the current symbol represents the repeat mode currently used
- You can click the reset symbol in the top left section (GUI) to reload the library
- You must click Save before closing the settings for the changes to take effect
- You can only click Discard to close the settings (and discard any changes at the same time)
- You can change the libary path in settings, you can either click the path and type the desired path or press the folder symbol to bring up a window that helps selecting directory
- Note that you will need to reload library to take effect
- Closing the frontend window will not close the backend process
- You can press Alt+E (Global) or click the X symbol on top left (GUI) to close the backend process (and also the frontend window)
- You can press Alt+C (Global) to close or open the frontend window
Floating lyrics is a feature that is only available for x11. The feature currently only supports the SYLT frame in id3 tags (tags used by MP3).
Floating lyrics are enabled by default and activates automatically when you play a song with SYLT frame. Floating lyrics will not disappear when the frontend window is closed and will stay on top of all windows.
You can press Alt+H (Global) to show or hide the floating lyrics.
You can press Alt+L+1 or Alt+L+2 or ... or Alt+L+9 (Global) to change the position of floating lyrics
You can change the margin of the floating lyrics from the edge of screen in settings of the frontend window.
-
You need Rust and Godot to compile this project.
-
Before compiling, you need to use Godot to open the project (src/gui/project.godot) to setup the export presets.
-
You need to go to Project/Export and add a new preset
- You must rename the preset to the os name in Rust target triples (e.g. "windows" or "linux")
- (Optional) You can check on Embed PCK to export in only one binary
- Simply run
cargo build -r
(You have to add--no-default-features
if you are not using X11)
After following all the steps above, you're done!
Oh well, that's unfortunate to hear. You need a custom Godot export template due to a Godot bug.
This bug is fixed in Godot v4.3 (which is not released yet at the moment of writing) so while you can technically use Godot v4.3 beta, I do not recommend it as there is a change that can break the UI.
Therefore, the recommended way is to build a custom export template yourself with the bugfix cherry-picked or download my pre-built template
git clone https://github.com/godotengine/godot.git
git switch 4.2
git remote add bugfix-fork https://github.com/bruvzg/godot.git
git fetch bugfix-fork
git switch con_redir_3
git checkout 4.2
git cherry-pick con_redir_3
scons target=template_release disable_3d=yes module_camera_enabled=no module_navigation_enabled=no module_raycast_enabled=no module_multiplayer_enabled=no module_openxr_enabled=no platform=windows
- Your template should be in bin/
- Enter the path to your template in the Godot export window
It is a planned feature to allow custom themes, but you can manually change the theme (It is an easy task!) in Godot and compile yourself at the moment
You can change it in src/lyrics.rs
and (again) compile yourself, note that it has to be in the format of XLFD
It's planned to allow changing keybinds but as I am happy with the current configuration, it will not be a priority for me, you are welcome to make a pull request tho :)
You can change it in src/main.rs
and compile yourself
This project is licensed under the MIT License - see the LICENSE.md file for details
If you want to help this project's development, buy me a coffee!