etdaw

ETDAW - Extrinsic Time-Domain Audio-Codec Workbench

This project contains an abstract framework for brute-forcing an audio encoding mechanism (extrinsically) for time-domain based audio-codecs.

The project can already be used as a high-quality encoder for the 1.2-bit SEA audio format with reasonable speed. This could already be useful for embedded projects, where compilation time is irrelevant in contrast to cpu speed and flash usage.

Installation

Compiling the project requires the crystal compiler.
Once the project was cloned, the target to compile can be chosen using shards build.

The project currently only exposes a single public target, which exposes the 1.2-bit SEA encoder:

git clone https://gitlab.com/BlobCodes/etdaw
cd etdaw
shards build etdaw-sea --release -Dexecution_context -Dpreview_mt

For other use-cases, see the development section.

Usage

The SEA encoder only accepts a single raw mono s16le PCM file as its argument and creates three new files right next to it. For a file audio.raw, the following files are created:

  • audio-enc.raw is the stream of raw SEA codepoints. The data returned would be usable as a single, endless SEA chunk without any headers or metadata (only scalefactors and residuals).

    All fields which are normally bit-packed are instead returned as a stream of 8-bit codepoints, where every 20th codepoint is in the 5-bit range (0-31, scalefactors and residual) and all other codepoints are in the 1-bit range (0-1, only residual).

    Additional work would be required to convert this file into a valid SEA file. However, the command etdaw-sea decode audio-enc.raw can be used in the meantime to prove the file is actually decodable.

  • audio-dec.raw is the decoded raw mono s16le audio stream which a decoder would have produced.

  • audio-dbg.raw is a stream of raw debugging codepoints.

    For the SEA codec, this results in a file inspecting the scalefactors used during encoding.

Development

The project is primarily intended for developing and evaluating low-bitrate time-domain codecs, which mandates a modular structure.

Encoding mechanisms, quality evaluation and audio decoding are completely separated from each other.

Audio codecs are only defined by their decoding function, no encoder is required. Audio codecs receive a stream of codepoints (0-255), whose value range is defined by the codec itself and can change over time.

For every codepoint, an audio decoder returns an audio sample, which is compared by a comparator. A comparator is a cumulative quality evaluation function, which tells the encoder how well a stream of decoded samples matches the reference samples.

The encoder uses an optimized brute-force algorithm for finding the optimal codepoints for encoding a stream of samples. To improve quality, the encoder uses a lookahead. For every sample, the optimal combination in a window of codepoints is calculated, moving the window one sample at a time.

Additional encoding mechanisms, quality-improving comparators or decoding algorithms are always welcome additions.

Contributing

  1. Fork it (https://github.com/your-github-user/etdaw/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Repository

etdaw

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 0
  • about 4 hours ago
  • January 22, 2026
License

European Union Public License 1.2

Links
Synced at

Fri, 23 Jan 2026 13:32:34 GMT

Languages