{"id":15638703,"url":"https://github.com/cansik/artnet4j","last_synced_at":"2025-10-04T01:31:42.682Z","repository":{"id":57715530,"uuid":"71836684","full_name":"cansik/artnet4j","owner":"cansik","description":"Art-Net DMX over IP library for Java and Processing","archived":false,"fork":false,"pushed_at":"2024-05-31T07:46:11.000Z","size":245,"stargazers_count":97,"open_issues_count":13,"forks_count":21,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-01-16T16:21:34.403Z","etag":null,"topics":["artnet","dmx","java","light","network","processing","udp"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cansik.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":"2016-10-24T22:15:41.000Z","updated_at":"2024-12-31T08:19:50.000Z","dependencies_parsed_at":"2024-10-23T04:36:47.653Z","dependency_job_id":null,"html_url":"https://github.com/cansik/artnet4j","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cansik%2Fartnet4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cansik%2Fartnet4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cansik%2Fartnet4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cansik%2Fartnet4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cansik","download_url":"https://codeload.github.com/cansik/artnet4j/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235208974,"owners_count":18953004,"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":["artnet","dmx","java","light","network","processing","udp"],"created_at":"2024-10-03T11:22:32.559Z","updated_at":"2025-10-04T01:31:37.236Z","avatar_url":"https://github.com/cansik.png","language":"Java","readme":"# ArtNet for Java \u0026 Processing [![](https://github.com/cansik/artnet4j/workflows/Java%20CI/badge.svg)](https://github.com/cansik/artnet4j/actions?workflow=Java+CI) [![Build Status](https://travis-ci.org/cansik/artnet4j.svg?branch=master)](https://travis-ci.org/cansik/artnet4j) [![Build status](https://ci.appveyor.com/api/projects/status/811y7bud6srbdbny?svg=true)](https://ci.appveyor.com/project/cansik/artnet4j)\n\nArt-Net DMX over IP library for Java and Processing. This library adds a lot of features to the existing artnet4j project. Including support to read dmx data.\n\n## Features\n\n* Bind server to a custom network interface\n* Reuse of the socket address\n* Added ability to receive `OpDmx` packages\n* Send and receive via UDP broadcast.\n* Support for [Art-Ext](https://github.com/mattbeghin/Art-Ext-Poll) packages.\n* Support for [OpTimeCode](https://art-net.org.uk/structure/time-keeping-triggering/arttimecode/) packages (thanks to [@MrExplode](https://github.com/MrExplode))\n* Port selection of the UDP services\n* Supports java version `8` and `11` (oracle and openjdk)\n\n## Installation\n\nI recommend to install it from maven central. Otherwise it is also possible to use [github packages](packages), [jitpack.io](https://jitpack.io/#cansik/artnet4j) or just the [binary download](releases).\n\n### Maven\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ech.bildspur\u003c/groupId\u003e\n  \u003cartifactId\u003eartnet4j\u003c/artifactId\u003e\n  \u003cversion\u003e0.6.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Gradle\n\n```groovy\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    compile 'ch.bildspur:artnet4j:0.6.2'\n}\n```\n\n## Examples\nThe library adds a new class called `ArtNetClient`, which contains easy access to the underlaying Art-Net implementation.\n\n### Send Dmx Data\nTo send dmx data you have to create a new client. It is possible to skip the buffer creation by passing `null` to the constructor.\n\n```java\nbyte[] dmxData = new byte[512];\nArtNetClient artnet = new ArtNetClient();\nartnet.start();\n\n// set data\ndmxData[0] = 128;\n\n// send data to localhost on subnet 0 and universe 0\nartnet.unicastDmx(\"127.0.0.1\", 0, 0, dmxData);\n\nartnet.stop();\n```\n*Based on [SendDmxData](examples/SendDmxData/SendDmxData.pde)*\n\nIt is also possible to send the data via broadcast.\n\n```java\n// to broad cast data\nartnet.broadcastDmx(0, 0, dmxData);\n```\n\n### Read Dmx Data\nTo read data you have to create a new client and read the bytes from the buffer. Please be aware that you have to mask the bytes with `0xFF` (because they are signed).\n\n```java\nArtNetClient artnet = new ArtNetClient();\nartnet.start();\n\nbyte[] data = artnet.readDmxData(0, 0);\nSystem.out.println(\"First Byte: \" + data[0] \u0026 0xFF);\nartnet.start.stop();\n```\n\n*Based on [ReceiveDmxData](examples/ReceiveDmxData/ReceiveDmxData.pde)*\n\n### Select Port\nWhile creating the `ArtNetClient`, it is possible to select the specific ports for the **server** (incoming) and the **client** (outgoing).\n\n```java\nArtNetClient artnet = new ArtNetClient(new ArtNetBuffer(), 8000, 8000);\n```\n\n*Based on [SendOnSpecificPort](examples/SendOnSpecificPort/SendOnSpecificPort.pde)*\n\n### Bind Custom Network Interface\nIt is also possible to set a custom network interface. Here you see how to bind a custom network interface `en5` to the ArtNet server:\n\n```java\nNetworkInterface ni = NetworkInterface.getByName(\"en5\");\nInetAddress address = ni.getInetAddresses().nextElement();\n\nartnet.start(address);\n```\n\n### Receive Packet Events\nSometimes it is necessary to receive events when a new package was received. For this prupose you can get the underlaying **ArtNetServer** and add a new listener to it.\n\n```java\nartnet = new ArtNetClient();\n\n// add packet listener to server\nartnet.getArtNetServer().addListener(\n new ArtNetServerEventAdapter() {\n  @Override public void artNetPacketReceived(ArtNetPacket packet) {\n   println(\"new packet received!\");\n  }\n});\n\nartnet.start();\n```\n\n## About\nThe library is based on then [artnet4j](https://code.google.com/archive/p/artnet4j/) project.\n\nArt-Net by Artistic Licence allows for broadcasting DMX data via IP/UDP. This library is implementing the basic protocol for Java applications.\n\nCurrently supported core features are:\n\n* Device/node discovery \u0026 automatic updating of node configurations\n* Java typed descriptors of nodes \u0026 node properties\n* Abstracted DmxUniverse allowing direct pixel/channel access without having to deal with packets\n* JAXB configuration support for storing universe/node descriptions as XML\n* Listener support for various events\n* Sending of DMX512 data via UDP broadcast or unicast\n\nThis project is currently still in pre-alpha stage, so currently only source access via hg. Be also aware that large parts of the codebase are still undergoing major changes.\n\nNew features are developed by [Florian](https://github.com/cansik).\n","funding_links":[],"categories":["网络编程","Libraries","Libraries and frameworks"],"sub_categories":["Spring Cloud框架","Contributions","ArtNet Libraries"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcansik%2Fartnet4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcansik%2Fartnet4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcansik%2Fartnet4j/lists"}