{"id":23263074,"url":"https://github.com/connorsweeneydev/tuimusic","last_synced_at":"2025-04-06T06:21:07.860Z","repository":{"id":268857245,"uuid":"905663697","full_name":"ConnorSweeneyDev/TuiMusic","owner":"ConnorSweeneyDev","description":"A terminal-based music player written using SDL, FTXUI and TagLib that has playlists and normalizes volume around -14dB.","archived":false,"fork":false,"pushed_at":"2025-03-05T00:53:16.000Z","size":29043,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T01:31:08.528Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ConnorSweeneyDev.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-19T09:27:56.000Z","updated_at":"2025-03-05T00:47:45.000Z","dependencies_parsed_at":"2025-01-14T11:30:32.738Z","dependency_job_id":"b098e019-caf2-462f-bef4-a78a1f2b46c4","html_url":"https://github.com/ConnorSweeneyDev/TuiMusic","commit_stats":null,"previous_names":["connorsweeneydev/tuimusic"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnorSweeneyDev%2FTuiMusic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnorSweeneyDev%2FTuiMusic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnorSweeneyDev%2FTuiMusic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnorSweeneyDev%2FTuiMusic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ConnorSweeneyDev","download_url":"https://codeload.github.com/ConnorSweeneyDev/TuiMusic/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441826,"owners_count":20939369,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-19T14:14:23.574Z","updated_at":"2025-04-06T06:21:07.849Z","avatar_url":"https://github.com/ConnorSweeneyDev.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TuiMusic\nA terminal-based music player written using SDL, FTXUI and TagLib. It features:\n- Pause/Unpause\n- Seek\n- Skip\n- Volume Up/Down\n- Search\n- Playlists\n- Shuffle\n- Per-Song Volume Normalization Around -14dB\n- Persistent State\n\n## Usage\nPlaylists are in the form of folders on your filesystem - place absolute paths to folders in the `user/playlists.txt`\ndirectory and the player will load them on startup. The player will start playing a random song from the first playlist\nand will continue to pick random songs from that playlist after it finishes playing the current one. If you manually\nchange the playlist the player will start playing a random song from the new playlist instead. After adding a new MP3\nfile to an existing folder, you should run the player with the `-r` flag to re-cache the playlists and pick up the new\nsong.\n\nhttps://github.com/user-attachments/assets/a1333cd2-cd4d-42e4-bba2-73056ddde9c6\n\n\u003e [!NOTE]\n\u003e Controls are as follows:\n\u003e - \u003ckbd\u003ej\u003c/kbd\u003e, \u003ckbd\u003ek\u003c/kbd\u003e, \u003ckbd\u003edown\u003c/kbd\u003e or \u003ckbd\u003eup\u003c/kbd\u003e to navigate the focused menu by 1 item.\n\u003e - \u003ckbd\u003eJ\u003c/kbd\u003e or \u003ckbd\u003eK\u003c/kbd\u003e to navigate the focused menu by 12 items.\n\u003e - \u003ckbd\u003eT\u003c/kbd\u003e or \u003ckbd\u003eB\u003c/kbd\u003e to navigate to the top/bottom of the focused menu.\n\u003e - \u003ckbd\u003eh\u003c/kbd\u003e, \u003ckbd\u003el\u003c/kbd\u003e, \u003ckbd\u003eleft\u003c/kbd\u003e or \u003ckbd\u003eright\u003c/kbd\u003e to open/close the playlists tab.\n\u003e - \u003ckbd\u003ectrl\u003c/kbd\u003e + \u003ckbd\u003ef\u003c/kbd\u003e to toggle search mode, type in the form `artist`, `title`, `artist|title` or\n\u003e   `title|artist`.\n\u003e - \u003ckbd\u003ereturn\u003c/kbd\u003e to select the focused menu item.\n\u003e - \u003ckbd\u003es\u003c/kbd\u003e to shuffle the current/focused playlist.\n\u003e - \u003ckbd\u003ep\u003c/kbd\u003e to pause/unpause.\n\u003e - \u003ckbd\u003eH\u003c/kbd\u003e or \u003ckbd\u003eL\u003c/kbd\u003e to seek forward/backward by 5%.\n\u003e - \u003ckbd\u003e0\u003c/kbd\u003e, \u003ckbd\u003e1\u003c/kbd\u003e... \u003ckbd\u003e9\u003c/kbd\u003e to seek to 0%, 10%... 90% of the song.\n\u003e - \u003ckbd\u003en\u003c/kbd\u003e to end the current song.\n\u003e - \u003ckbd\u003eu\u003c/kbd\u003e or \u003ckbd\u003ed\u003c/kbd\u003e to increase/decrease the volume by 1%.\n\u003e - \u003ckbd\u003eU\u003c/kbd\u003e or \u003ckbd\u003eD\u003c/kbd\u003e to increase/decrease the volume by 5%.\n\u003e - \u003ckbd\u003eescape\u003c/kbd\u003e to close the player.\n\n# Building and Executing\nThis project is optimized to be built with the following targets in mind:\n- Windows 11 MinGW 64-bit GCC 14.2.0\n- Ubuntu 22.04 GLIBC Version 2.35\n\nVersion information for dependencies can be found in `external/version_info.txt`.\n\nOn Windows the binary is statically linked to all system libraries, but dynamically linked to SDL, SDL_mixer and ftxui.\nOn linux the binary is statically linked where possible (only libstdc++ and libgcc) and dynamically linked to everything\nelse.\n\nAfter following the platform specific instructions below you can execute `script/build.sh` followed by `script/run.sh`\n(or `script/run.bat` on Windows) from the root of the project to build and run it.\n\n### Windows\nDo the following to ensure your environment is set up correctly:\n- Download a 64-bit [MinGW](https://winlibs.com/) distribution with Clang/LLVM support and put the `[DISTRIBUTION]/bin`\n  directory in your path.\n- Install GNUMake by running `winget install ezwinports.make`.\n- Install ffmpeg by running `winget install Gyan.FFmpeg` (optional for volume normalization).\n- Ensure that you have `[GIT_INSTALLATION]/bin` in your path.\n\n### Linux\nDo the following on Ubuntu to ensure your environment is set up correctly:\n- Only run `sudo apt update \u0026\u0026 sudo apt upgrade` if you haven't already.\n- Run `sudo apt install git g++ gdb make`.\n- Run `sudo apt install ffmpeg` (optional for volume normalization).\n\nAfter building, do the following to ensure your environment is set up correctly:\n- Only run `sudo apt install alsa xorg openbox` if you don't already have an audio and window manager.\n\n# Updating Libraries\nSince the library files are all within the project, to update the libraries for each platform some extra steps are\nrequired.\n\n## ftxui\n### Windows\nOn top of the previous Windows setup, follow these steps to build ftxui for MinGW:\n- Ensure that you have cmake installed, if not run `winget install Kitware.CMake`.\n- `git clone https://github.com/ArthurSonzogni/FTXUI.git \u0026\u0026 cd FTXUI \u0026\u0026 mkdir build`.\n- `cmake -B build -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -G \"MinGW Makefiles\"`.\n- `cmake --build build --config Release`.\n\nNow you will have access to some important folders:\n- `FTXUI/include/ftxui` contains the header files that can replace the ones in the `external/include/ftxui` folder of\n  this project. After replacing the contents of that folder, you have to remove all instances of `ftxui/` from the\n  include paths within the new header files.\n- `FTXUI/build` contains the files to replace the `external/library/ftxui/windows` and `binary/windows` folders of\n  this project.\n\n### Linux\nOn top of the previous Linux setup, follow these steps to build ftxui for Linux:\n- Ensure that you have cmake installed, if not run `sudo apt install cmake`.\n- `git clone https://github.com/ArthurSonzogni/FTXUI.git \u0026\u0026 cd FTXUI \u0026\u0026 mkdir build`.\n- `cmake -B build -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -G \"Unix Makefiles\"`.\n- `cmake --build build --config Release`.\n\nNow you will have access to some important folders:\n- `FTXUI/include/ftxui` contains the header files that can replace the ones in the `external/include/ftxui` folder of\n  this project. After replacing the contents of that folder, you have to remove all instances of `ftxui/` from the\n  include paths within the new header files.\n- `FTXUI/build` contains the files to replace the `external/library/ftxui/linux` and `binary/linux` folders of this\n  project.\n\n## SDL\n### Windows\nOn top of the previous Windows setup, go to the [releases](https://github.com/libsdl-org/SDL/releases) page and download\nthe file ending `mingw.zip`. Extract this and go to `x86_64-w64-mingw32` and you will have access to three important\nfolders:\n- `x86_64-w64-mingw32/include/SDL2` which contains files that can replace the contents of the\n  `external/include/sdl/windows` folder of this project.\n- `x86_64-w64-mingw32/lib` which contains the files to replace the contents of the `external/library/sdl/windows` folder\n  of this project.\n- `x86_64-w64-mingw32/bin` which contains the file that can replace the one in the `binary/windows` folder of this\n  project.\n\n### Linux\nOn top of the previous Linux setup, do the following to ensure your environment is set up correctly:\n- Only run `sudo sed -i~orig -e 's/# deb-src/deb-src/' /etc/apt/sources.list` if you haven't already.\n- Only run `sudo apt update` if you just ran the previous command.\n- Run `sudo apt build-dep libsdl2-dev`.\n\nNow you can go to the [releases](https://github.com/libsdl-org/SDL/releases) page and download the\n`SDL2-[VERSION].tar.gz` file. Then run the following commands:\n- `tar -xvzf SDL2-[VERSION].tar.gz`\n- `cd SDL2-[VERSION] \u0026\u0026 mkdir build \u0026\u0026 cd build`\n- `../configure`\n- `make`\n\nNow you have two important directories:\n- `SDL2-[VERSION]/include` which contains the files that can replace the ones in the `external/include/sdl/linux` folder\n  of this project.\n- `SDL2-[VERSION]/build/build/.libs` which contains the files that can replace the contents of the\n  `external/library/sdl2/linux` and `binary/linux` folders of this project. \n\n## SDL_mixer\n### Windows\nOn top of the previous Windows setup, go to the [releases](https://github.com/libsdl-org/SDL_mixer/releases) page and\ndownload the file ending `mingw.zip`. Extract this and go to `x86_64-w64-mingw32` and you will have access to three\nimportant folders:\n- `x86_64-w64-mingw32/include/SDL2` which contains files that can replace the contents of the\n  `external/include/sdl/windows` folder of this project.\n- `x86_64-w64-mingw32/lib` which contains the files to replace the contents of the `external/library/sdl/windows` folder\n  of this project.\n- `x86_64-w64-mingw32/bin` which contains the file that can replace the one in the `binary/windows` folder of this\n  project.\n\n### Linux\nOn top of the previous Linux setup and the SDL setup, do the following to ensure your environment is set up correctly:\n- Go to the `SDL2-[VERSION]/build` folder and run `sudo make install`.\n- Run `sudo apt build-dep libsdl2-mixer-dev`.\n\nNow you can go to the [releases](https://github.com/libsdl-org/SDL_mixer/releases) page and download the\n`SDL2_mixer-[VERSION].tar.gz` file. Then run the following commands:\n- `tar -xvzf SDL2_mixer-[VERSION].tar.gz`\n- `cd SDL2_mixer-[VERSION] \u0026\u0026 mkdir build \u0026\u0026 cd build`\n- `../configure`\n- `make`\n\nNow you have two important directories:\n- `SDL2_mixer-[VERSION]/include` which contains the file that can replace the one in the `external/include/sdl/linux`\n  folder of this project.\n- `SDL2_mixer-[VERSION]/build/build/.libs` which contains the files that can replace the contents of the\n  `external/library/sdl/linux` and `binary/linux` folders of this project.\n\n## TagLib\n### Windows\nOn top of the previous Windows setup, do the following:\n- Run `git clone https://github.com/taglib/taglib.git \u0026\u0026 cd taglib \u0026\u0026 git submodule update --init`\n- Run `cmake -B . -DBUILD_SHARED_LIBS=ON -DVISIBILITY_HIDDEN=ON -DBUILD_EXAMPLES=ON -DBUILD_BINDINGS=ON -DWITH_ZLIB=OFF\n  -DCMAKE_BUILD_TYPE=Release -G 'MinGW Makefiles'`\n- Run `cmake --build . --config Release`\n\nNow you have one important folder; `taglib/taglib` contains the `.dll` and `.dll.a` files that can go into the\n`binary/windows` and `external/library/taglib/windows` folders respectively, and it also contains the `.h` and `.tcc`\nfiles that can go into the `external/include/taglib` folder. The `.h` and `.tcc` files are spread around not just in\nthis folder, but also all of it's subfolders.\n\n### Linux\nOn top of the previous Linux setup, do the following:\n- Run `git clone https://github.com/taglib/taglib.git \u0026\u0026 cd taglib \u0026\u0026 git submodule update --init`\n- Run `cmake -B . -DBUILD_SHARED_LIBS=ON -DVISIBILITY_HIDDEN=ON -DBUILD_EXAMPLES=ON -DBUILD_BINDINGS=ON -DWITH_ZLIB=OFF\n  -DCMAKE_BUILD_TYPE=Release -G 'Unix Makefiles'`\n- Run `cmake --build . --config Release`\n\nNow you have one important folder; `taglib/taglib` contains the `.so.[VERSION]` and `.so` files that can go into the\n`binary/linux` and `external/library/taglib/linux` folders respectively, and it also contains the `.h` and `.tcc` files\nthat can go into the `external/include/taglib` folder. The `.h` and `.tcc` files are spread around not just in this\nfolder, but also all of it's subfolders.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconnorsweeneydev%2Ftuimusic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconnorsweeneydev%2Ftuimusic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconnorsweeneydev%2Ftuimusic/lists"}