Crates.io | xsynth-realtime |
lib.rs | xsynth-realtime |
version | |
source | src |
created_at | 2024-08-06 12:11:19.296086 |
updated_at | 2024-12-28 01:02:31.334757 |
description | A real-time MIDI synthesizer using XSynth. |
homepage | https://github.com/BlackMIDIDevs/xsynth |
repository | https://github.com/BlackMIDIDevs/xsynth |
max_upload_size | |
id | 1327204 |
Cargo.toml error: | TOML parse error at line 23, column 1 | 23 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
The real-time rendering module within XSynth. Currently it outputs audio using cpal
.
It uses an asynchronous event sending system for high performance and simple to use API.
You can find all the necessary documentation about the XSynth realtime API here: https://docs.rs/xsynth-realtime.
This is a very simple example about initializing an instance of the realtime synthesizer. For other more detailed use cases, visit the examples folder.
use xsynth_realtime::{RealtimeSynth, SynthEvent, ChannelEvent, ChannelAudioEvent};
fn main() {
// Will use the default configuration and
// default audio output device
let mut synth = RealtimeSynth::open_with_all_defaults();
// Will send a note on event in channel 0
synth.send_event(SynthEvent::Channel(
0,
ChannelEvent::Audio(ChannelAudioEvent::NoteOn {
key: 60,
vel: 127,
}),
));
// Will print the active voice count
println!("Voice Count: {}", synth.get_stats().voice_count());
// The synth is automatically dropped here
}