{"id":13603640,"url":"https://github.com/RustAudio/wmidi","last_synced_at":"2025-04-11T22:31:47.834Z","repository":{"id":43753089,"uuid":"299505038","full_name":"RustAudio/wmidi","owner":"RustAudio","description":"Rust midi encoding and decoding library.","archived":false,"fork":false,"pushed_at":"2024-09-10T15:28:41.000Z","size":82,"stargazers_count":74,"open_issues_count":4,"forks_count":4,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-11-07T08:41:36.314Z","etag":null,"topics":["audio","enum","midi","real","realtime","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RustAudio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":"wmedrano","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-09-29T04:34:24.000Z","updated_at":"2024-10-25T07:01:10.000Z","dependencies_parsed_at":"2023-12-18T21:04:05.617Z","dependency_job_id":"93e2a6aa-2b5a-4cce-8623-ddefb2a01441","html_url":"https://github.com/RustAudio/wmidi","commit_stats":{"total_commits":66,"total_committers":7,"mean_commits":9.428571428571429,"dds":0.4242424242424242,"last_synced_commit":"707024cde6ed4841a061f06f8bfd2d74b531980b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RustAudio%2Fwmidi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RustAudio%2Fwmidi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RustAudio%2Fwmidi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RustAudio%2Fwmidi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RustAudio","download_url":"https://codeload.github.com/RustAudio/wmidi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248489704,"owners_count":21112622,"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":["audio","enum","midi","real","realtime","rust"],"created_at":"2024-08-01T19:00:27.914Z","updated_at":"2025-04-11T22:31:47.513Z","avatar_url":"https://github.com/RustAudio.png","language":"Rust","funding_links":["https://github.com/sponsors/wmedrano"],"categories":["Rust"],"sub_categories":[],"readme":"# WMIDI\n\nMidi encoding and decoding library.\n\n[![crates.io](https://img.shields.io/crates/v/wmidi.svg)](https://crates.io/crates/wmidi)\n[![docs.rs](https://docs.rs/wmidi/badge.svg)](https://docs.rs/wmidi)\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n[![Build Status](https://github.com/RustAudio/wmidi/workflows/Rust/badge.svg)](https://github.com/RustAudio/wmidi/actions?query=branch%3Amain)\n\n## Usage\n\n```rust\nuse std::convert::TryFrom;\n\n// Decoding messages from bytes.\nfn handle_midi_message(bytes: \u0026[u8]) -\u003e Result\u003c(), wmidi::FromBytesError\u003e {\n    let message = wmidi::MidiMessage::try_from(bytes)?;\n    if let wmidi::MidiMessage::NoteOn(_, note, val) = message {\n        let volume = u8::from(val) as u8 / 127.0;\n        println!(\"Singing {} at volume {}\", note, volume);\n    }\n    Ok(())\n}\n\n// Encoding messages to bytes.\nfn midi_to_bytes(message: wmidi::MidiMessage\u003c'_\u003e) -\u003e Vec\u003cu8\u003e {\n    let mut bytes = vec![0u8; message.bytes_size()];\n    message.copy_to_slice(bytes.as_mut_slice()).unwrap();\n    bytes\n}\n```\n\n## Features\n\n* Supports `no_std` environments.\n* No memory allocations (therefore realtime safe) for parsing and encoding.\n* No memory allocations for creating `MidiMessage`, except for `MidiMessage::OwnedSysEx`.\n\n## Testing \u0026 Benchmarking\n\n* Build with `cargo build`.\n* Test with `cargo test`.\n* Benchmark with `cargo bench`. The results will be under `./target/criterion/report/index.html`.\n\n## Changelog\n\n### 4.0.0\n\n* New ControlFunction type which simply wraps a U7.\n* Constants and documentation for all ControlFunction values.\n* Renumber Note enums/consts to be more consistent with midi; for example, C0 is now C1.\n\n### 3.1.0\n\n* Rename `MidiMessage::wire_size()` to `MidiMessage::bytes_size()`.\n* Introduce `MidiMessage::copy_to_slice()` method.\n\n### 3.0.0\n\n* Instances of U7 and U14 now have bounds checking.\n* Note is now an enum instead of a u8. Can be converted with `Note::try_from` and `u8::from`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRustAudio%2Fwmidi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRustAudio%2Fwmidi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRustAudio%2Fwmidi/lists"}