{"id":13433139,"url":"https://github.com/Deep-Symmetry/wayang","last_synced_at":"2025-03-17T10:33:34.132Z","repository":{"id":69707348,"uuid":"53745299","full_name":"Deep-Symmetry/wayang","owner":"Deep-Symmetry","description":"A Java library for displaying images on the Ableton Push 2","archived":false,"fork":false,"pushed_at":"2022-08-25T16:51:05.000Z","size":8578,"stargazers_count":34,"open_issues_count":1,"forks_count":8,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-08-01T02:32:35.333Z","etag":null,"topics":["ableton","graphics","java-library","push"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Deep-Symmetry.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":"Deep-Symmetry","liberapay":"deep-symmetry","custom":"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=LG5NLFL5T372W\u0026source=url"}},"created_at":"2016-03-12T17:53:42.000Z","updated_at":"2024-04-22T07:09:59.000Z","dependencies_parsed_at":"2023-06-03T09:45:50.071Z","dependency_job_id":null,"html_url":"https://github.com/Deep-Symmetry/wayang","commit_stats":null,"previous_names":["brunchboy/wayang"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Deep-Symmetry%2Fwayang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Deep-Symmetry%2Fwayang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Deep-Symmetry%2Fwayang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Deep-Symmetry%2Fwayang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Deep-Symmetry","download_url":"https://codeload.github.com/Deep-Symmetry/wayang/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221675298,"owners_count":16861860,"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":["ableton","graphics","java-library","push"],"created_at":"2024-07-31T02:01:21.576Z","updated_at":"2025-03-17T10:33:34.112Z","avatar_url":"https://github.com/Deep-Symmetry.png","language":"Java","funding_links":["https://github.com/sponsors/Deep-Symmetry","https://liberapay.com/deep-symmetry","https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=LG5NLFL5T372W\u0026source=url"],"categories":["Java"],"sub_categories":[],"readme":"# Wayang\n\nA Java library for displaying images on the\n[Ableton Push 2](https://www.ableton.com/en/push/) instrument. The\nproject name, which refers to\n[Javanese shadow puppet artistry](https://en.wikipedia.org/wiki/Wayang),\nwas chosen because it ties together the concepts Java, Push, and\nimages.\n\n[![Wayang photo](assets/Wayang_Pandawa.jpg)](https://commons.wikimedia.org/wiki/File:Wayang_Pandawa.jpg)\n\n[![License](https://img.shields.io/github/license/Deep-Symmetry/wayang?color=blue)](#license)\n\n## Dependencies\n\nWayang uses\n[usb4java](http://usb4java.org/quickstart/javax-usb.html) to\ncommunicate with the Push. For that to work, you need to have\n[libusb](http://libusb.info) installed on your system. If you are on\nLinux it is likely already installed, or you can follow their\ninstallation instructions. On the Mac, I recommend using\n[Homebrew](http://brew.sh) for all such needs; once it\u0026rsquo;s\ninstalled, you can simply run `brew install libusb`.\n\n\u003e If you are already using the\n\u003e [Open Lighting Architecture](https://www.openlighting.org/ola/),\n\u003e perhaps through\n\u003e [Afterglow](https://github.com/brunchboy/afterglow#afterglow), then\n\u003e libusb was installed as part of installing OLA.\n\n## Installing\n\nWayang is available through Maven Central, so to use it in your Maven\nproject, all you need is to include the appropriate dependency.\n\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.deepsymmetry/wayang/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.deepsymmetry/wayang)\n\nClick the **maven central** badge above to view the repository entry\nfor Wayang. The proper format for including the latest release as a\ndependency in a variety of tools, including Leiningen if you are using\nWayang from Clojure, can be found in the **Dependency Information**\nsection.\n\nIf you want to manually install Wayang, you can download the library\nfrom the [releases](https://github.com/brunchboy/wayang/releases) page\nand put it on your project\u0026rsquo;s class path. Be sure you get the\nright version: the much larger file whose name ends\n`-jar-with-dependencies.jar` contains everything you need to\ncommunicate with `libusb` from Java. The smaller Wayang jar is for use\nwith dependency management systems like Maven. You can download that\none if you\u0026rsquo;d like, but you will then also be responsible for\ninstalling [usb4java](http://usb4java.org/quickstart/javax-usb.html)\nand any transitive dependencies it might have.\n\n## Usage\n\nOnce you have the Wayang library added as a dependency, all you need\nto do to draw to the Push display is:\n\n```java\nimport org.deepsymmetry.Wayang;\n\n// ...\n\n        BufferedImage displayImage = Wayang.open();\n        Graphics2D graphics = displayImage.createGraphics();\n\n// Perform whatever Java2D drawing operations you'd like to using the graphics object,\n// then, whenever you want to update what is showing on the Push:\n\n        Wayang.sendFrame();\n\n// If you want to maximize your frame rate, you can also send frames asynchronously:\n\n        Wayang.sendFrameAsync();\n\n// If you are done talking to it, you can close, as below. Otherwise, the library cleans\n// up for you when the JVM exits.\n\n        Wayang.close();\n\n```\n\nThe image you get from `Wayang.open()` is 960 pixels wide and 160\npixels tall, the same as the physical display. These values are also\navailable as the constants `Wayang.DISPLAY_WIDTH` and\n`Wayang.DISPLAY_HEIGHT`.\n\nThis photo shows the results of running `mvn test` in the project directory:\n\n![Test display](assets/Test.jpg)\n\n## Capturing Your Interface\n\nYou can save animated GIF files to provide highly meaningful documentation for\nyour user interfaces, thanks to an embedded version of Elliot Kroo\u0026rsquo;s\n[GifSequenceWriter](http://elliot.kroo.net/software/java/GifSequenceWriter/).\nTo do that, just call:\n\n```java\nimport org.deepsymmetry.GifSequenceWriter;\n\n// ...\n\n    ImageOutputStream output =\n      new FileImageOutputStream(new File(\"out.gif\"));\n\n    // Pass in the displayImage buffer that Wayang.open() gave you, the\n    // interval in milliseconds at which you update the display, and\n    // whether you want the animation to loop:\n    GifSequenceWriter writer =\n      new GifSequenceWriter(output, displayImage, 50, true);\n\n// Then whenever you are calling Wayang.SendFrame(), also call:\n\n        writer.writeToSequence(displayImage);\n\n// When you are done recording, call:\n\n        writer.close();\n        output.close();\n\n```\n\nHere is an example recording from [Afterglow](https://github.com/brunchboy/afterglow#afterglow)\u0026rsquo;s\nPush 2 interface:\n\n![Test display](assets/Example.gif)\n\n## Push Interface Documentation\n\nAbleton has released the documentation that enabled the creation of\nthis library as its own project on Github,\n[push-interface](https://github.com/Ableton/push-interface).\n\n## Credits\n\nWyang photo by [Gunawan Kartapranata](https://commons.wikimedia.org/wiki/User:Gunkarta), used under the [Creative Commons](https://en.wikipedia.org/wiki/en:Creative_Commons) [Attribution-Share Alike 3.0 Unported](https://creativecommons.org/licenses/by-sa/3.0/deed.en) license.\n\nGifSequenceWriter by [Elliot Kroo](http://elliot.kroo.net/software/java/GifSequenceWriter/), used under the [Creative Commons](https://en.wikipedia.org/wiki/en:Creative_Commons) [Attribution 3.0 Unported License](http://creativecommons.org/licenses/by/3.0/).\n\n## License\n\n\u003ca href=\"http://deepsymmetry.org\"\u003e\u003cimg align=\"right\" alt=\"Deep Symmetry\"\n src=\"assets/DS-logo-github.png\" width=\"250\" height=\"150\"\u003e\u003c/a\u003e\n\nCopyright © 2016–2022 [Deep Symmetry, LLC](http://deepsymmetry.org)\n\nDistributed under the [Eclipse Public License\n2.0](https://opensource.org/licenses/EPL-2.0). By using this software\nin any fashion, you are agreeing to be bound by the terms of this\nlicense. You must not remove this notice, or any other, from this\nsoftware. A copy of the license can be found in\n[LICENSE.md](LICENSE.md) within this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDeep-Symmetry%2Fwayang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDeep-Symmetry%2Fwayang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDeep-Symmetry%2Fwayang/lists"}