A simple GUI audio player written in Rust with egui. Inspired by foobar2000.

Overview

Music Player

A simple GUI music player inspired by foobar2000 written in Rust using egui. The goal of this project is to learn about making gui/ native apps, audio, databases / text search. It is not meant to be used as a serious audio player.

Goals

  • Basic music player functionality. Play, pause, stop.
  • Create a music library, which is indexed for searching.
  • Parse id3 tags from tracks for use with indexing.
  • Create playlists, which can be saved, opened, edited, reordered
  • Drag n' Drop tracks from the music library into the playlist.
  • Save last state of the app when closing.

Stretch goals

  • See if I can make right-click context menus.
  • Visualizations
  • Stream audio
  • Swappable frontend so I can try other Rust cross platform gui libaries.

Stuff to fix or implement

  • Reference playlists by index or actual reference (not a clone...), so info is not lost when changing playlist context
  • Double clicking track automatically starts to play it.
  • Remove tracks from playlist.
  • Reorder items in playlist.
  • Save playlists.
  • Add Next and Previous controls
  • Pause is a toggle
  • Play restarts the track
  • Add player indicators next to the track
  • Add volume control slider
  • Save app state on close.
  • Set currently playing track as app Title
  • Stop with all the cloning... seriously. Everything is cloned.
  • Handle files which can't be decoded correctly into audio.
  • Implement library and text search.
  • Playlist plays to end after track is selected.
  • Un-named playlists get (idx) appended
  • Playlist tab section stacks playlist tabs when they don't fit.
