cimp_
cimp
~/Music/midi/monkey_island_2$ cimp mkintro.mid
playing mkintro -01:07

A music player for your terminal.

cimp plays audio files and M3U playlists from the command line with one running instance, controlled from anywhere else you open a shell.

#

what it is

cimp is an audio player written in QuickBASIC (QB64) with a small C helper for keyboard input and IPC. It draws a minimal two-line display: what's playing, and a progress bar underneath. Everything else happens through the keyboard or through a second terminal talking to the first.

#

why it is

I, one day in the past wanted to play a midi file on my linux machine, I couldn't without installing a player, none of the ones that came with the system could play a midi file. I didn't want an editor, just a simple player, I could get a plugin for VLC, it didn't work very well. Then I remembered I can just make my own, and so I did. Here it is.
As the writing of code went along I thought to myself: "self, why only midi?, why not add more?", and to this day more has been added multiple times.

#

features

#

Install

Download a prebuild binary or compile with QB64PE. stuff it where you keep your other binaries.

#

run it

cimp [options] <file|playlist> [file2 ...]

One or more audio files or .m3u playlists - at least one is required to start a player.

flagdoes
-v, --volume <n>Set initial volume, 0-100 (default 100)
-s, --shuffleShuffle the playlist on start
-r, --repeat [1]Repeat all, or repeat one with -r 1
-n, --nooutputRun silently, with no display
-b, --soundbank <file>Use a custom soundbank
#

control it from elsewhere

While cimp is already playing, running it again with any of these arguments sends an instruction to that running instance instead of opening a second player.

commanddoes
--play / --pause / --stopControl playback state
--next / --prevSkip forward or back a track
--volume <n>Adjust volume remotely, 0–100
--shuffleReshuffle the current queue
--repeat / --repeat-1Repeat all, or repeat the current track
--add <file>Append a file or playlist to the active queue
--playlistPrint the current queue back from the server
--soundbank <file>Swap the soundbank used for MIDI files
--quitClose the running player
# from a second terminal
cimp --pause
cimp --volume 20
cimp --add extra_track.flac
#

keybindings

↑ / ↓Volume up / down
← / →Seek 5s back / forward
space / cPause / resume
bNext track
zPrevious track, or restart if past 2s
xRestart current track
vStop playback
sReshuffle playlist
tToggle elapsed / remaining time
q / escQuit
#

formats

Decoding goes through QB64PE, so anything the compiler supports, cimp supports.

audio

modxms3m itmidmp3 oggflac

soundbanks

ADOP2OPL SF2SF3SFO TMBWOPL
#

under the hood