Global Transcoder for WAV/FLAC/AIFF Data
By: @RoderickQiu, @CypherBruce, @SheepDoctor
This project is a command line tool for converting audio files between different formats built using C++, supporting RAW, WAV, FLAC and AIFF.
- Basic parts
- Metadata display & edit for FLAC,
type 0 (STREAMINFO)andtype 4 (VORBIS_COMMENT). - RAW to WAV convertor support, with file info contained in
INIformat. - WAV to FLAC convertor support, using
verbatim predictorwith channel assignment of2 channels: left, withSTREAMINFOandVORBIS_COMMENTmetadata, 16Bit int or 24Bit int. - FLAC to WAV convertor support, with
STREAMINFOandVORBIS_COMMENTmetadata andverbatim subframes. - WAV to RAW convertor support.
- Metadata display & edit for FLAC,
- Bonus parts
- Excellent Project Management.
- We use
gitandGitHubto manage our project, with clear commit messages. - We use
CLionas our IDE, and have a unified code formatter ruleset. - We use
CMaketo build our project.
- We use
- More Metadata Block Types.
- Parsing and editing support for
PADDINGblock, and it will be shortened if the previous block enlarges. - Parsing support for
APPLICATIONandSEEKTABLEblock.- Here we didn't implement editing support for application and seek table blocks, because we think it is only meaningful to edit them when the project also works as a FLAC editor.
- Parsing and editing support for
- Extreme Robustness.
MD5signature andCRCcheck support.- Exception handling and memory management optimizations.
- Passed
Google Sanitizercheck with no warnings.
- GUI.
- Support for all functions of this app.
- Should support both Windows and macOS.
- With an elegant and intuitive interface.
- More Audio Formats.
- Extra support for AIFF file format. Cool!
- Anything You Regard as "Bonus".
- Various playing speed!
- Slowing done or fasting the audio are supported!
- Various playing speed!
- Excellent Project Management.
- RoderickQiu (A): Project structure, Flac metadata reading and editing, AIFF conversion, GUI.
- SheepDoctor (A): RAW conversion, WAV to FLAC conversion, File IO supporter lib.
- Cypher-Bruce (A): FLAC to WAV conversion, CRC and MD5 signature support, File IO supporter lib.
cmake .
makeShould work for both Windows, macOS and Linux.
- For all modes:
-hor--help: print help message-mor--mode:w2ffor wav to flacf2wfor flac to wavf2rfor flac to rawr2ffor raw to flacr2wfor raw to wavw2rfor wav to raww2afor wav to aiffa2wfor aiff to wava2ffor aiff to flacf2afor flac to aiffa2rfor aiff to rawr2afor raw to aifffmfor flac meta data readingfefor flac meta data editing
-ior--input: input file path-oor--output: output file path-tor--temp: manually indicate a preferred temp directory
- For
rawinput files (e.g.r2w,r2f):-cor--config: config ini file path forrawfiles
- For
w2fmode only:-vor--velocity: play speed- argument is the speed of the output file
- a float number between 0 and 1
- For
femode (Flac meta data editing):-mvor--modify-vendor: modify vendor- argument is the vendor string to modify
-mcor--modify-comment: modify comment- need two arguments
- the first one is the comment content
- the second one is the comment index to alter
- need two arguments
-acor--append-comment: append comment- argument is the comment content to append
- if you have multiple comments, use a simple
;without space to split
-rcor--remove-comment: remove comment- argument is the comment index to remove
We suggest that testers use absolute paths for the input and output files.
# flac meta data editing
gtwd -m fe -i yourPathToInputFlac -o yourPathToOutputFlac -mv newVendor -ac yourCommentToAppend
# flac meta data reading
gtwd -m fm -i yourPathToInputFlac
# convert raw to wav (ovs.pcm)
gtwd -m r2w -i yourPathToInputRaw -o yourPathToOutputWav -c yourPathToCorrespondingIni
# convert wav to flac (ovs.wav)
gtwd -m w2f -i yourPathToInputWav -o yourPathToOutputFlac -mv yourVendor -ac yourCommentToAppend
# convert flac to wav (ovs.flac)
gtwd -m f2w -i yourPathToInputFlac -o yourPathToOutputWav
# convert flac to raw (ovs.flac)
gtwd -m f2r -i yourPathToInputFlac -o yourPathToOutputRaw
# convert: aiff to flac (ovs.aiff)
gtwd -m a2f -i yourPathToInputAiff -o yourPathToOutputFlacIf it is reported that "Error getting temp folder from environment variables" when executing gtwd, please manually
add -t flag to the command line to indicate a preferred temp folder. It is because the default temp folder is not
available in some environments.
gtwd -m f2w -i yourPathToInputFlac -o yourPathToOutputWav -t yourTempPath- Flac Metadata
ProvidedDocuments/flac/mono.flac
- RAW -> WAV -> FLAC
ProvidedDocuments/raw/ovs.pcmwithProvidedDocuments/raw/ovs.iniProvidedDocuments/wav/ovs.wav
- FLAC -> WAV -> RAW
ProvidedDocuments/flac/ovs.flacProvidedDocuments/wav/ovs.wav
- More Metadata
ProvidedDocuments/metadata/application.flacforAPPLICATION,ProvidedDocuments/raw/seektable.flacforSEEKTABLEandProvidedDocuments/raw/padding.flacforPADDINGblocks
- AIFF
ProvidedDocuments/aiff/mint16.aif,ProvidedDocuments/aiff/mint24.aifandProvidedDocuments/aiff/mint32.aif, each with different bit depthProvidedDocuments/aiff/ovs.aiff
- Different Velocity
ProvidedDocuments/wav/ovs.wav
- Robustness Test
ProvidedDocuments/robust/*
The GUI is built using Electron, so you need to install Node.js first, and run the following commands.
cd Gui
npm install
npm run startThe GUI is intuitive to use, and support all formats. View a screenshot of it at here.
If you are not using Windows x86_64 or macOS arm64, you may need to alternate the executive of gtwd used, which is
put under Gui/exec folder.
If you cannot install electron due to the limit of your network, you can use the following commands to indicate an
alternative source:
npm config set registry https://registry.npm.taobao.org
npm config set disturl https://npm.taobao.org/dist
npm config set electron_mirror https://npm.taobao.org/mirrors/electron/In this project, we have used the following open source libraries:
- Clipp - cross-platform command line interfaces for modern C++.
- Licensed under the MIT License.
- Copyright (c) 2017-2018 André MÜLLER.
- SimpleIni - allows an INI-style configuration file to be used on both
Windows and Linux/Unix.
- Licensed under the MIT License.
- Copyright (c) 2013-2023 Brodie THIESFIELD.
- Using
ConvertUTFin the lib.- Copyright 2001-2004 Unicode Inc.
Also, in this project, we use CLion as our IDE, thanks to their free educational plan.
Thanks for Prof. Feng ZHENG for his C++ class. Thanks for the efforts of TAs of the class, especially Kangrui CHEN and Site FAN.
You may ask why the project is named GTWD?
It actually originated in the famous saying:
GuTao[1] tastes good, no need for salt.