{"id":17025829,"url":"https://github.com/platers/songpong","last_synced_at":"2025-08-21T03:32:13.609Z","repository":{"id":254941627,"uuid":"848009625","full_name":"platers/songpong","owner":"platers","description":"Synchronizing pong to music","archived":false,"fork":false,"pushed_at":"2024-09-02T23:13:47.000Z","size":57,"stargazers_count":59,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-12T18:23:48.118Z","etag":null,"topics":["constrained-optimization","convex-optimization","cvxpy","music-visualizer","pong"],"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/platers.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":"2024-08-27T00:53:51.000Z","updated_at":"2024-11-09T02:37:08.000Z","dependencies_parsed_at":"2024-08-27T04:02:49.156Z","dependency_job_id":"84f36029-e838-4235-99ff-4fa64c538a3f","html_url":"https://github.com/platers/songpong","commit_stats":null,"previous_names":["platers/songpong"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/platers%2Fsongpong","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/platers%2Fsongpong/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/platers%2Fsongpong/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/platers%2Fsongpong/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/platers","download_url":"https://codeload.github.com/platers/songpong/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230487843,"owners_count":18233865,"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":["constrained-optimization","convex-optimization","cvxpy","music-visualizer","pong"],"created_at":"2024-10-14T07:30:03.291Z","updated_at":"2024-12-19T19:07:17.710Z","avatar_url":"https://github.com/platers.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Song Pong\n\n[https://www.youtube.com/watch?v=V0AXprDRsUU](https://www.youtube.com/watch?v=lxjElOAgkPg)\n\n[Blog Post](https://victortao.substack.com/p/song-pong)\n\n![alt text](assets/ex_image.png)\n\nThis is a version of Pong that synchronizes the bounces with a song. You are free to use this code for any purpose, I only ask that you link back to this repo.\n\n## Basic Usage\n\n1. Install the required dependencies:\n\n   ```\n   pip install pygame numpy cvxpy mido\n   ```\n\n   Alternatively, you can use `uv` to install the dependencies:\n\n   ```\n   pip install uv\n   ```\n\n2. Run the game with a MIDI file:\n\n   ```\n   curl -o example_midi.mid https://bitmidi.com/uploads/72257.mid # download a MIDI file\n   python pong.py example_midi.mid\n   ```\n\n   Or using `uv run`:\n\n   ```\n   uv run pong.py example_midi.mid\n   ```\n\n3. For non-MIDI audio files, you need to provide a JSON file with note timings:\n\n   ```\n   python pong.py path/to/your/audio_file.mp3 --times_file path/to/your/times.json\n   ```\n\n   Or using `uv run`:\n\n   ```\n   uv run pong.py path/to/your/audio_file.mp3 --times_file path/to/your/times.json\n   ```\n\n   The JSON file should contain a list of times (in seconds) when the ball should hit a paddle.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplaters%2Fsongpong","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplaters%2Fsongpong","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplaters%2Fsongpong/lists"}