This app plays music .mp3, .flac, .ogg and .wav at seemingly random time intervals simulating minecraft's music player.
You must provide the music yourself. These music files must be in the path in your config file. The program will scan recursively on startup, meaning that you can store your songs inside other directories in that music directory.
The program only runs in command line since I haven't made a GUI for it. This is a hobby project, I may never update it again but I will try to listen to issues created here.
- Recursevely select songs in the given directory
- Decode music files at startup
- Time interval in config
- GUI for volume control
- Hotkey support
- %Chance config support for each song
- Hot reload song list or watch for directory changes
- Integration with popular streaming services (not priority)
There's a couple of reasons this could be:
- No config file was provided, a file with the name
config.toml
needs to be created before startup for the program to work. - The config file provided did not contain the field:
music_directory = "./music"
. - No music files were found in the directory given. Make sure you put your "high-quality" music files in the directory you set in the config file.
On launch, the program delays even the first song between 5 to 20 minutes until it starts playing. If you really want to know, the program also prints out the next timestamp of when the next song is going to play.
The music will be played in random intervals from 5 to 20 minutes after the last song was played!
No, but you can create directories inside the music directory given in the config file! Impulsive Player will search recusively and create a list of all the files in there regardless of directory structure.
This program runs on rust, the programming language. To build it you must have
rust installed and run cargo build
to create a binary or cargo run
for a
temporary debug binary.
The program will crash if a config file was not provided.
Download the latest release for you current OS and run it from your terminal.
This section needs expanding.
If you want to make a similar app, feel free to take inspiration from the code written here. The crates I used were:
Rodio
for the loading and playback of music.Chrono
for calculating time until the the next song is played.Tokio
for creating a thread that contains music player.Serde
for loading config files.Rand
for choosing random intervals and random files to playRegex
to filter only playable files from the music directory.
Have fun with this app! I felt like having music play as I'm programming seemingly at random made some work feel somewhat less meaningless :).