{"id":13455106,"url":"https://github.com/orhun/linuxwave","last_synced_at":"2025-05-15T20:00:51.531Z","repository":{"id":153374312,"uuid":"613608496","full_name":"orhun/linuxwave","owner":"orhun","description":"Generate music from the entropy of Linux 🐧🎵","archived":false,"fork":false,"pushed_at":"2024-10-24T09:38:21.000Z","size":539,"stargazers_count":532,"open_issues_count":12,"forks_count":15,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-10-29T17:31:31.103Z","etag":null,"topics":["entropy","linux","linuxwave","music","music-generation","music-generator","random","random-music","retrowave","synthwave","tune-generator","vaporwave","wav","waveform","waveform-generator","zig","zig-package","ziglang"],"latest_commit_sha":null,"homepage":"http://orhun.dev/linuxwave/","language":"Zig","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/orhun.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"orhun","patreon":"orhunp","custom":["https://www.buymeacoffee.com/orhun"]}},"created_at":"2023-03-13T22:57:52.000Z","updated_at":"2024-10-26T21:21:19.000Z","dependencies_parsed_at":"2023-10-17T04:38:34.473Z","dependency_job_id":"ed208aef-a609-4d0c-a100-631dd6b8b64d","html_url":"https://github.com/orhun/linuxwave","commit_stats":{"total_commits":132,"total_committers":3,"mean_commits":44.0,"dds":0.08333333333333337,"last_synced_commit":"c091885fe67b30e3c730bc465f42a1b720127397"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orhun%2Flinuxwave","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orhun%2Flinuxwave/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orhun%2Flinuxwave/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orhun%2Flinuxwave/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orhun","download_url":"https://codeload.github.com/orhun/linuxwave/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254414457,"owners_count":22067263,"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":["entropy","linux","linuxwave","music","music-generation","music-generator","random","random-music","retrowave","synthwave","tune-generator","vaporwave","wav","waveform","waveform-generator","zig","zig-package","ziglang"],"created_at":"2024-07-31T08:01:01.353Z","updated_at":"2025-05-15T20:00:51.071Z","avatar_url":"https://github.com/orhun.png","language":"Zig","readme":"# `linuxwave` 🐧🎵\n\n\u003cp align=\"center\"\u003e\n\n\u003cimg src=\"https://github.com/orhun/linuxwave/blob/main/assets/demo.gif\" alt=\"demo\"\u003e\n\u003ca href=\"https://github.com/orhun/linuxwave/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/orhun/linuxwave?style=flat\u0026amp;labelColor=1d1d1d\u0026amp;color=424242\u0026amp;logo=GitHub\u0026amp;logoColor=white\" alt=\"GitHub Release\"\u003e\u003c/a\u003e\n\u003ca href=\"https://codecov.io/gh/orhun/linuxwave\"\u003e\u003cimg src=\"https://img.shields.io/codecov/c/gh/orhun/linuxwave?style=flat\u0026amp;labelColor=1d1d1d\u0026amp;color=424242\u0026amp;logo=Codecov\u0026amp;logoColor=white\" alt=\"Coverage\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/orhun/linuxwave/actions?query=workflow%3A%22Continuous+Integration%22\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/orhun/linuxwave/ci.yml?branch=main\u0026amp;style=flat\u0026amp;labelColor=1d1d1d\u0026amp;color=424242\u0026amp;logo=GitHub%20Actions\u0026amp;logoColor=white\" alt=\"Continuous Integration\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/orhun/linuxwave/actions?query=workflow%3A%22Continuous+Deployment%22\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/orhun/linuxwave/cd.yml?style=flat\u0026amp;labelColor=1d1d1d\u0026amp;color=424242\u0026amp;logo=GitHub%20Actions\u0026amp;logoColor=white\u0026amp;label=deploy\" alt=\"Continuous Deployment\"\u003e\u003c/a\u003e\n\u003ca href=\"https://hub.docker.com/r/orhunp/gpg-tui\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/orhun/linuxwave/docker.yml?style=flat\u0026amp;labelColor=1d1d1d\u0026amp;color=424242\u0026amp;label=docker\u0026amp;logo=Docker\u0026amp;logoColor=white\" alt=\"Docker Builds\"\u003e\u003c/a\u003e\n\u003ca href=\"https://orhun.dev/linuxwave/docs/\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/orhun/linuxwave/pages.yml?style=flat\u0026amp;labelColor=1d1d1d\u0026amp;color=424242\u0026amp;logo=Zig\u0026amp;logoColor=white\u0026amp;label=docs\" alt=\"Documentation\"\u003e\u003c/a\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://www.youtube.com/watch?v=SLiEuvDmo8M\"\u003e\u003cstrong\u003eClick here to watch the demo!\u003c/strong\u003e\u003c/a\u003e\u003cbr\u003e\n\u003ca href=\"https://open.spotify.com/track/0ChxCDjs6wKnl8iu71K7yp\"\u003eListen to \"linuxwave\" on Spotify!\u003c/a\u003e\n\u003c/p\u003e\n\n\u003c/p\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n\n\u003c!-- vim-markdown-toc GFM --\u003e\n\n- [Motivation ✨](#motivation-)\n- [Installation 🤖](#installation-)\n  - [Build from source](#build-from-source)\n    - [Prerequisites](#prerequisites)\n    - [Instructions](#instructions)\n  - [Binary releases](#binary-releases)\n  - [Arch Linux](#arch-linux)\n  - [Void Linux](#void-linux)\n  - [Docker](#docker)\n    - [Images](#images)\n    - [Usage](#usage)\n    - [Building](#building)\n- [Examples 🎵](#examples-)\n- [Presets 🎹](#presets-)\n- [Usage 📚](#usage-)\n  - [`scale`](#scale)\n  - [`note`](#note)\n  - [`rate`](#rate)\n  - [`channels`](#channels)\n  - [`format`](#format)\n  - [`volume`](#volume)\n  - [`duration`](#duration)\n  - [`input`](#input)\n  - [`output`](#output)\n- [Funding 💖](#funding-)\n- [Contributing 🌱](#contributing-)\n- [License ⚖️](#license-)\n- [Copyright ⛓️](#copyright-)\n\n\u003c!-- vim-markdown-toc --\u003e\n\n\u003c/details\u003e\n\n## Motivation ✨\n\n- [Bash One Liner - Compose Music From Entropy in /dev/urandom](https://web.archive.org/web/20230122184930/https://blog.robertelder.org/bash-one-liner-compose-music/)\n  - ['Music' from /dev/urandom](https://news.ycombinator.com/item?id=11238247)\n\n## Installation 🤖\n\n### Build from source\n\n#### Prerequisites\n\n- [Zig](https://ziglang.org/download/) (`0.14`)\n\n#### Instructions\n\n1. Clone the repository.\n\n```sh\ngit clone https://github.com/orhun/linuxwave \u0026\u0026 cd linuxwave/\n```\n\n2. Build.\n\n```sh\nzig build --release=safe\n```\n\nBinary will be located at `zig-out/bin/linuxwave`. You can also run the binary directly via `zig build run`.\n\nIf you want to use `linuxwave` in your Zig project as a package, the API documentation is available [here](https://orhun.dev/linuxwave/docs).\n\n### Binary releases\n\nSee the available binaries for different targets from the [releases page](https://github.com/orhun/linuxwave/releases). They are automated via [Continuous Deployment](.github/workflows/cd.yml) workflow.\n\nRelease tarballs are signed with the following PGP key: [0xC0701E98290D90B8](https://keyserver.ubuntu.com/pks/lookup?search=0xC0701E98290D90B8\u0026op=vindex)\n\n### Arch Linux\n\n`linuxwave` can be installed from the [community repository](https://archlinux.org/packages/community/x86_64/linuxwave/) using [pacman](https://wiki.archlinux.org/title/Pacman):\n\n```sh\npacman -S linuxwave\n```\n\n### Void Linux\n\n`linuxwave` can be installed from official Void Linux package repository:\n\n```sh\nxbps-install linuxwave\n```\n\n### Docker\n\n#### Images\n\nDocker builds are [automated](./.github/workflows/docker.yml) and images are available in the following registries:\n\n- [Docker Hub](https://hub.docker.com/r/orhunp/linuxwave)\n- [GitHub Container Registry](https://github.com/orhun/linuxwave/pkgs/container/linuxwave)\n\n#### Usage\n\nThe following command can be used to generate `output.wav` in the current working directory:\n\n```sh\ndocker run --rm -v \"$(pwd)\":/app \"orhunp/linuxwave:${TAG:-latest}\"\n```\n\n#### Building\n\nCustom Docker images can be built from the [Dockerfile](./Dockerfile):\n\n```sh\ndocker build -t linuxwave .\n```\n\n## Examples 🎵\n\n**Default**: Read random data from `/dev/urandom` to generate a 20-second music composition in the A4 scale and save it to `output.wav`:\n\n```sh\nlinuxwave\n```\n\nOr play it directly with [mpv](https://mpv.io/) without saving:\n\n```sh\nlinuxwave -o - | mpv -\n```\n\nTo use the A minor blues scale:\n\n```sh\nlinuxwave -s 0,3,5,6,7,10 -n 220 -o blues.wav\n```\n\nRead from an arbitrary file and turn it into a 10-second music composition in the C major scale:\n\n```sh\nlinuxwave -i build.zig -n 261.63 -d 10 -o music.wav\n```\n\nRead from stdin via giving `-` as input:\n\n```sh\ncat README.md | linuxwave -i -\n```\n\nWrite to stdout via giving `-` as output:\n\n```\nlinuxwave -o - \u003e output.wav\n```\n\n## Presets 🎹\n\nGenerate a **calming music** with a sample rate of 2000 Hz and a 32-bit little-endian signed integer format:\n\n```sh\nlinuxwave -r 2000 -f S32_LE -o calm.wav\n```\n\nGenerate a **chiptune music** with a sample rate of 44100 Hz, stereo (2-channel) output and 8-bit unsigned integer format:\n\n```sh\nlinuxwave -r 44100 -f U8 -c 2 -o chiptune.wav\n```\n\nGenerate a **boss stage music** with the volume of 65:\n\n```sh\nlinuxwave -s 0,7,1 -n 60 -v 65 -o boss.wav\n```\n\nGenerate a **spooky low-fidelity music** with a sample rate of 1000 Hz, 4-channel output:\n\n```sh\nlinuxwave -s 0,1,5,3 -n 100 -r 1000 -v 55 -c 4 -o spooky_manor.wav\n```\n\nFeel free to [submit a pull request](CONTRIBUTING.md) to show off your preset here!\n\nAlso, see [this discussion](https://github.com/orhun/linuxwave/discussions/1) for browsing the music generated by our community.\n\n## Usage 📚\n\n```\nOptions:\n  -s, --scale \u003cSCALE\u003e            Sets the musical scale [default: 0,2,3,5,7,8,10,12]\n  -n, --note \u003cHZ\u003e                Sets the frequency of the note [default: 440 (A4)]\n  -r, --rate \u003cHZ\u003e                Sets the sample rate [default: 24000]\n  -c, --channels \u003cNUM\u003e           Sets the number of channels [default: 1]\n  -f, --format \u003cFORMAT\u003e          Sets the sample format [default: S16_LE]\n  -v, --volume \u003cVOL\u003e             Sets the volume (0-100) [default: 50]\n  -d, --duration \u003cSECS\u003e          Sets the duration [default: 20]\n  -i, --input \u003cFILE\u003e             Sets the input file [default: /dev/urandom]\n  -o, --output \u003cFILE\u003e            Sets the output file [default: output.wav]\n  -V, --version                  Display version information.\n  -h, --help                     Display this help and exit.\n```\n\n### `scale`\n\nSets the musical scale for the output. It takes a list of [semitones](https://en.wikipedia.org/wiki/Semitone) separated by commas as its argument.\n\nThe default value is `0,2,3,5,7,8,10,12`, which represents a major scale starting from C.\n\nHere are other examples:\n\n- A natural minor scale: `0,2,3,5,7,8,10`\n- A pentatonic scale starting from G: `7,9,10,12,14`\n- A blues scale starting from D: `2,3,4,6,7,10`\n- An octatonic scale starting from F#: `6,7,9,10,12,13,15,16`\n- Ryukyuan (Okinawa) Japanese scale: `4,5,7,11`\n\n### `note`\n\nThe `note` option sets the frequency of the note played. It takes a frequency in Hz as its argument.\n\nThe default value is `440`, which represents A4. You can see the frequencies of musical notes [here](https://pages.mtu.edu/~suits/notefreqs.html).\n\nOther examples would be:\n\n- A3 (220 Hz)\n- C4 (261.63 Hz)\n- G4 (392 Hz)\n- A4 (440 Hz) (default)\n- E5 (659.26 Hz)\n\n### `rate`\n\nSets the sample rate for the output in Hertz (Hz).\n\nThe default value is `24000`.\n\n### `channels`\n\nSets the number of audio channels in the output file. It takes an integer as its argument, representing the number of audio channels to generate. The default value is `1`, indicating mono audio.\n\nFor stereo audio, set the value to `2`. For multi-channel audio, specify the desired number of channels.\n\nNote that the more audio channels you use, the larger the resulting file size will be.\n\n### `format`\n\nSets the sample format for the output file. It takes a string representation of the format as its argument.\n\nThe default value is `S16_LE`, which represents 16-bit little-endian signed integer.\n\nPossible values are:\n\n- `U8`: Unsigned 8-bit.\n- `S16_LE`: Signed 16-bit little-endian.\n- `S24_LE`: Signed 24-bit little-endian.\n- `S32_LE`: Signed 32-bit little-endian.\n\n### `volume`\n\nSets the volume of the output file as a percentage from 0 to 100.\n\nThe default value is `50`.\n\n### `duration`\n\nSets the duration of the output file in seconds. It takes a float as its argument.\n\nThe default value is `20` seconds.\n\n### `input`\n\nSets the input file for the music generation. It takes a filename as its argument.\n\nThe default value is `/dev/urandom`, which generates random data.\n\nYou can provide _any_ type of file for this argument and it will generate music based on the contents of that file.\n\n### `output`\n\nSets the output file. It takes a filename as its argument.\n\nThe default value is `output.wav`.\n\n## Funding 💖\n\nIf you find `linuxwave` and/or other projects on my [GitHub profile](https://github.com/orhun) useful, consider supporting me on [GitHub Sponsors](https://github.com/sponsors/orhun) or [becoming a patron](https://www.patreon.com/join/orhunp)!\n\n[![Support me on GitHub Sponsors](https://img.shields.io/github/sponsors/orhun?style=flat\u0026logo=GitHub\u0026labelColor=424242\u0026color=1d1d1d\u0026logoColor=white)](https://github.com/sponsors/orhun)\n[![Support me on Patreon](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dorhunp%26type%3Dpatrons\u0026style=flat\u0026logo=Patreon\u0026labelColor=424242\u0026color=1d1d1d\u0026logoColor=white)](https://patreon.com/join/orhunp)\n[![Support me on Patreon](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dorhunp%26type%3Dpledges\u0026style=flat\u0026logo=Patreon\u0026labelColor=424242\u0026color=1d1d1d\u0026logoColor=white\u0026label=)](https://patreon.com/join/orhunp)\n\n## Contributing 🌱\n\nSee our [Contribution Guide](./CONTRIBUTING.md) and please follow the [Code of Conduct](./CODE_OF_CONDUCT.md) in all your interactions with the project.\n\n## License ⚖️\n\nLicensed under [The MIT License](./LICENSE).\n\n## Copyright ⛓️\n\nCopyright © 2023-2024, [Orhun Parmaksız](mailto:orhunparmaksiz@gmail.com)\n","funding_links":["https://github.com/sponsors/orhun","https://patreon.com/orhunp","https://www.buymeacoffee.com/orhun","https://www.patreon.com/join/orhunp)!","https://patreon.com/join/orhunp"],"categories":["Zig","Applications","应用","Software","Multimedia \u0026 Graphics"],"sub_categories":["Audio","音频","Synthesizers - Other","Audio Processing"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forhun%2Flinuxwave","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forhun%2Flinuxwave","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forhun%2Flinuxwave/lists"}