{"id":28435401,"url":"https://github.com/orukusaki/owl_patch","last_synced_at":"2026-03-04T22:31:11.519Z","repository":{"id":258960786,"uuid":"855295744","full_name":"orukusaki/owl_patch","owner":"orukusaki","description":"Write Rust patches for Owl Hardware","archived":false,"fork":false,"pushed_at":"2025-05-23T20:28:02.000Z","size":651,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-05T20:09:00.161Z","etag":null,"topics":["dsp","embedded-rust","modular-synthesizers","rust","synthesis"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/orukusaki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-09-10T16:32:16.000Z","updated_at":"2025-05-23T20:28:06.000Z","dependencies_parsed_at":"2025-05-09T20:38:14.505Z","dependency_job_id":null,"html_url":"https://github.com/orukusaki/owl_patch","commit_stats":null,"previous_names":["orukusaki/owl_patch"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/orukusaki/owl_patch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orukusaki%2Fowl_patch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orukusaki%2Fowl_patch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orukusaki%2Fowl_patch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orukusaki%2Fowl_patch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orukusaki","download_url":"https://codeload.github.com/orukusaki/owl_patch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orukusaki%2Fowl_patch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262783344,"owners_count":23363523,"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":["dsp","embedded-rust","modular-synthesizers","rust","synthesis"],"created_at":"2025-06-05T20:08:59.385Z","updated_at":"2026-03-04T22:31:11.379Z","avatar_url":"https://github.com/orukusaki.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Owl Patch\n[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/orukusaki/owl_patch/rust.yml)](https://github.com/orukusaki/owl_patch/actions)\n[![Docs](https://img.shields.io/docsrs/owl_patch)](https://docs.rs/owl_patch/latest/owl_patch/)\n[![crates.io](https://img.shields.io/crates/v/owl_patch.svg)](https://crates.io/crates/owl_patch)\n[![License](https://img.shields.io/crates/l/owl_patch.svg)](https://github.com/orukusaki/owl_patch/README.md)\n\nWrite Patches in [Rust](https://www.rust-lang.org/) for many [Rebel Technology](https://www.rebeltech.org/) devices based on the Owl2/3 modules.\n```rust\n#![no_main]\n#![no_std]\nextern crate alloc;\nuse alloc::boxed::Box;\nuse owl_patch::{\n    patch,\n    program_vector::{heap_bytes_used, ProgramVector},\n    sample_buffer::{BufferByChannel, ConvertFrom, ConvertTo},\n};\n\n#[patch(\"Example Patch\")]\nfn main(mut pv: ProgramVector) -\u003e ! {\n    let audio_settings = pv.audio.settings;\n    let mut buffer = BufferByChannel::\u003cf32\u003e::new(audio_settings.channels, audio_settings.blocksize);\n\n    pv.meta.set_heap_bytes_used(heap_bytes_used());\n    pv.audio.run(|input, output| {\n        buffer.convert_from(input);\n        // Do something clever with the samples in the buffer\n        buffer.convert_to(output);\n    });\n}\n```\n\n## Getting Started\n\n1. Make sure you have the `thumbv7em-none-eabihf` Rust target installed:\n```bash\nrustup target add thumbv7em-none-eabihf\n```\n\n2. Install `gcc-arm-none-eabi` and [FirmwareSender](\u003chttps://github.com/pingdynasty/FirmwareSender/releases\u003e). See the instructions on \u003chttps://github.com/RebelTechnology/OwlProgram\u003e for details.\n\n3. Create a new binary package using Cargo, and add this repo as a dependency:\n```toml   \n[dependencies]\nowl_patch = \"0.8.0\"\n```\nIt is also a good idea to add this to your Cargo.toml:\n```toml\n[profile.release]\ncodegen-units = 1\ndebug = 2\ndebug-assertions = false\nincremental = false\nlto = \"fat\"\nopt-level = 3\noverflow-checks = false\n\n[profile.release.package.\"*\"]\nopt-level = 3\n```\n\n4. Create a `.cargo/config.toml` file:\n```toml\n[build]\ntarget = \"thumbv7em-none-eabihf\"\n\n# For Owl 2\n[target.thumbv7em-none-eabihf]\nrustflags = [\n    \"-C\", \"link-arg=--nmagic\",\n    \"-C\", \"target-cpu=cortex-m4\",\n    \"-C\", \"link-arg=-Towl2.ld\",\n]\n\n# For Owl 3\n#[target.thumbv7em-none-eabihf]\n#rustflags = [\n#    \"-C\", \"link-arg=--nmagic\",\n#    \"-C\", \"target-cpu=cortex-m7\",\n#    \"-C\", \"link-arg=-Towl3.ld\",\n#]\n```\n\n5. Copy one of the [examples](https://github.com/orukusaki/owl_patch/tree/main/examples) into `src/main.rs`\n\n6. Build your patch\n```bash\ncargo build --release\n```\n\n7. Use `arm-none-eabi-objcopy` to get the final binary:\n```bash\narm-none-eabi-objcopy -O binary target/thumbv7em-none-eabihf/release/main target/thumbv7em-none-eabihf/release/main.bin\n```\n\n8. Use `FirmwareSender` to upload the patch to your device.\n\nFor further help, check the [docs](https://docs.rs/owl_patch/latest/owl_patch/).\n\n## Supported devices\nThe examples in this repo have been tested on a Befaco Lich using Owl2 and Owl3 modules.  They should work on others too, but I am unable to verify this.  To give you the best chance of success, make sure your device is running the latest Firmware.\n\n## Crate Features\n- `talc` (default): Uses the [talc](https://crates.io/crates/talc) crate as the global allocator. If you want to use a different allocator, turn this feature off with `default-features = false`\n- `fastmaths` (default): Enables the fast approximate maths functions in the [fastmaths](https://docs.rs/owl_patch/latest/owl_patch/fastmaths/index.html) module.\n- `vpo_fastmaths` (default): Use fastmaths functions in the [volts_per_octave](https://docs.rs/owl_patch/latest/owl_patch/volts_per_octave/index.html) module to convert between Volts and Frequencies quicker (but less accurately). Requires `fastmaths`.\n- `stack_hack` Uses a slightly dirty hack to get more stack memory - by default you only get 8Kb of stack (and \u003e 8Mb of Heap).\n\n## Project state\nExperimental, but already pretty usable.\n\n### Working features:\n- Output correctly linked binary including patch header\n- Safe API wrapper for the ProgramVector, allowing communication with the host OS\n- Register Patch with host OS\n- Global Allocator using [talc](https://crates.io/crates/talc)\n- Process Audio in `i32` and `f32` formats\n- Simple Audio Buffer implementation, supporting different formats and layouts\n- Register, get, and set Patch Parameters, with callback for button events\n- Send \u0026 Receive Midi messages\n- Debug / error messages\n- Get i/o callibration data for volts-per-octave conversions\n- Get system log / pow tables to perform fast maths functions\n- Load resource files\n- FFT init service calls \n- Write to screen buffer (on devices with a screen)\n\n### Todo List:\n- Wasm support\n- Faust support\n\n### Maybe pile:\n\n- Additional device support\n- Invert some params for `hardware_version == OWL_MODULAR_HARDWARE`\n- Support for lower checksum versions\n- Create a Cargo project template\n- Support for Colour screens\n\n## License\n\nLicensed under either of \u003ca href=\"LICENSE-APACHE\"\u003eApache License, Version 2.0\u003c/a\u003e\nor \u003ca href=\"LICENSE-MIT\"\u003eMIT license\u003c/a\u003e at your option.\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in this repository by you, as defined in the Apache-2.0 license,\nshall be dual licensed as above, without any additional terms or conditions.\n\n### Note\nThe authors of this repository are not affiliated with Rebel Technology. The Owl Platform and associated published code is their copyright.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forukusaki%2Fowl_patch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forukusaki%2Fowl_patch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forukusaki%2Fowl_patch/lists"}