diff options
author | Silas Bartha <[email protected]> | 2024-09-09 18:44:52 -0400 |
---|---|---|
committer | Silas Bartha <[email protected]> | 2024-09-09 18:44:52 -0400 |
commit | 1e80d0684ddbcd3d995a05e572fafb181263758c (patch) | |
tree | c0b6b9366a00fe5148a691faac7e0cc8569e98a7 /README.md |
Initial Commit
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..e4e88b0 --- /dev/null +++ b/README.md @@ -0,0 +1,61 @@ +# bevy_rustysynth + +![Crates](https://img.shields.io/crates/v/bevy_rustysynth) +![License](https://img.shields.io/badge/license-0BSD%2FMIT%2FApache-blue.svg) +![Tag](https://img.shields.io/github/v/tag/exvacuum/bevy_rustysynth) +![Build](https://img.shields.io/github/actions/workflow/status/exvacuum/bevy_rustysynth/rust.yml) + +A plugin which adds MIDI file and soundfont audio support to the bevy engine via rustysynth. + +## Compatibility + +| Crate Version | Bevy Version | +|--- |--- | +| 0.1 | 0.14 | + +## Installation + +### crates.io +```toml +[dependencies] +bevy_rustysynth = "0.1" +``` + +### Using git URL in Cargo.toml +```toml +[dependencies.bevy_rustysynth] +git = "https://github.com/exvacuum/bevy_rustysynth.git" +``` + +## Usage + +In `main.rs`: +```rs +use bevy::prelude::*; +use bevy_rustysynth::*; + +fn main() { + App::new() + .add_plugins(( + DefaultPlugins, + RustysynthPlugin { + soundfont: // Bring your own soundfont + } + )) + .run(); +} +``` +Then you can load and play a MIDI like any other audio file: +```rs +let midi_handle = asset_server.load::<MidiAudio>("example.mid"); + +commands.spawn(AudioSourceBundle { + source: midi_handle, + ..Default::default() +}); +``` + +## License + +This crate is licensed under your choice of 0BSD, Apache-2.0, or MIT license. + |