Skip to content

A plugin which adds MIDI file and soundfont audio support to the bevy engine via rustysynth.

License

0BSD and 2 other licenses found

Licenses found

0BSD
LICENSE-0BSD
Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

exvacuum/bevy_rustysynth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

bevy_rustysynth

Crates License Tag Build

A plugin which adds MIDI file and soundfont audio support to the bevy engine via rustysynth.

Compatibility

Crate Version Bevy Version
0.1-0.2 0.14

Installation

crates.io

[dependencies]
bevy_rustysynth = "0.2"

Using git URL in Cargo.toml

[dependencies.bevy_rustysynth]
git = "https://github.com/exvacuum/bevy_rustysynth.git"

Usage

In main.rs:

use bevy::prelude::*;
use bevy_rustysynth::*;

fn main() {
    App::new()
        .add_plugins((
            DefaultPlugins,
            RustySynthPlugin {
                soundfont: // Bring your own soundfont or enable the "hl4mgm" feature to use a terrible 4MB default
            }
        ))
        .run();
}

Then you can load and play a MIDI like any other audio file:

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.

About

A plugin which adds MIDI file and soundfont audio support to the bevy engine via rustysynth.

Resources

License

0BSD and 2 other licenses found

Licenses found

0BSD
LICENSE-0BSD
Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages