{"id":13437384,"url":"https://github.com/generativefm/generators","last_synced_at":"2025-03-19T06:31:08.444Z","repository":{"id":45997324,"uuid":"172132444","full_name":"generativefm/generators","owner":"generativefm","description":"A collection of generative music pieces for generative.fm","archived":false,"fork":false,"pushed_at":"2021-11-21T22:45:20.000Z","size":3649,"stargazers_count":560,"open_issues_count":4,"forks_count":59,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-10-29T21:11:40.161Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/generativefm.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}},"created_at":"2019-02-22T20:47:50.000Z","updated_at":"2024-10-19T21:54:55.000Z","dependencies_parsed_at":"2022-08-25T11:01:41.715Z","dependency_job_id":null,"html_url":"https://github.com/generativefm/generators","commit_stats":null,"previous_names":["generative-music/pieces-alex-bainter"],"tags_count":107,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generativefm%2Fgenerators","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generativefm%2Fgenerators/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generativefm%2Fgenerators/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generativefm%2Fgenerators/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/generativefm","download_url":"https://codeload.github.com/generativefm/generators/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243754012,"owners_count":20342537,"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-07-31T03:00:56.539Z","updated_at":"2025-03-19T06:31:04.300Z","avatar_url":"https://github.com/generativefm.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# pieces-alex-bainter\n\nA collection of generative music systems for [Generative.fm](https://generative.fm).\n\nThe documentation here is incomplete but hopefully it can help you get started. Please see [Generative.fm Open-source Objectives](https://gist.github.com/metalex9/11923b7faa710215dc7ab39a0e056a65).\n\n## Installation\n\nThe generative systems are available as [npm] packages. You can either install every system in one package or as separate packages for each system.\n\n### Installing every system in one package\n\nSee [@generative-music/pieces-alex-bainter](packages/pieces-alex-bainter/README.md#Installation).\n\n### Installing systems individually\n\nEach piece is available on [npm] as package in the `@generative-music` scope. For example, to install the system for \"Zed\", you would do:\n\n```bash\nnpm install @generative-music/piece-zed\n```\n\nIn general, a system's package name is the same as its title, written in lower-kebab-case and prefixed with `@generative-music/piece-`. Slashes (/) in titles are replaced with dashes (-). You can confirm a system's package name by looking at the `name` property of its `package.json` file. For example, the `package.json` file for \"Zed\" is located at [packages/piece-zed/package.json](packages/piece-zed/package.json), where the `name` is specified as `\"@generative-music/piece-zed\"`.\n\nYou will also need to install [Tone.js] if you haven't already (`npm install tone`).\n\n## Usage\n\n### As fast as possible\n\n1. You need to have the necessary audio sample files hosted somewhere accessible to the systems. These samples can be found in the [@generative-music/samples-alex-bainter](https://github.com/generative-music/samples-alex-bainter) repository. For local development, follow the instructions for [building](https://github.com/generative-music/samples-alex-bainter#building) and [serving](https://github.com/generative-music/samples-alex-bainter#serving-locally-with-docker) the files.\n\n2. Install necessary dependencies from [npm]:\n\n```bash\nnpm install @generative-music/web-library @generative-music/web-provider @generative-music/samples-alex-bainter\n```\n\n3. Run the system:\n\n```javascript\nimport activate from '@generative-music/piece-zed';\nimport createLibrary from '@generative-music/web-library';\nimport createProvider from '@generative-music/web-provider';\nimport getSampleIndex from '@generative-music/samples-alex-bainter';\nimport { Transport, Destination, context } from 'tone';\n\nconst provider = createProvider();\n\nconst sampleIndex = getSampleIndex({\n  format: 'wav', // also accepts 'mp3' and 'ogg'\n  host: 'http://localhost:6969', // host where sample files can be fetched from\n});\n\nconst sampleLibrary = createLibrary({\n  sampleIndex,\n  provider,\n});\n\n\n// activate the system (load sample files and allocate memory)\nactivate({\n  context,\n  sampleLibrary\n  destination: Destination, // connect the output of the system to Tone's Destination node\n}).then(([deactivate, schedule]) =\u003e {\n  const end = schedule(); // schedule a performance along Tone's Transport\n  Transport.start(); // begin playback\n\n  // stopping the system\n  Transport.stop(); // stop Tone's Transport\n  Transport.cancel(); // clear Tone's Transport\n  end(); // clear the performance\n\n  // releasing resources\n  deactivate();\n});\n```\n\n## 🍝 Regarding code quality (or lack thereof)\n\nMost of the systems within this repository were written during a period where I'd set an aggressive pace for myself to create new systems regularly and experiment. As a result, code quality suffered. Unfortunately, this means the code may be hard to understand, and I don't consider it to be a good example of how I typically build software. Someday, I'd love to improve these systems so they're easier for you to read.\n\nYou've been warned!\n\n[npm]: https://www.npmjs.com/\n[tone.js]: https://tonejs.github.io/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenerativefm%2Fgenerators","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenerativefm%2Fgenerators","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenerativefm%2Fgenerators/lists"}