{"id":18041626,"url":"https://github.com/katyo/fluidlite-rs","last_synced_at":"2025-04-09T19:21:24.678Z","repository":{"id":39966916,"uuid":"238759327","full_name":"katyo/fluidlite-rs","owner":"katyo","description":"Rust bindings to fluidlite library","archived":false,"fork":false,"pushed_at":"2023-01-21T19:57:30.000Z","size":379,"stargazers_count":16,"open_issues_count":4,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-23T21:11:28.212Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/katyo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-06T18:45:14.000Z","updated_at":"2024-09-20T14:09:56.000Z","dependencies_parsed_at":"2023-02-12T12:31:25.800Z","dependency_job_id":null,"html_url":"https://github.com/katyo/fluidlite-rs","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katyo%2Ffluidlite-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katyo%2Ffluidlite-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katyo%2Ffluidlite-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katyo%2Ffluidlite-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/katyo","download_url":"https://codeload.github.com/katyo/fluidlite-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248095189,"owners_count":21046808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-30T16:11:06.117Z","updated_at":"2025-04-09T19:21:24.651Z","avatar_url":"https://github.com/katyo.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust fluidlite bindings\n\n[![github](https://img.shields.io/badge/github-katyo/fluidlite--rs-8da0cb.svg?style=for-the-badge\u0026logo=github)](https://github.com/katyo/fluidlite-rs)\n[![crate](https://img.shields.io/crates/v/fluidlite.svg?style=for-the-badge\u0026color=fc8d62\u0026logo=rust)](https://crates.io/crates/fluidlite)\n[![docs](https://img.shields.io/badge/docs.rs-fluidlite-66c2a5?style=for-the-badge\u0026logo=data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjxwYXRoIGZpbGw9IiNmNWY1ZjUiIGQ9Ik00ODguNiAyNTAuMkwzOTIgMjE0VjEwNS41YzAtMTUtOS4zLTI4LjQtMjMuNC0zMy43bC0xMDAtMzcuNWMtOC4xLTMuMS0xNy4xLTMuMS0yNS4zIDBsLTEwMCAzNy41Yy0xNC4xIDUuMy0yMy40IDE4LjctMjMuNCAzMy43VjIxNGwtOTYuNiAzNi4yQzkuMyAyNTUuNSAwIDI2OC45IDAgMjgzLjlWMzk0YzAgMTMuNiA3LjcgMjYuMSAxOS45IDMyLjJsMTAwIDUwYzEwLjEgNS4xIDIyLjEgNS4xIDMyLjIgMGwxMDMuOS01MiAxMDMuOSA1MmMxMC4xIDUuMSAyMi4xIDUuMSAzMi4yIDBsMTAwLTUwYzEyLjItNi4xIDE5LjktMTguNiAxOS45LTMyLjJWMjgzLjljMC0xNS05LjMtMjguNC0yMy40LTMzLjd6TTM1OCAyMTQuOGwtODUgMzEuOXYtNjguMmw4NS0zN3Y3My4zek0xNTQgMTA0LjFsMTAyLTM4LjIgMTAyIDM4LjJ2LjZsLTEwMiA0MS40LTEwMi00MS40di0uNnptODQgMjkxLjFsLTg1IDQyLjV2LTc5LjFsODUtMzguOHY3NS40em0wLTExMmwtMTAyIDQxLjQtMTAyLTQxLjR2LS42bDEwMi0zOC4yIDEwMiAzOC4ydi42em0yNDAgMTEybC04NSA0Mi41di03OS4xbDg1LTM4Ljh2NzUuNHptMC0xMTJsLTEwMiA0MS40LTEwMi00MS40di0uNmwxMDItMzguMiAxMDIgMzguMnYuNnoiPjwvcGF0aD48L3N2Zz4K)](https://docs.rs/fluidlite)\n[![LGPL-2.1](https://img.shields.io/badge/License-LGPL--2.1-brightgreen.svg?style=for-the-badge)](https://opensource.org/licenses/LGPL-2.1)\n[![CI](https://img.shields.io/github/actions/workflow/status/katyo/fluidlite-rs/ci.yml?branch=master\u0026style=for-the-badge\u0026logo=github-actions\u0026logoColor=white)](https://github.com/katyo/fluidlite-rs/actions?query=workflow%3ARust)\n\nThis project aims provide safe Rust bindings to [fluidlite](https://github.com/katyo/fluidlite) C library.\n\n\u003e FluidLite is a very light version of FluidSynth designed to be hardware,\n\u003e platform and external dependency independant. It only uses standard C libraries.\n\u003e\n\u003e It also adds support for SF3 files (SF2 files compressed with ogg vorbis)\n\u003e and an additional setting to remove the constraint of channel 9 (drums):\n\u003e fluid_settings_setstr(settings, \"synth.drums-channel.active\", \"no\");\n\u003e you can still select bank 128 on any channel to use drum kits.\n\u003e\n\u003e FluidLite keeps very minimal functionnalities (settings and synth),\n\u003e therefore MIDI file reading, realtime MIDI events and audio output\n\u003e must be implemented externally.\n\n## Crates\n\n* [__fluidlite__](https://crates.io/crates/fluidlite) Safe bindings\n* [__fluidlite-sys__](https://crates.io/crates/fluidlite-sys) Unsafe bindings (generated using bindgen)\n\n## Features\n\n * __bindgen__ Force generate bindings itself instead of use pre-generated\n * __builtin__ Force compile builtin _fluidlite_ C-library\n * __pkg-config__ Use _pkg-config_ to find installed libraries\n * __with-sf3__ Enable _SoundFont3_ support (SF2 with vorbis-encoded samples)\n * __with-stb__ Use _stb-vorbis_ decoder instead of _libvorbis_/_libogg_.\n * __shared__ Build shared _fluidlite_ C-library\n * __static__ Build static _fluidlite_ C-library\n\nWhen __pkg-config__ feature is used the installed __fluidlite__ library will be used if found. To force build and link builtin version you can use __builtin__ feature.\n\n## Example\n\n```rust\nuse std::{fs::File, io::Write};\nuse byte_slice_cast::AsByteSlice;\nuse fluidlite::{Settings, Synth};\n\nlet settings = Settings::new().unwrap();\n\nlet synth = Synth::new(settings).unwrap();\nsynth.sfload(\"sf_/Boomwhacker.sf3\", true).unwrap();\n\nlet mut buffer = [0i16; 44100 * 2];\nlet mut file = File::create(\"soundfont-sample.pcm\").unwrap();\n\nsynth.note_on(0, 60, 127).unwrap();\nsynth.write(buffer.as_mut()).unwrap();\nfile.write(buffer.as_byte_slice()).unwrap();\n\nsynth.note_off(0, 60).unwrap();\nsynth.write(buffer.as_mut()).unwrap();\nfile.write(buffer.as_byte_slice()).unwrap();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatyo%2Ffluidlite-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkatyo%2Ffluidlite-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatyo%2Ffluidlite-rs/lists"}