{"id":15047443,"url":"https://github.com/roderickqiu/gtwd-cs205-c-cpp","last_synced_at":"2025-08-08T04:39:17.894Z","repository":{"id":217323425,"uuid":"725413868","full_name":"RoderickQiu/gtwd-CS205-C-CPP","owner":"RoderickQiu","description":"GTWD: Global Transcoder for WAV/FLAC/AIFF Data, project of CS205 C/C++ taught in SUSTech (2023 Fall, by Prof Feng Zheng, project selected by TA Kangrui Chen and Site Fan) (110+/100).","archived":false,"fork":false,"pushed_at":"2024-01-16T02:34:33.000Z","size":24939,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T00:51:02.463Z","etag":null,"topics":["aiff","audio","audio-processing","convertor","cpp","cpp14","cs205","flac","sustech","sustech-course-code","wav"],"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/RoderickQiu.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":"2023-11-30T04:52:44.000Z","updated_at":"2024-12-22T17:12:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"3e11cd47-dc65-4dda-862b-f9943b4f2b5e","html_url":"https://github.com/RoderickQiu/gtwd-CS205-C-CPP","commit_stats":null,"previous_names":["roderickqiu/gtwd-cs205-c-cpp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoderickQiu%2Fgtwd-CS205-C-CPP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoderickQiu%2Fgtwd-CS205-C-CPP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoderickQiu%2Fgtwd-CS205-C-CPP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoderickQiu%2Fgtwd-CS205-C-CPP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RoderickQiu","download_url":"https://codeload.github.com/RoderickQiu/gtwd-CS205-C-CPP/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137997,"owners_count":21053775,"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":["aiff","audio","audio-processing","convertor","cpp","cpp14","cs205","flac","sustech","sustech-course-code","wav"],"created_at":"2024-09-24T20:58:25.601Z","updated_at":"2025-04-10T00:51:12.500Z","avatar_url":"https://github.com/RoderickQiu.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GTWD\n\n\u003e **G**lobal **T**ranscoder for **W**AV/FLAC/AIFF **D**ata\n\nBy: [@RoderickQiu](https://github.com/RoderickQiu), [@CypherBruce](https://github.com/Cypher-Bruce), [@SheepDoctor](https://github.com/SheepDoctor)\n\n## Description\n\nThis project is a command line tool for converting audio files between different formats built using C++, supporting\nRAW, WAV, FLAC and AIFF.\n\n### What we made\n\n- Basic parts\n    - **Metadata display \u0026 edit for FLAC**, `type 0 (STREAMINFO)` and `type 4 (VORBIS_COMMENT)`.\n    - **RAW to WAV convertor support**, with file info contained in `INI` format.\n    - **WAV to FLAC convertor support**, using `verbatim predictor` with channel assignment of `2 channels: left`,\n      with `STREAMINFO` and `VORBIS_COMMENT` metadata, 16Bit int or 24Bit int.\n    - **FLAC to WAV convertor support**, with `STREAMINFO` and `VORBIS_COMMENT` metadata and `verbatim subframes`.\n    - **WAV to RAW convertor support**.\n- Bonus parts\n    - **Excellent Project Management**.\n        - We use `git` and `GitHub` to manage our project, with clear commit messages.\n        - We use `CLion` as our IDE, and have a unified code formatter ruleset.\n        - We use `CMake` to build our project.\n    - **More Metadata Block Types**.\n        - Parsing and editing support for `PADDING` block, and it will be shortened if the previous block enlarges.\n        - Parsing support for `APPLICATION` and `SEEKTABLE` block.\n            - Here we didn't implement editing support for application and seek table blocks, because we think it is\n              only meaningful to edit them when the project also works as a FLAC editor.\n    - **Extreme Robustness**.\n        - `MD5` signature and `CRC` check support.\n        - Exception handling and memory management optimizations.\n        - Passed `Google Sanitizer` check with no warnings.\n    - **GUI**.\n        - Support for all functions of this app.\n        - Should support both Windows and macOS.\n        - With an elegant and intuitive interface.\n    - **More Audio Formats**.\n        - **Extra support for AIFF file format. Cool!**\n    - **Anything You Regard as \"Bonus\"**.\n        - **Various playing speed!**\n            - Slowing done or fasting the audio are supported!\n\n### Contributions\n\n- [RoderickQiu](https://github.com/RoderickQiu) (A): Project structure, Flac metadata reading and editing, AIFF\n  conversion, GUI.\n- [SheepDoctor](https://github.com/SheepDoctor) (A): RAW conversion, WAV to FLAC conversion, File IO supporter lib.\n- [Cypher-Bruce](https://github.com/Cypher-Bruce) (A): FLAC to WAV conversion, CRC and MD5 signature support, File IO\n  supporter lib.\n\n## Usage\n\n### Build\n\n```bash\ncmake .\nmake\n```\n\nShould work for both Windows, macOS and Linux.\n\n### Arguments\n\n- For all modes:\n    - `-h` or `--help`: print help message\n    - `-m` or `--mode`:\n        - `w2f` for wav to flac\n        - `f2w` for flac to wav\n        - `f2r` for flac to raw\n        - `r2f` for raw to flac\n        - `r2w` for raw to wav\n        - `w2r` for wav to raw\n        - `w2a` for wav to aiff\n        - `a2w` for aiff to wav\n        - `a2f` for aiff to flac\n        - `f2a` for flac to aiff\n        - `a2r` for aiff to raw\n        - `r2a` for raw to aiff\n        - `fm` for flac meta data reading\n        - `fe` for flac meta data editing\n    - `-i` or `--input`: input file path\n    - `-o` or `--output`: output file path\n    - `-t` or `--temp`: manually indicate a preferred temp directory\n- For `raw` input files (e.g. `r2w`, `r2f`):\n    - `-c` or `--config`: config ini file path for `raw` files\n- For `w2f` mode only:\n    - `-v` or `--velocity`: play speed\n        - argument is the speed of the output file\n        - a float number between 0 and 1\n- For `fe` mode (Flac meta data editing):\n    - `-mv` or `--modify-vendor`: modify vendor\n        - argument is the vendor string to modify\n    - `-mc` or `--modify-comment`: modify comment\n        - need two arguments\n            - the first one is the comment content\n            - the second one is the comment index to alter\n    - `-ac` or `--append-comment`: append comment\n        - argument is the comment content to append\n        - if you have multiple comments, use a simple `;` without space to split\n    - `-rc` or `--remove-comment`: remove comment\n        - argument is the comment index to remove\n\n### Typical Usage\n\nWe suggest that testers use absolute paths for the input and output files.\n\n```bash\n# flac meta data editing\ngtwd -m fe -i yourPathToInputFlac -o yourPathToOutputFlac -mv newVendor -ac yourCommentToAppend\n\n# flac meta data reading\ngtwd -m fm -i yourPathToInputFlac\n\n# convert raw to wav (ovs.pcm)\ngtwd -m r2w -i yourPathToInputRaw -o yourPathToOutputWav -c yourPathToCorrespondingIni\n\n# convert wav to flac (ovs.wav)\ngtwd -m w2f -i yourPathToInputWav -o yourPathToOutputFlac -mv yourVendor -ac yourCommentToAppend\n\n# convert flac to wav (ovs.flac)\ngtwd -m f2w -i yourPathToInputFlac -o yourPathToOutputWav\n\n# convert flac to raw (ovs.flac)\ngtwd -m f2r -i yourPathToInputFlac -o yourPathToOutputRaw\n\n# convert: aiff to flac (ovs.aiff)\ngtwd -m a2f -i yourPathToInputAiff -o yourPathToOutputFlac\n```\n\nIf it is reported that \"Error getting temp folder from environment variables\" when executing `gtwd`, please manually\nadd `-t` flag to the command line to indicate a preferred temp folder. It is because the default temp folder is not\navailable in some environments.\n\n```bash\ngtwd -m f2w -i yourPathToInputFlac -o yourPathToOutputWav -t yourTempPath\n```\n\n### Provided Examples\n\n- Flac Metadata\n    - `ProvidedDocuments/flac/mono.flac`\n- RAW -\u003e WAV -\u003e FLAC\n    - `ProvidedDocuments/raw/ovs.pcm` with `ProvidedDocuments/raw/ovs.ini`\n    - `ProvidedDocuments/wav/ovs.wav`\n- FLAC -\u003e WAV -\u003e RAW\n    - `ProvidedDocuments/flac/ovs.flac`\n    - `ProvidedDocuments/wav/ovs.wav`\n- More Metadata\n    - `ProvidedDocuments/metadata/application.flac` for `APPLICATION`, `ProvidedDocuments/raw/seektable.flac`\n      for `SEEKTABLE`\n      and `ProvidedDocuments/raw/padding.flac` for `PADDING` blocks\n- AIFF\n    - `ProvidedDocuments/aiff/mint16.aif`, `ProvidedDocuments/aiff/mint24.aif` and `ProvidedDocuments/aiff/mint32.aif`,\n      each with different bit depth\n    - `ProvidedDocuments/aiff/ovs.aiff`\n- Different Velocity\n    - `ProvidedDocuments/wav/ovs.wav`\n- Robustness Test\n    - `ProvidedDocuments/robust/*`\n\n### GUI Usage\n\nThe GUI is built using `Electron`, so you need to install `Node.js` first, and run the following commands.\n\n```bash\ncd Gui\nnpm install\nnpm run start\n```\n\nThe GUI is intuitive to use, and support all formats. View a screenshot of it\nat [here](https://chore-1259749012.cos.ap-hongkong.myqcloud.com/%E6%88%AA%E5%B1%8F2024-01-09%2023.07.31-9-23-12-21.png).\n\nIf you are not using `Windows x86_64` or `macOS arm64`, you may need to alternate the executive of `gtwd` used, which is\nput under `Gui/exec` folder.\n\nIf you cannot install `electron` due to the limit of your network, you can use the following commands to indicate an\nalternative source:\n\n```bash\nnpm config set registry https://registry.npm.taobao.org\nnpm config set disturl https://npm.taobao.org/dist\nnpm config set electron_mirror https://npm.taobao.org/mirrors/electron/\n```\n\n## Acknowledgement\n\nIn this project, we have used the following open source libraries:\n\n- [Clipp](https://github.com/muellan/clipp) - cross-platform command line interfaces for modern C++.\n    - Licensed under the [MIT License](http://opensource.org/licenses/MIT).\n    - Copyright (c) 2017-2018 [André MÜLLER](mailto:foss@andremueller-online.de).\n- [SimpleIni](https://github.com/brofield/simpleini) - allows an INI-style configuration file to be used on both\n  Windows and Linux/Unix.\n    - Licensed under the [MIT License](http://opensource.org/licenses/MIT).\n    - Copyright (c) 2013-2023 [Brodie THIESFIELD](https://github.com/brofield).\n    - Using `ConvertUTF` in the lib.\n        - Copyright 2001-2004 [Unicode Inc](https://home.unicode.org/).\n\nAlso, in this project, we use `CLion` as our IDE, thanks to their free educational plan.\n\n**Thanks for Prof. Feng ZHENG for his C++ class. Thanks for the efforts of TAs of the class, especially Kangrui CHEN and\nSite FAN.**\n\n## Last but not least\n\n_You may ask why the project is named **GTWD**?_\n\nIt actually originated in the famous saying:\n\n\u003e **GuTao[[1]](https://github.com/GuTaoZi)** tastes good, no need for salt.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froderickqiu%2Fgtwd-cs205-c-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froderickqiu%2Fgtwd-cs205-c-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froderickqiu%2Fgtwd-cs205-c-cpp/lists"}