https://github.com/ghztomash/waveforms-rs
Simple waveform generator in Rust 🦀
https://github.com/ghztomash/waveforms-rs
Last synced: about 1 year ago
JSON representation
Simple waveform generator in Rust 🦀
- Host: GitHub
- URL: https://github.com/ghztomash/waveforms-rs
- Owner: ghztomash
- Created: 2023-12-20T01:11:33.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-08T22:39:57.000Z (over 2 years ago)
- Last Synced: 2025-01-19T13:15:17.910Z (over 1 year ago)
- Language: Rust
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rust Waveform Generator
A simple Rust library for generating various waveforms.
## Features
- Generate different types of waveforms: Sine, Square, Triangle, Sawtooth, and Noise.
- Set waveform properties such as frequency, amplitude, DC offset, and waveform type.
- Process individual samples of the waveform.
## Usage
```rust
use waveforms_rs::Waveform;
fn main() {
// Create a sine waveform with default settings
let mut wave = Waveform::default();
// Process a couple samples of the waveform
let samples = [
wave.process(),
wave.process(),
wave.process(),
wave.process(),
];
println!("Generated samples: {:?}", samples);
}
```
## Running the examples
`cargo run --example basic`
`cargo run --example plot`