Procedural rust macro for generating sine wave arrays
This provides a procedural macro for generating signed integer sine waves as
arrays. Mainly useful for producing different beep sounds on embedded systems
which might not even have alloc crate or a floating point unit.
Usage
Add as a dependency:
Amend your code:
use sine_wave;
// Sine wave defined as const:
sine_wave!
// Or define sine wave as a local variable:
let wave = sine_wave!;
These are both arrays of type [i16; 109]. Some rounding will be applied when
the sampling rate is not an exact multiple of the frequency.
For more knobs and examples, please see the documentation.
License
This crate is MIT licensed. See LICENSE for more information. Dependency crates have their own licenses.