Comments
  • Refactor into app components

    Refactor into app components

    Inspired by the Tiny Pomodoro project, use the same AppComponent trait to split the view components into separate modules. This helps separate the main egui App, individual data structures, and how the view is displayed based on App state.

    I also discovered why my main library causes the app to run slower. Every frame is sorting/grouping the library items. All library views should be stored in the app state or separately in some sort of library database.

    opened by notryanb 0
  • Use confy with the Yaml feature

    Use confy with the Yaml feature

    Use Confy so reasonable paths are used. The toml feature didn't work, so I'm using the Yaml feature. Confy looks like it isn't being actively developed, so this may be worth refactoring into a sub-crate.

    opened by notryanb 0
  • Move library loading off the ui thread

    Move library loading off the ui thread

    When loading large music libraries the main ui thread becomes blocked and the app is unresponsive. For now, offload the work to a background thread. The threads communicate with a mpsc channel.

    opened by notryanb 0
  • Save app state

    Save app state

    This PR add functionality of saving the app state in a json file. I opted to go without the persistence feature from egui because there were issues with rodio not finding an audio device as well as not playing any audio at all. It seems as if it only works when the audio device is created outside of the egui app, which is what I'm doing here.

    Temporary error handling was added just to get the app to work without an existing saved state. Some things to fix next:

    • Figure out error handling
    • Use confy or something to handle storing the data in reasonable places.

    Additionally a large amount of refactoring was done to start making the app easier to manage. The next refactoring should start extracting components for each feature.

    opened by notryanb 0
  • Add track number and implement the player menu

    Add track number and implement the player menu

    Add support for track number from the id3 tag. Implement the player functionality in the Player menu bar item. Change the track state footer to show only the filename that is currently playing instead of the full path.

    opened by notryanb 0
  • Menu Bar

    Menu Bar

    Start work on the menu bar with features that will be included.

    • Moved create playlist button into "New Playlist" option from the File menu.
    • Move track state information to the footer.
    • Add an exit feature.
    opened by notryanb 0
  • Display the playlist in a table

    Display the playlist in a table

    Utilize the new Grid widget. I still need to figure out how to select a full row and extend the grid to the full width of the parent widget. Additionally supported a currently playing indicator in the row of the currently playing track.

    opened by notryanb 0
  • Set currently playing track as the app title

    Set currently playing track as the app title

    The app should no longer be creating LibraryItems after the library is loaded. This lead to a bug where items in the playlist were missing the data from the library. Additionally they are all cloned, which means they can have separate state. That is one aspect of a refactoring I would like to look into.

    The app now changes the window title when a track is selected to play.

    opened by notryanb 0
  • Playlist LibraryItem

    Playlist LibraryItem

    Instead of keeping two separate structs, use the LibraryItem. It not only holds the path, but it also holds the id3 tag data, which can be used by several views.

    opened by notryanb 0
  • Fix collpasing header ID duplicates

    Fix collpasing header ID duplicates

    Itertools group_by indicates items must be consecutive. The list given to the group_by needed to be sorted. In addition, LibraryItems missing id3 fields will result in a None so the frontend can unify the "?" being displayed.

    opened by notryanb 0
  • Add support for basic library

    Add support for basic library

    Add the most basic support for a music library.

    • Can select a folder/directory
    • Parses ID3 tags only
    • Displays via album titles
    • Double click to add to a playlist. This is awkward. Figure out key events.
    • Double click tracks in library to add to the playlist.
    • Synchronous library building, which can block the UI thread :(
    opened by notryanb 0
Owner
Ryan Blecher
<3 Ruby & Rust
Ryan Blecher
Rust Audio Player Daemon

Rust Audio Player Daemon Cause mpd was annoying What rapd trys to do Rapd is not a spotify client, or an advanced music player. Its an audio/music dae

ash 3 Nov 1, 2022
A very simple audio synthesizer with a tuix gui

In this tutorial we'll create a very simple audio synthesiser application from scratch with a ui using tuix. The finished code for this tutorial can b

George Atkinson 24 Jan 6, 2023
Rust-crate with functions and helpers for working with music / audio, inspired by computer music languages.

music-math This crate contains common functions and helpers for working with music / audio in Rust. Most of these are inspired by similar functions fo

Mads Kjeldgaard 3 Apr 10, 2024
simple-eq is a crate that implements a simple audio equalizer in Rust.

simple-eq A Simple Audio Equalizer simple-eq is a crate that implements a simple audio equalizer in Rust. It supports a maximum of 32 filter bands. Us

Mike Hilgendorf 11 Sep 17, 2022
Very simple, efficient, task oriented, low cognitive, Midi player and jukebox for midi instruments

Midi and Virtual Book jukebox Player A cross-platform MIDI and virtual book jukebox player. It only includes the necessary functionalities to play MID

Barrel Organ Discovery 4 Jun 29, 2023
Terminal Music Player written in Rust

Terminal Music Player written in Rust Listen to music freely as both in freedom and free of charge! Freedom: As time goes by, online service providers

null 376 Jan 3, 2023
A terminal music player written in the Rust language.

A terminal music player written in the Rust language. (Windows) Requirements Configuration file path: C:\Users\xxx\.config\music_player\config.yml # P

xiao hui 162 Nov 12, 2022
Small, compact music player written with Rust.

trill Small, compact music player based on rodio. Usage Run the program with --help to see the available options. To just play a sound file: trill -p

Will 3 Nov 25, 2022
Simple examples to demonstrate full-stack Rust audio plugin dev with baseplug and iced_audio

iced baseplug examples Simple examples to demonstrate full-stack Rust audio plugin dev with baseplug and iced_audio WIP (The GUI knobs do nothing curr

Billy Messenger 10 Sep 12, 2022
Arexibo is an Rust Linux Xibo player

Arexibo is an alternate Digital Signage Player for Xibo, implemented in Rust with the GTK GUI components, for Linux platforms.

Georg Brandl 2 Dec 6, 2022
Template project for the The Bombercrab Challenge game, a stub Rust WASM player

The Bombercrab Challenge (Player Template) Welcome to the 2022 Tokyo Game Hack bombercrab challenge! If you're based in Tokyo and planning to attend i

Tonari, Inc 10 Sep 4, 2022
API-agnostic audio plugin framework written in Rust

Because everything is better when you do it yourself - Rust VST3 and CLAP framework and plugins

Robbert van der Helm 415 Dec 27, 2022
A next-generation music player and manager

ouverture A next-generation music player and manager Very much at Work-In-Planning stage now Planned features GUI (localizable) Backend (something lik

Michael B 9 Nov 17, 2022
MRVN is a Discord music player bot.

MRVN is a Discord music player bot. It has a few neat features: Supports a wide array of sites, including Youtube, Soundcloud, Twitch and many mo

Tom Barham 17 Jan 1, 2023
A video player for your terminal that generates a standalone executable that plays your video.

Szmelc Player Szmelc Player is a program that converts any video you give it to a standalone executable that plays the video in the terminal. It uses

null 1 Jan 9, 2022
VR media player for linux

VR media player for linux Very early development access version. I'll drop more notes here once it's ready for more publicity. Some details: Uses wgpu

null 4 Oct 7, 2022
The definitive e-book reader music player (Kobo, Kindle)

Introduction E-ink devices have traditionally been only for reading... well no more! Buck is a fully-fledged music player for e-ink devices (tested fu

BillK 11 Oct 28, 2022
A simple GUI rust application that keeps track of how much time you spend on each application.

TimeSpent A simple GUI rust application that keeps track of how much time you spend on each application. Installation Click here to download the Setup

Slacked Lime 4 Sep 23, 2022
Cross-platform audio I/O library in pure Rust

CPAL - Cross-Platform Audio Library Low-level library for audio input and output in pure Rust. This library currently supports the following: Enumerat

null 1.8k Jan 8, 2023