{"id":19364544,"url":"https://github.com/math2001/piano","last_synced_at":"2025-10-04T11:20:04.704Z","repository":{"id":74806842,"uuid":"226432899","full_name":"math2001/piano","owner":"math2001","description":null,"archived":false,"fork":false,"pushed_at":"2019-12-07T09:36:47.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-04T17:55:41.525Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/math2001.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-12-07T00:25:42.000Z","updated_at":"2019-12-07T09:36:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"826f1b66-0646-4b0a-92cf-324bbfc978ce","html_url":"https://github.com/math2001/piano","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/math2001/piano","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/math2001%2Fpiano","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/math2001%2Fpiano/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/math2001%2Fpiano/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/math2001%2Fpiano/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/math2001","download_url":"https://codeload.github.com/math2001/piano/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/math2001%2Fpiano/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278303066,"owners_count":25964640,"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-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":[],"created_at":"2024-11-10T07:37:40.374Z","updated_at":"2025-10-04T11:20:04.688Z","avatar_url":"https://github.com/math2001.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Piano\n\nSomething which will eventually be able to play some music of its own.\n\n## Convention\n\nIn tests, always print the actual result and then the expected one. I just\ncouldn't chose, so I went with alphabetical order.\n\n## Piece\n\nWhen using a `Piece`, `.Render` it and paste it as a comment above the `Note`\nfield. It makes it much easier to understand what's going on. For example:\n\n```go\np := \u0026Piece{\n    // 440: ***        \u003c- the .Render\n    // 523:  *\n    Notes: []Note{\n        Note{\n            Frequency: 440,\n            Duration:  frac.N(3),\n            Start:     frac.N(0),\n        },\n        Note{\n            Frequency: 523.25,\n            Duration:  frac.N(1),\n            Start:     frac.N(1),\n        },\n    },\n}\n```\n\n**Make sure they stay updated**\n\n(is there an easy thing to build which would automatically update those?)\n\n## TODO\n\n### Use `beep.Buffer` when generating waves\n\nWhen I generate a wave, I just use a regular `[][2]float64` which takes up a\nlot of room, as said in the wiki. I should probably use a `beep.Buffer` using a\n`.wav` format\n\n### Use a polynomial approximation instead of `math.Sin`\n\n(Measure the performance gain before doing that)\nThen, I could vary the precision and optimise it for the period of the wave\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmath2001%2Fpiano","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmath2001%2Fpiano","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmath2001%2Fpiano/lists"}