{"id":13794607,"url":"https://github.com/danilofuchs/ForceTouchPlayer","last_synced_at":"2025-05-12T21:31:50.880Z","repository":{"id":50597841,"uuid":"301879215","full_name":"danilofuchs/ForceTouchPlayer","owner":"danilofuchs","description":"Play songs with a Macbook trackpad","archived":false,"fork":false,"pushed_at":"2024-04-27T19:35:04.000Z","size":1006,"stargazers_count":52,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-03T23:03:44.334Z","etag":null,"topics":["force-touch","hacktoberfest","macbook","trackpad","tune","vibration"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/danilofuchs.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}},"created_at":"2020-10-06T23:31:09.000Z","updated_at":"2024-05-25T08:04:19.000Z","dependencies_parsed_at":"2024-04-02T00:28:33.575Z","dependency_job_id":"44f5f57f-7ebb-4cac-907f-1f0a275ebbb9","html_url":"https://github.com/danilofuchs/ForceTouchPlayer","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danilofuchs%2FForceTouchPlayer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danilofuchs%2FForceTouchPlayer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danilofuchs%2FForceTouchPlayer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danilofuchs%2FForceTouchPlayer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danilofuchs","download_url":"https://codeload.github.com/danilofuchs/ForceTouchPlayer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225157000,"owners_count":17429698,"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":["force-touch","hacktoberfest","macbook","trackpad","tune","vibration"],"created_at":"2024-08-03T23:00:44.655Z","updated_at":"2024-11-18T09:30:43.250Z","avatar_url":"https://github.com/danilofuchs.png","language":"Swift","funding_links":[],"categories":["Swift"],"sub_categories":[],"readme":"# Force Touch Player\n\n\nhttps://github.com/danilofuchs/ForceTouchPlayer/assets/17657014/580bffd3-9dd9-4a46-88c4-fe3767380bc7\n\nhttps://user-images.githubusercontent.com/17657014/225430279-9b77017b-92ab-4ccc-9daf-7f62892f4e92.mp4\n\nVideo credits to [@fsmiamoto](https://github.com/fsmiamoto)\n\n\n\nDo you own a MacBook™?\n\nDo you think the builtin Stereo Speakers™ are too limiting?\n\nHave you realized your Force Touch™ Trackpad is not a huge glass button, but a huge glass **vibration motor**?\n\nYou see where I'm getting at. Introducing the Force Touch Player™ (not actually a trademark)\n\nPlay your favorite 8-bit tunes _in_ the trackpad, _with_ the trackpad, _on_ the trackpad. No speaker required!\n\n![Screenshot](./docs/screenshot.png)\n\n## Wow, very music\n\n- Download [ForceTouchPlayer.zip from latest release](https://github.com/danilofuchs/ForceTouchPlayer/releases)\n- Unzip the file\n- Right click the .app file and `Open`\n\n \u003cbr/\u003e\n  \u003cimg src=\"./docs/right-click.png\" alt=\"Right Click the .app file\" width=\"150\"/\u003e\n \u003cbr/\u003e\n\n- Click **Open** to confirm opening of untrusted sources (I'm sorry)\n  \u003cbr/\u003e\n  \u003cimg src=\"./docs/permission-1.png\" alt=\"Click Open\" width=\"500\"/\u003e\n  \u003cbr/\u003e\n\n- You may need to [allow it in settings as well](#permissions)\n- Run the app\n- Select a tune from the [Jukebox](#jukebox)\n- Click _Play_\n- **Don't take your finger off the trackpad after clicking play!**\n- Get your ears close to the trackpad (it will not bite you)\n- Sing the melody mentally, it may help\n\n_Needs macOS 10.15 (Catalina) or later_\n\n## Jukebox\n\n- Twinkle Twinkle Little Star™\n- Tetris Theme A™\n- Happy Birthday to You™\n- The Imperial March™\n- Hedwig's Theme™\n- Cantina Band™\n- DooM™ E1M1\n\n(that's it)\n\n## Whoa, Black magic™?\n\nNo witchery here.\n\nOnly a very, very bad usage of Creative Programming™\n\n\u003e In Brazil, we don't say _Programming_, we say _Gambiarra_ and I think it's beautiful\n\nIt turns out since the 2015 MacBook™ Pro™ with Retina Display™, the trackpad is **not** a button. It is instead a vibration motor (vibracall), not very different from your Nokia 3310™.\n\nApple's engineers figured that managing the clicky feel via software would lead to a much better experience and fewer defects instead of the old, outdated™, mechanical switch.\n\nSo they did.\n\nThey also figured developers would find it appealing for their apps to interact with users with awesome Haptic Feedback™. Clicky things everywhere!\n\nSo they did.\n\nThey thought people would only use it for good, for the almighty UX™\n\nSo they did.\n\nDo you realize what they created? Not only they made a noisy motor, but they also created a way to control it precisely (`NSHapticFeedbackPerformer`™)\n\nYou know what this means? They created a _speaker_\n\nWell, not really, but we can make it sound like one\n\n## Permissions\n\nI don't have an Apple certificate to publish this app the right way. For you to use the app, you must allow this app to be ran:\n\n### Allow in Finder™\n\n- Right click (or control+click) the App:\n\n \u003cimg src=\"./docs/right-click.png\" alt=\"Right Click the .app file\" width=\"150\"/\u003e\n\n- Click **Open**\n\n \u003cimg src=\"./docs/permission-1.png\" alt=\"Click Open\" width=\"400\"/\u003e\n\n### Allow in Settings™\n\n- Try to run the app once\n\n- Go to Settings \u003e Security \u0026 Privacy\n\n- Click **Open Anyway**\n\n \u003cimg src=\"./docs/permission-2.png\" alt=\"\" width=\"500\"/\u003e\n\n## Contributing\n\nAre you sure?\n\nThis can't be right. Really?\n\n### Your toolkit\n\nYou will need Xcode™ 11+ running on macOS™ 10.15 (Catalina) or later. This project uses SwiftUI with features introduced in 10.15.\n\nOpen the project on Xcode and run it using Debug scheme.\n\nThere may be some issues related to certificates. Make sure you have your development certificate configured correctly on Xcode.\n\nTo create a release build, run **Product** \u003e **Archive**.\n\n### Is there even a limit?\n\nWho knew trackpads had limits? I could only get it to work until around 220Hz (A3). If you are brave enough, maybe you can find a way to make it less bad™\n\n### Adding a new tune\n\nAny flute melody can work, as they only output a single note at a time. I recommend using parts from https://www.flutetunes.com/\n\nRemember to only use the lower keys (B0 -\u003e B2)\n\nSongs can be adapted from [`arduino-songs`](https://github.com/robsoncouto/arduino-songs). They are already curated and it is pretty much a task of copying and translating C arrays to Swift™\n\n### MIDI support?\n\nThat would be nice\n\n### iPhone™?\n\n🤔\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanilofuchs%2FForceTouchPlayer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanilofuchs%2FForceTouchPlayer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanilofuchs%2FForceTouchPlayer/lists"}