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).
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.
type 0 (STREAMINFO)
and type 4 (VORBIS_COMMENT)
.INI
format.verbatim predictor
with channel assignment of 2 channels: left
,STREAMINFO
and VORBIS_COMMENT
metadata, 16Bit int or 24Bit int.STREAMINFO
and VORBIS_COMMENT
metadata and verbatim subframes
.git
and GitHub
to manage our project, with clear commit messages.CLion
as our IDE, and have a unified code formatter ruleset.CMake
to build our project.PADDING
block, and it will be shortened if the previous block enlarges.APPLICATION
and SEEKTABLE
block.
MD5
signature and CRC
check support.Google Sanitizer
check with no warnings.cmake .
make
Should work for both Windows, macOS and Linux.
-h
or --help
: print help message-m
or --mode
:
w2f
for wav to flacf2w
for flac to wavf2r
for flac to rawr2f
for raw to flacr2w
for raw to wavw2r
for wav to raww2a
for wav to aiffa2w
for aiff to wava2f
for aiff to flacf2a
for flac to aiffa2r
for aiff to rawr2a
for raw to aifffm
for flac meta data readingfe
for flac meta data editing-i
or --input
: input file path-o
or --output
: output file path-t
or --temp
: manually indicate a preferred temp directoryraw
input files (e.g. r2w
, r2f
):
-c
or --config
: config ini file path for raw
filesw2f
mode only:
-v
or --velocity
: play speed
fe
mode (Flac meta data editing):
-mv
or --modify-vendor
: modify vendor
-mc
or --modify-comment
: modify comment
-ac
or --append-comment
: append comment
;
without space to split-rc
or --remove-comment
: remove comment
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 yourPathToOutputFlac
If 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
ProvidedDocuments/flac/mono.flac
ProvidedDocuments/raw/ovs.pcm
with ProvidedDocuments/raw/ovs.ini
ProvidedDocuments/wav/ovs.wav
ProvidedDocuments/flac/ovs.flac
ProvidedDocuments/wav/ovs.wav
ProvidedDocuments/metadata/application.flac
for APPLICATION
, ProvidedDocuments/raw/seektable.flac
SEEKTABLE
ProvidedDocuments/raw/padding.flac
for PADDING
blocksProvidedDocuments/aiff/mint16.aif
, ProvidedDocuments/aiff/mint24.aif
and ProvidedDocuments/aiff/mint32.aif
,ProvidedDocuments/aiff/ovs.aiff
ProvidedDocuments/wav/ovs.wav
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 start
The 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:
ConvertUTF
in the lib.
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.