{"id":19788668,"url":"https://github.com/ooesili/sorceress","last_synced_at":"2025-05-01T00:31:24.020Z","repository":{"id":51028899,"uuid":"340472582","full_name":"ooesili/sorceress","owner":"ooesili","description":"A Rust environment for sound synthesis and algorithmic composition.","archived":false,"fork":false,"pushed_at":"2021-03-22T19:24:42.000Z","size":213,"stargazers_count":110,"open_issues_count":1,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-05-03T19:33:55.575Z","etag":null,"topics":["audio","crates","music","rust","supercollider","synthesizer"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ooesili.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-19T19:43:30.000Z","updated_at":"2024-04-04T09:25:59.000Z","dependencies_parsed_at":"2022-09-11T10:03:06.371Z","dependency_job_id":null,"html_url":"https://github.com/ooesili/sorceress","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ooesili%2Fsorceress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ooesili%2Fsorceress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ooesili%2Fsorceress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ooesili%2Fsorceress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ooesili","download_url":"https://codeload.github.com/ooesili/sorceress/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224229785,"owners_count":17277240,"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","crates","music","rust","supercollider","synthesizer"],"created_at":"2024-11-12T06:28:16.811Z","updated_at":"2024-11-12T06:28:17.347Z","avatar_url":"https://github.com/ooesili.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sorceress\n\n[![built with nix](https://builtwithnix.org/badge.svg)](https://builtwithnix.org) [![Build Status](https://ooesili.semaphoreci.com/badges/sorceress/branches/master.svg)](https://ooesili.semaphoreci.com/projects/sorceress) [![Crates.io](https://img.shields.io/crates/v/sorceress.svg?style=flat-square)](https://crates.io/crates/sorceress) [![docs.rs docs](https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square)](https://docs.rs/sorceress) [![Gitter](https://badges.gitter.im/sorceress-rs/community.svg)](https://gitter.im/sorceress-rs/community?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n\nA Rust environment for sound synthesis and algorithmic composition, powered by [SuperCollider](https://supercollider.github.io/).\n\n![Sorceress](/assets/sorceress.svg)\n\n## Overview\n\nSorceress is a Rust crate that provides a creative coding environment for:\n\n* **Sound synthesis** - build audio synthesizers by connecting *unit generators* together into signal graphs. SuperCollider provides [hundreds of unit generators](https://doc.sccode.org/Browse.html#UGens) to choose from including things like wave generators, noise generators, filters, envelopes, compressors, resonators, physical simulations, Fourier transforms, and much more.\n\n* **Algorithmic composition** - write code to create music, anywhere from using code as a musical notation system to full-fledged generative composition where large scale structures of a music piece are determined by computational algorithms.\n\n### Why SuperCollider?\n\nSuperCollider is a powerful and mature platform for audio synthesis with decades of development effort behind it. SuperCollider's [Client and Server](https://doc.sccode.org/Guides/ClientVsServer.html) architecture lets us to leverage all of the features offered by SuperCollider's audio synthesis server, from Rust:\n\n* A real-time audio synthesis engine\n* A massive library of unit generators\n* Audio I/O with your operation system and sound card\n\n### Why Rust?\n\nThere are projects in many other programming languages for interacting with SuperCollider including [Overtone](https://overtone.github.io/), [Tidal](https://tidalcycles.org/), and [Sonic Pi](https://sonic-pi.net/). I really like programming in Rust and I could not find any such project using Rust so I started building Sorceress.\n\n## Example\n\nThis example plays a sine wave at 220 Hz for 1 second:\n\n```rust\nuse sorceress::{\n    server::{self, Result, Server},\n    synthdef::{encoder::encode_synth_defs, SynthDef},\n    ugen,\n};\nuse std::{thread::sleep, time::Duration};\n\nfn main() -\u003e Result\u003c()\u003e {\n    let server = Server::connect(\"127.0.0.1:57110\")?;\n\n    let sine_wave = SynthDef::new(\"sine_wave\", |_| {\n        ugen::Out::ar().channels(ugen::Pan2::ar().input(ugen::SinOsc::ar().freq(220)))\n    });\n    let encoded_synthdef = encode_synth_defs(vec![sine_wave]);\n    server.send_sync(server::SynthDefRecv::new(\u0026encoded_synthdef))?;\n\n    server.send(server::SynthNew::new(\"sine_wave\", 1))?;\n    sleep(Duration::from_secs(1));\n\n    server.reset()?;\n\n    Ok(())\n}\n```\n\n## Setup\n\nWith [cargo-edit](https://github.com/killercup/cargo-edit) installed run:\n\n```\n$ cargo add sorceress\n```\n\nYou must [install SuperCollider](https://supercollider.github.io/download) separately from the `sorceress` crate. \n\n**Note:** Sorceress does not run SuperCollider for you at this time, so you must boot a server yourself. The recommended way to do this by starting the server in **scide**, SuperCollider's built in IDE.\n\n## Documentation\n\nThe primary source of documentation for Sorceress is the [crate documentation on docs.rs](https://docs.rs/sorceress).\n\n## Contributing\n\nSee [CONTRIBUTING](CONTRIBUTING.md) for details on creating issues or making pull requests.\n\n## License\n\nSorceress is free software available under Version 3 the GNU General Public License. See [COPYING](COPYING) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fooesili%2Fsorceress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fooesili%2Fsorceress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fooesili%2Fsorceress/lists"}