{"id":17342822,"url":"https://github.com/hay/bbgen","last_synced_at":"2025-03-27T09:19:20.433Z","repository":{"id":209886571,"uuid":"725168368","full_name":"hay/bbgen","owner":"hay","description":"A Python library for generative music","archived":false,"fork":false,"pushed_at":"2024-11-04T11:38:07.000Z","size":28655,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-01T14:17:02.142Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/hay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2023-11-29T15:22:14.000Z","updated_at":"2024-11-04T11:38:11.000Z","dependencies_parsed_at":"2024-11-04T12:36:29.481Z","dependency_job_id":null,"html_url":"https://github.com/hay/bbgen","commit_stats":{"total_commits":53,"total_committers":1,"mean_commits":53.0,"dds":0.0,"last_synced_commit":"372871ab13f05af5f087316d1f4c7ad30402ddce"},"previous_names":["hay/bbgen"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hay%2Fbbgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hay%2Fbbgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hay%2Fbbgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hay%2Fbbgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hay","download_url":"https://codeload.github.com/hay/bbgen/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245814747,"owners_count":20676808,"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":[],"created_at":"2024-10-15T16:07:10.822Z","updated_at":"2025-03-27T09:19:20.394Z","avatar_url":"https://github.com/hay.png","language":"Python","readme":"# bbgen\n\u003e A Python library for generative music\n\nBy [Hay Kranen](http://www.haykranen.nl)\n\n## Introduction\nbbgen is a Python library that allows you to make generative music. It is designed for non-realtime use: you shouldn't be using this library for a performance.\n\nbbgen is a wrapper around a couple of other libraries that perform most of the heavy lifting, this includes [pydub](https://pydub.com/) for composing / editing audio files, [pedalboard](https://spotify.github.io/pedalboard/index.html) for effects, [dawdreamer](https://github.com/DBraun/DawDreamer) for rendering midi and [isobar](https://ideoforms.github.io/isobar/) for generating the music.\n\nbbgen is most definitely a work in progress, and it desperately needs documentation which i haven't written yet. But you can look in the `test` folder for a couple of examples.\n\nI have ran bbgen on macOS 14.6.1 on an Apple M1 processor, and it also works on Linux (Ubuntu 22.04 LTS). I haven't tested on Windows yet.\n\nRender a MIDI file using a sampler like this:\n```python\nfrom bbgen.dreampler import Dreampler\nfrom mido import MidiFile, Message\nfrom pydub import AudioSegment\n\nmidi = MidiFile(\"satie.mid\")\nclarinet = AudioSegment.from_wav(\"clarinet.wav\")\n\nDreampler(clarinet).render_midi(midi).export(\"satie-dreampler.mp3\")\n```\n\n## Install\nYou probably need to install [Fluidsynth](https://www.fluidsynth.org/) and i guess ffmpeg as well.\n\nI've tested bbgen on Python 3.10. It might run on newer versions as well but i haven't tested that yet.\n\nThis is should work:\n1. Clone this repo\n```bash\ngit clone https://github.com/hay/bbgen.git\n```\n\n2. Make a virtual environment and install the `requirements.txt`\n```bash\npython -m venv env\nsource env/bin/activate\npip install -r requirements.txt\n```\n\n3. Try running the `samplers.py` example in `test` to showcase the three different samples available in bbgen:\n```bash\ncd test\npython samplers.py\n```\n\n## Things to do:\n* Documentation\n* Speed up the samplers (esp. `Dreampler` and `Dreamstrument` are very slow)\n\n## License\nMIT \u0026copy; [Hay Kranen](http://www.haykranen.nl)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhay%2Fbbgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhay%2Fbbgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhay%2Fbbgen/lists"}