Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ggwave

ggerganov230MIT0.4.0

Tiny data-over-sound library

data-over-sound, fsk, sound-library, ultrasound, ecc

readme

ggwave

Tiny data-over-sound library.

  • Audible and ultrasound transmissions available
  • Bandwidth of 8-16 bytes/s (depending on the transmission protocol)
  • Robust FSK modulation
  • Reed-Solomon based error correction

Example Usage

var factory = require('ggwave')

factory().then(function(ggwave) {
    // create ggwave instance with default parameters
    var parameters = ggwave.getDefaultParameters();
    var instance = ggwave.init(parameters);

    var payload = 'hello js';

    // generate audio waveform for string "hello js"
    var waveform = ggwave.encode(instance, payload, ggwave.TxProtocolId.GGWAVE_TX_PROTOCOL_AUDIBLE_FAST, 10);

    // decode the audio waveform back to text
    var res = ggwave.decode(instance, waveform);

    if (res != payload) {
        process.exit(1);
    }
});

changelog

Changelog

Unreleased

v0.4.0 - 2022-07-05

This release introduces some breaking changes in the C and C++ API!

Make sure to read the ggwave.h header for more information

  • Major refactoring in order to support microcontrollers (#65
  • Zero memory allocations during runtime
  • Do not include STL headers anymore
  • New, low-frequency, mono-tone (MT) protocols suitable for microcontrollers
  • Remove code-duplication for some of the examples
  • Better FFT implementation
  • Less memory usage
  • Bug fix in fixed-length payload decoding
  • Add Arduino and ESP32 examples
  • Support for Direct Sequence Spread (DSS)

v0.3.1 - 2021-11-27

  • Add interface for changing ggwave's internal logging (#52, #55)
  • Fix out-of-bounds access in ggwave_decode (#53)
  • Add C interface for selecting Rx protocols (#60)

v0.3.0 - 2021-07-03

  • Resampling fixes
  • Add soundMarkerThreshold parameter (f4fb02d)
  • Sampling rates are now consistently represented as float instead of int
  • Add option to query the generated tones (ba87a65)
  • Fix python build on Windows (d73b184)

v0.2.0 - 2021-02-20

  • Supported sampling rates: 6kHz - 96kHz
  • Variable-length payloads
  • Fixed-length payloads (no sound markers emitted)
  • Reed-Solomon based ECC
  • Ultrasound support