Skip to content
This repository was archived by the owner on Aug 16, 2025. It is now read-only.

soaosdev/bevy_rustysynth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

bevy_rustysynth

Crates License

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

From version 0.4, the crate has undergone significant rewrites, and now works with the default bevy_audio backend (bevy_audio feature) OR bevy_kira_audio (kira feature)

Compatibility

Crate Version Bevy Version
0.6 0.16
0.5 0.15
0.2 0.14

Installation

crates.io

[dependencies]
bevy_rustysynth = "0.6"

Using git URL in Cargo.toml

[dependencies.bevy_rustysynth]
git = "https://git.soaos.dev/soaos/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:

bevy_audio Example

let midi_handle = asset_server.load::<MidiAudio>("example.mid");

commands.spawn(AudioPlayer(midi_handle));

bevy_kira_audio Example

let midi_handle = asset_server.load::<AudioSource>("example.mid");

audio.play(midi_handle);

License

This crate is licensed under your choice of 0BSD, Apache-2.0, or MIT license.

About

THIS IS A MIRROR

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

 
 
 

Contributors

Languages