{"id":17657948,"url":"https://github.com/atrinh0/chart-de-lune","last_synced_at":"2025-05-07T09:47:28.490Z","repository":{"id":135579754,"uuid":"519751855","full_name":"atrinh0/chart-de-lune","owner":"atrinh0","description":"Using Swift Charts and Voiceover Chart Descriptor to compose music. 🤯","archived":false,"fork":false,"pushed_at":"2022-07-31T20:30:43.000Z","size":2748,"stargazers_count":40,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-31T08:51:15.257Z","etag":null,"topics":["accessibility","charts","ios16","music","swift","swiftui","voiceover"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":false,"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/atrinh0.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":"2022-07-31T11:05:17.000Z","updated_at":"2025-03-21T19:02:59.000Z","dependencies_parsed_at":"2023-03-24T10:28:52.152Z","dependency_job_id":null,"html_url":"https://github.com/atrinh0/chart-de-lune","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/atrinh0%2Fchart-de-lune","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atrinh0%2Fchart-de-lune/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atrinh0%2Fchart-de-lune/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atrinh0%2Fchart-de-lune/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atrinh0","download_url":"https://codeload.github.com/atrinh0/chart-de-lune/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252854459,"owners_count":21814687,"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":["accessibility","charts","ios16","music","swift","swiftui","voiceover"],"created_at":"2024-10-23T14:43:45.680Z","updated_at":"2025-05-07T09:47:28.472Z","avatar_url":"https://github.com/atrinh0.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chart de lune 🎵\n\nUsing Swift Charts and Voiceover Chart Descriptor to compose music. 🤯\n\n\u003cimg src=\"assets/debussy.jpg\" width=\"200\"\u003e\n\nImage source: https://hadikarimi.com/portfolio/claude-debussy-1908\n\n### Output\n\n\u003e Note: Turn the **sound on** to hear the output\n\nSong: *Clair de Lune* by Claude Debussy\n\nhttps://user-images.githubusercontent.com/16542463/182043348-45721863-f3da-4c25-a7f5-37e597f6e787.mp4\n\n### Method\n\nA basic chart was used with a scale from 0-100 for simplicity.\n\nSetting the `AXDataSeriesDescriptor` `isContinuous` value to `true` will play the graph curves, what we want is discrete notes, so we set this value to `false`.\n\nUsing [Piano Key Detector](https://apps.apple.com/al/app/piano-key-detector/id1612601920) app, the discrete sounds were mapped to music notes across intervals of `5`.\n\n```Swift\n//        .init(time: 0, value: 0), // C5\n//        .init(time: 1, value: 5), // D5\n//        .init(time: 2, value: 10), // D5\n//        .init(time: 3, value: 15), // D#5\n//        .init(time: 4, value: 20), // E5\n//        .init(time: 5, value: 25), // E5\n//        .init(time: 6, value: 30), // F#5\n//        .init(time: 7, value: 35), // F#5\n//        .init(time: 8, value: 40), // G#5\n//        .init(time: 9, value: 45), // G#5\n//        .init(time: 10, value: 50), // A#5\n//        .init(time: 12, value: 55), // A#5\n//        .init(time: 13, value: 60), // B5\n//        .init(time: 14, value: 65), // C6\n//        .init(time: 15, value: 70), // C#6\n//        .init(time: 16, value: 75), // D6\n//        .init(time: 17, value: 80), // D#6\n//        .init(time: 18, value: 85), // E6\n//        .init(time: 19, value: 90), // F6\n//        .init(time: 20, value: 95), // F#6\n//        .init(time: 21, value: 100) // G6\n```\n\nOnce the notes were identified, a simple version of \u003ci\u003eClair de Lune\u003c/i\u003e was found, https://www.youtube.com/watch?v=ra08MiW8jLw\n\nThis was manually mapped to the music notes identified above, with pauses in the song where appropriate. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatrinh0%2Fchart-de-lune","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatrinh0%2Fchart-de-lune","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatrinh0%2Fchart-de-lune/lists"}