{"id":29715615,"url":"https://github.com/ioannischtz/harmonic-motion-symphony","last_synced_at":"2025-07-24T05:37:45.246Z","repository":{"id":186301394,"uuid":"674732706","full_name":"ioannischtz/harmonic-motion-symphony","owner":"ioannischtz","description":"A JavaScript and Canvas app, that combines simple pendulum physics with Sound.","archived":false,"fork":false,"pushed_at":"2023-10-25T10:20:49.000Z","size":169,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-10-26T10:29:37.687Z","etag":null,"topics":["canvas2d","javascript","pendulum-simulation","web-audio-api"],"latest_commit_sha":null,"homepage":"https://ioannischtz.github.io/harmonic-motion-symphony/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ioannischtz.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}},"created_at":"2023-08-04T16:22:05.000Z","updated_at":"2023-10-26T10:29:37.688Z","dependencies_parsed_at":null,"dependency_job_id":"9c6b3ef6-bcde-49a3-a2a6-ba9d37d7f2d8","html_url":"https://github.com/ioannischtz/harmonic-motion-symphony","commit_stats":null,"previous_names":["ioannischtz/harmonic-motion-symphony"],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/ioannischtz/harmonic-motion-symphony","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioannischtz%2Fharmonic-motion-symphony","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioannischtz%2Fharmonic-motion-symphony/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioannischtz%2Fharmonic-motion-symphony/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioannischtz%2Fharmonic-motion-symphony/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ioannischtz","download_url":"https://codeload.github.com/ioannischtz/harmonic-motion-symphony/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioannischtz%2Fharmonic-motion-symphony/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266796977,"owners_count":23985516,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["canvas2d","javascript","pendulum-simulation","web-audio-api"],"created_at":"2025-07-24T05:37:41.482Z","updated_at":"2025-07-24T05:37:45.233Z","avatar_url":"https://github.com/ioannischtz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# harmonic-motion-symphony\n\nA JavaScript and Canvas app, that combines simple pendulum physics with Sound.\n\nIt simulates the pendulum motion using a modified\n[SHM (Simple Harmonic Motion) model](https://en.wikipedia.org/wiki/Simple_harmonic_motion),\nthat includes `weight` and `dumping` in the equation.\n\nEach time the Pendulum crosses the middle point (aka the `x` coordinate of the\norigin) a note is played. This creates interesting possibilities for music\ngeneration.\n\nThe goal of the project was to be as minimal as possible, hence the use of pure\nJavaScript with no dependencies, the Web Audio Api, and HTML5 Canvas.\n\nIn order to keep the code clean, I separated into es6-modules, which\nunfortunately means that I needed to add a `build` step, using `rollup` and\n`swc`.\n\nIn order to run the app, download or `clone` the project, run the commands:\n\n```\nnpm install\nnpm run build\n```\n\n, and then, open up `index.html` with a web browser of your choice. (The audio\nmight have some glitches when a note finishes on the FireFox browser)\n\nInspiration Credits:\n[Lucid Rhythms - \"Space Pendulum\"](https://www.youtube.com/watch?v=JhUcHtbDOWE)\nWhen I watched that video I knew I HAD to implement it.\n\n## TODO\n\n- [x] Create a functional prototype\n- [x] Implement a game menu\n  - [x] NEW GAME\n  - [x] RESUME\n  - [x] RESET\n  - [x] SETTINGS\n- [ ] Add user interactivity\n  - [ ] Select a pendulum\n  - [ ] Change properties of the pendulum\n  - [x] Add pendulums\n  - [ ] Remove pendulums\n  - [ ] Drag a pendulum while the simulation is running\n- [x] Implement the `AudioSource` class: - host multiple oscillators, - add ADSR\n      envelop - add detuning\n- [ ] Update the classes docs\n- [ ] Implement a glow halo effect for the pendulum weight, when it plays a note\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fioannischtz%2Fharmonic-motion-symphony","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fioannischtz%2Fharmonic-motion-symphony","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fioannischtz%2Fharmonic-motion-symphony/lists"}