deep-symmetry / wayang Goto Github PK
View Code? Open in Web Editor NEWA Java library for displaying images on the Ableton Push 2
License: Eclipse Public License 2.0
A Java library for displaying images on the Ableton Push 2
License: Eclipse Public License 2.0
It looks like it might be fairly straightforward to create a Processing library that lets people draw to the Push screen, as long as I can figure out a way to have access to usb4java
without exporting all of that mess into the Processing environment. There are hints of that in the above-linked documentation, but it is not spelled out as clearly as I would like. Starting from the Eclipse template is probably easiest, even though that would require using Eclipse…
I am currently using your code for connecting to the push. But the frame rate is not that high (about 20 FPS). I think there are some speedup tweaks todo:
First of all, is there a reason why to just send 8 lines per transfer? Because the synchronous transfer is very time consuming. I just set the lines per transfer to 160 so we only have to send out the header and the data. Event he Ableton Push documentation does mention it:
"... the pixel data is typically sent using larger buffers, for example of 16kbytes each." (doc)
This fix brought up the frame rate to 27-28 FPS.
Second, it would be nice to have an asynchronous way to send the data. This could be done by replacing the existing submit method with following:
Transfer transfer = LibUsb.allocTransfer();
LibUsb.fillBulkTransfer(transfer, pushHandle, (byte) 0x01, headerBuffer, LibUsb::freeTransfer, null, 1000);
int result = LibUsb.submitTransfer(transfer);
if (result != LibUsb.SUCCESS) {
throw new LibUsbException("Transfer of frame header to Push 2 display failed", result);
}
I'm currently working on this but it is not yet finished so I don't have an FPS speed up.
Third, is there a reason why to send the header and the data as two buffers? Wouldn't it be better to send them all together as one big chunk? The documentation tells us to send two messages, but I'm not sure if it makes any difference for the device. Do you know something about this?
And thank you for developing this library, I was first doing it myself but then stumbled over your repo ;)
I tried doing some testing based on a report from an Ableton engineer, and it appears there are complications setting up libusb access to the display in Windows. Since I have no physical Windows hardware and am not a Windows developer, I am requesting help and Pull Requests documenting the steps people need to take to get this working under Windows.
It seems likely related to a FAQ in the libusb project.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.