{"id":16227218,"url":"https://github.com/tanepiper/mm-components","last_synced_at":"2025-03-19T13:31:00.702Z","repository":{"id":138204099,"uuid":"114677778","full_name":"tanepiper/mm-components","owner":"tanepiper","description":"Music Markups components","archived":false,"fork":false,"pushed_at":"2017-12-20T10:09:35.000Z","size":253,"stargazers_count":49,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T18:47:44.635Z","etag":null,"topics":["stenciljs","vanilla-javascript","vanilla-js","web-audio-api","webaudio","webcomponents"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/tanepiper.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":"2017-12-18T19:06:20.000Z","updated_at":"2023-08-11T01:20:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"7b374fc1-505e-414f-9978-aa64cb28ff6b","html_url":"https://github.com/tanepiper/mm-components","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanepiper%2Fmm-components","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanepiper%2Fmm-components/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanepiper%2Fmm-components/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanepiper%2Fmm-components/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tanepiper","download_url":"https://codeload.github.com/tanepiper/mm-components/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243989729,"owners_count":20379648,"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":["stenciljs","vanilla-javascript","vanilla-js","web-audio-api","webaudio","webcomponents"],"created_at":"2024-10-10T12:51:57.461Z","updated_at":"2025-03-19T13:31:00.697Z","avatar_url":"https://github.com/tanepiper.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Music Markup Web Components\n\nMusic Markup Web Components are built using [StencilJS](https://stenciljs.com) and distributed as web components (currently not using Shadow DOM);\n\nThe idea behind it is to provide some general markup for creating music instruments and visualisations using web components.\n\nCurrently there are three components:\n\n## `\u003cmm-context\u003e`\n\nThis is the top level tag to use to create the audio context. You can provide an `alternative-context` if you want to provide your own `AudioContext`, otherwise it will create a shared one for the application\n\n## `\u003cmm-keyboard\u003e`\n\nThe `\u003cmm-keyboard\u003e` tag provides an audio context for creating a keyboard element. It takes one property at the moment `oscillator-type`, which can be one of `sine, square, sawsawtooth or triangle`.  Inside you attach via a single slot any keys you want to bind.  The `mm-keyboard` listens for real keyboard events as well as events from virtual keys.  Currently it also provides the wave form picker.\n\n## `\u003cmm-key\u003e`\n\nThe `\u003cmm-key\u003e` tag is used to add a key to the keyboard.  You can provide it a `frequency` and `time` for the note, and you can also pass a `class-name` property to pass down custom classes.\n\nIn the current example it's used like this\n\n```html\n\u003cmm-context\u003e\n  \u003cmm-keyboard oscillator-type=\"sawtooth\"\u003e\n    \u003cmm-key class-name=\"white b\" frequency=\"174.614\" time=\"1\"\u003e\u003c/mm-key\u003e\n    \u003cmm-key class-name=\"black as\" frequency=\"184.997\" time=\"1\"\u003e\u003c/mm-key\u003e\n    \u003cmm-key class-name=\"white a\" frequency=\"195.998\" time=\"1\"\u003e\u003c/mm-key\u003e\n    \u003cmm-key class-name=\"black gs\" frequency=\"200.000\" time=\"1\"\u003e\u003c/mm-key\u003e\n    \u003cmm-key class-name=\"white g\" frequency=\"207.652\" time=\"1\"\u003e\u003c/mm-key\u003e\n    \u003cmm-key class-name=\"black fs\" frequency=\"233.082\" time=\"1\"\u003e\u003c/mm-key\u003e\n    \u003cmm-key class-name=\"white f\" frequency=\"246.942\" time=\"1\"\u003e\u003c/mm-key\u003e\n    \u003cmm-key class-name=\"white e\" frequency=\"261.626\" time=\"1\"\u003e\u003c/mm-key\u003e \u003c!-- Middle c --\u003e\n    \u003cmm-key class-name=\"black ds\" frequency=\"277.183\" time=\"1\"\u003e\u003c/mm-key\u003e\n    \u003cmm-key class-name=\"white d\" frequency=\"293.665\" time=\"1\"\u003e\u003c/mm-key\u003e\n    \u003cmm-key class-name=\"black cs\" frequency=\"311.127\" time=\"1\"\u003e\u003c/mm-key\u003e\n    \u003cmm-key class-name=\"white c\" frequency=\"329.628\" time=\"1\"\u003e\u003c/mm-key\u003e\n  \u003c/mm-keyboard\u003e\n\u003c/mm-context\u003e\n```\n\nFuture features include:\n\n- [ ] Adding support for MP3 Audio / WAV files\n- [ ] Provide theme support (Design different skins)\n- [ ] Add a visualiser for control\n- [ ] Support nested tags that provide node pass throughs\n\n## Getting Started\n\nTo start a new project mm-components uses the Stencil starter\n\n```bash\ngit clone https://github.com/tanepiper/mm-components.git mm-components\ncd mm-components\ngit remote rm origin\n```\n\nand run:\n\n```bash\nnpm install\nnpm start\n```\n\nTo view the build, start an HTTP server inside of the `/www` directory.\n\nTo watch for file changes during development, run:\n\n```bash\nnpm run dev\n```\n\nTo build the app for production, run:\n\n```bash\nnpm run build\n```\n\nTo run the unit tests once, run:\n\n```\nnpm test\n```\n\nTo run the unit tests and watch for file changes during development, run:\n\n```\nnpm run test.watch\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanepiper%2Fmm-components","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanepiper%2Fmm-components","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanepiper%2Fmm-components/lists"}