{"id":13783710,"url":"https://github.com/jonasrmichel/rudiments","last_synced_at":"2025-05-11T19:31:27.937Z","repository":{"id":37558377,"uuid":"292610214","full_name":"jonasrmichel/rudiments","owner":"jonasrmichel","description":"A drum machine written in Rust","archived":false,"fork":false,"pushed_at":"2021-11-09T12:25:05.000Z","size":852,"stargazers_count":150,"open_issues_count":4,"forks_count":7,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-28T03:38:59.776Z","etag":null,"topics":["audio","drum-machine","percussion","playback","rhythm"],"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/jonasrmichel.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}},"created_at":"2020-09-03T15:34:34.000Z","updated_at":"2024-11-23T20:50:38.000Z","dependencies_parsed_at":"2022-08-27T13:54:36.871Z","dependency_job_id":null,"html_url":"https://github.com/jonasrmichel/rudiments","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/jonasrmichel%2Frudiments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasrmichel%2Frudiments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasrmichel%2Frudiments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasrmichel%2Frudiments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonasrmichel","download_url":"https://codeload.github.com/jonasrmichel/rudiments/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253621064,"owners_count":21937470,"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","drum-machine","percussion","playback","rhythm"],"created_at":"2024-08-03T19:00:29.018Z","updated_at":"2025-05-11T19:31:26.851Z","avatar_url":"https://github.com/jonasrmichel.png","language":"Rust","funding_links":[],"categories":["Standalone"],"sub_categories":[],"readme":"# rudiments\n\n[![Crates.io](https://img.shields.io/crates/v/rudiments?style=flat-square)](https://crates.io/crates/rudiments)\n[![Crates.io](https://img.shields.io/crates/d/rudiments?style=flat-square)](https://crates.io/crates/rudiments)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue?style=flat-square)](https://github.com/jonasrmichel/rudiments/blob/main/LICENSE-APACHE)\n[![License](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](https://github.com/jonasrmichel/rudiments/blob/main/LICENSE-MIT)\n\n*rudiments* is a step-sequencing drum machine that plays rhythm patterns using\naudio samples.\n\n\u003cimg src=\"https://github.com/jonasrmichel/rudiments/raw/main/assets/images/animal.png\" alt=\"muppets animal, personal use license\" width=\"150\"\u003e\n\n# Features\n\n- 16-step programmable measures.\n- Configurable per-track amplitude.\n- Adjustable tempo.\n- Playback once or on repeat.\n- Supports several audio file formats:\n    - MP3\n    - WAV\n    - Vorbis\n    - Flac\n\nPlayback and audio file decoding are handled by [rodio](https://github.com/RustAudio/rodio).\n\n# Usage\n\n```text\nrudiments 0.1.1\nA step-sequencing drum machine\n\nUSAGE:\n    rudiments [FLAGS] [OPTIONS] --pattern \u003cFILE\u003e --instrumentation \u003cFILE\u003e --samples \u003cDIRECTORY\u003e\n\nFLAGS:\n    -h, --help       Prints help information\n    -r, --repeat     Repeat the pattern until stopped\n    -V, --version    Prints version information\n\nOPTIONS:\n    -i, --instrumentation \u003cFILE\u003e    Path to instrumentation file\n    -p, --pattern \u003cFILE\u003e            Path to pattern file\n    -s, --samples \u003cDIRECTORY\u003e       Search path for sample files\n    -t, --tempo \u003cNUMBER\u003e            Playback tempo [default: 120]\n```\n\n## Inputs\n\nrudiments loads a *pattern* file and binds the pattern's tracks to audio files \nin a *samples* directory per an *instrumentation* file.\n\n### Pattern file (`--pattern`)\n\nEach line of a pattern file represents a track. There is no limit to the number\nof tracks in a pattern. A track contains an instrument name, a 16-step sequence,\nand an optional amplitude. The instrument name is an identifier and can only\nappear once per pattern. Each sequence represents a single measure in 4/4 time\ndivided into 16th note steps (`x` for *play* and `-` for *silent*).\nA track may optionally include an amplitude in the range of [0,1] inclusive.\nBy default, a track plays at full volume.\n\nThis is an example of a pattern file's contents for a standard 8th note groove\nwith the hi-hat track played at half volume.\n\n```text\nhi-hat |x-x-|x-x-|x-x-|x-x-| 0.5\nsnare  |----|x---|----|x---|\nkick   |x---|----|x---|----|\n```\n\n### Instrumentation file (`--instrumentation`)\n\nAn instrumentation file binds the instruments from a pattern file to audio\nsample files. Each line of an instrumentation file contains an instrument name\nand an audio file name. Each instrument may only appear once, but a single\naudio file may be bound to multiple instruments.\n\nThis is an example of an instrumentation file's contents that binds five\ninstruments to four audio sample files. \n\n\u003e Note that `tom.wav` is used for both `tom-1` and `tom-2`.\n\n```text\nhi-hat hh.wav\ntom-1  tom.wav\ntom-2  tom.wav\nsnare  snare.wav\nkick   kick.wav\n```\n\n### Samples directory (`--samples`)\n\nrudiments will look in the samples directory for the audio files listed in the \ninstrumentation file.\n\n### Tempo (`--tempo`)\n\nThis adjusts the playback tempo (aka beats per minute). The default playback \ntempo is 120.\n\n# Installation\n\nrudiments can be installed with `cargo`.\n\n```bash\n$ cargo install rudiments\n```\n\n# Upcoming features\n\n- [ ] Swing\n- [ ] Reverb\n- [ ] Record to output audio file\n- [ ] Pattern composition\n- [ ] Prevent clipping\n- [ ] Trigger inputs\n- [ ] Different time signatures\n- [ ] Terminal-based UI\n    - [ ] Playback tracking\n    - [ ] Live pattern editing\n\nMissing a fun or useful feature? Feel free to submit feature requests and PRs!\n\n# Demos :drum:\n\nThe [`assets`](./assets) directory contains several example patterns as well as\naudio samples from the [LinnDrum](https://en.wikipedia.org/wiki/LinnDrum) drum\nmachine.\n\n## Standard 8th note groove\n\n```bash\n$ rudiments \\\n    --pattern ./assets/patterns/standard \\\n    --instrumentation ./assets/instrumentations/linndrum \\\n    --samples ./assets/samples/linndrum \\\n    --repeat\n```\n\n## [Burning Up (Madonna)](https://www.youtube.com/watch?v=pufec0Hps00)\n\n```bash\n$ rudiments \\\n    --pattern ./assets/patterns/burning-up \\\n    --instrumentation ./assets/instrumentations/linndrum \\\n    --samples ./assets/samples/linndrum \\\n    --tempo 140 \\\n    --repeat\n```\n\n## [Thriller (Michael Jackson)](https://www.youtube.com/watch?v=sOnqjkJTMaA)\n\n```bash\n$ rudiments \\\n    --pattern ./assets/patterns/thriller \\\n    --instrumentation ./assets/instrumentations/linndrum \\\n    --samples ./assets/samples/linndrum \\\n    --tempo 118 \\\n    --repeat\n```\n\n## [Get a Little (Patrick Cowley)](https://www.youtube.com/watch?v=meZK5GlLy98)\n\n```bash\n$ rudiments \\\n    --pattern ./assets/patterns/get-a-little \\\n    --instrumentation ./assets/instrumentations/linndrum \\\n    --samples ./assets/samples/linndrum \\\n    --repeat\n```\n\n## [I Wanna Dance With Somebody (Whitney Houston)](https://www.youtube.com/watch?v=eH3giaIzONA)\n\n```bash\n$ rudiments \\\n    --pattern ./assets/patterns/i-wanna-dance-with-somebody \\\n    --instrumentation ./assets/instrumentations/linndrum \\\n    --samples ./assets/samples/linndrum \\\n    --tempo 118 \\\n    --repeat\n```\n\n## [Tom Sawyer (Rush)](https://www.youtube.com/watch?v=auLBLk4ibAk)\n\n```bash\n$ rudiments \\\n    --pattern ./assets/patterns/tom-sawyer \\\n    --instrumentation ./assets/instrumentations/linndrum \\\n    --samples ./assets/samples/linndrum \\\n    --tempo 180\n```\n\n## [Never Gonna Give You Up (Rick Astley)](https://www.youtube.com/watch?v=dQw4w9WgXcQ)\n\n```bash\n$ rudiments \\\n    --pattern ./assets/patterns/never-gonna-give-you-up \\\n    --instrumentation ./assets/instrumentations/linndrum \\\n    --samples ./assets/samples/linndrum\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonasrmichel%2Frudiments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonasrmichel%2Frudiments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonasrmichel%2Frudiments/lists"}