Comments (5)
I am currently using your library together with processing. Maybe I'll find the time to create a plugin but at the moment it's a bit a mess because I have to convert a PGraphics
to the BufferedImage
which takes a lot of CPU time.
from wayang.
Yes, it is unfortunate that Processing has its own hierarchy of nonstandard graphics objects. I would be surprised if they were full-featured enough to do the kinds of bit-striping needed to support the LCD in the Push 2, the way that the standard Java BufferedImage
class does. But if you find that is the case, you might be better off creating a separate library for working with the Push from Processing.
If you do ever go forward and create a plugin that embeds Wayang, though, I would love to hear about it.
from wayang.
I am using your library since two years in my own visual software (processing based), but now I wanted to rewrite the whole software and also modified your library. I will release it as a processing library (Ableton Push 2 for Processing), but I did some improvements.
For example it is now possible to use multiple Ableton Push devices, nothing is static anymore (which does not have to be static). I've also implemented a hotplug listener for LibUsb to check if the device is connected or not.
Here is an example code how to use the library (this
referees to the processing sketch):
PushContext pushContext = new PushContext(this);
pushContext.open();
if(pushContext.isPushAvailable())
{
PushDevice push = pushContext.getFirstDevice();
push.open();
// just a dummy example to send one frame
push.sendFrameAsync();
push.close();
}
pushContext.close();
PushContext
is the new manager for the push devices. It handles the libusb connection and the event thread.
Here you find the source code, if you are interested. Currently the processing sketch is not used and there are no methods to send a PImage
to processing. I will add these methods later.
Maybe it would make sense to split the processing related part and the plain old java part of the library.
from wayang.
So today I changed the structure of the API to be more extendable for different image sources. Now the processing related part is capsuled into two decorator classes, which do not effect the java part. Now the PushContext
does not need a processing sketch as constructor parameter and is just usable in any Java application.
The processing part was a bit trickier. I am using a JAVA2D
PGraphics object as screen buffer. This buffer uses 32bit RGB color mode, so I am convert the pixels into 16bit BGR and then masking them like you did.
from wayang.
That’s great stuff! When working with more than one Push 2, how do you figure out which MIDI interfaces go with which display USB ports? Ableton didn’t have an answer for that when I opened an issue about it.
from wayang.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wayang.