v0.1.0
wave_generator
A dart package to generate audio wave data on the fly
30Likes 830-day downloads30Pub points
Platforms unavailable
A dart package to generate audio wave data on the fly.
English project snapshot. Visit GitHub for the latest content.
A dart package to generate audio wave data on the fly.
To use this plugin, add wave_generator as a dependency in your pubspec.yaml file.
import 'package:wave_generator/wave_generator.dart';
() async {
var generator = WaveGenerator(
/* sample rate */ 44100,
BitDepth.Depth8bit);
var note = Note(
/* frequency */ 220,
/* msDuration */ 3000,
/* waveform */ Waveform.Triangle,
/* volume */ 0.5);
var file = new File('output.wav');
List<int> bytes = List<int>();
await for (int byte in generator.generate(note)) {
bytes.add(byte);
}
file.writeAsBytes(bytes, mode: FileMode.append);
});
Or string together a sequence of Notes
await for (int byte in generator.generateSequence([note1, note2, note3 /* etc */])) {
// ...
}
Start with your use case, compare repository activity, and check the original project before adopting it.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