Java 和 Quartz Composer 的接口
我编写了这个活动摄影应用程序,其中包含幻灯片放映等功能。 该应用程序用 Java 编写,是多平台的。 然而,在 Mac OS X 上,它通过在 Java 窗口中包含 QC 组件来利用 Quartz Composer 的图形功能。 该组件基于 Xcode 附带的示例。
用户可以为幻灯片选择一个“皮肤”,它由一个 .qtz 文件和一个描述 Java 应用程序可以传递给 QC 程序的参数的 XML 文件组成。 参数以 UDP 数据包形式传递。
这种方法的问题在于,它在 QC 项目中需要大量丑陋的 javascript 代码,并且构建这些项目的设计者不是程序员。
理想情况下,我想将参数绑定到 QC 项目中已发布的输入。 有没有人已经做过这类事情,或者可以给我指出一些有关 Java 和 QC 接口的信息? 提前致谢。
I have written this event photography application that features a slideshow among other things. The application written in Java and is multi-platform. However on Mac OS X, it takes advantage of the graphics abilities of Quartz Composer by including a QC component in a Java window. The component is based on the sample that comes with Xcode.
The user can select a “skin” for the slideshow, which consists of a .qtz file plus an XML file describing the parameters that the Java application can pass to to QC program. The parameters are passed in UDP packets.
The problem with this method is that it requires a lot of ugly javascript code in the QC project and the designer that builds these projects is not a programmer.
Ideally, I would like to bind the parameters to published inputs in the QC project. Has anyone already done this kind of stuff, or can point me to some information about interfacing Java and QC?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
基于 Objective-C 的 Mac OS API 中有一些绑定可以完成您想要的操作,但是我不知道如何在 Java 中访问这些绑定。
然而,Quartz Composer 支持 OpenSoundControl,它允许您通过 UDP 或 TCP 连接发送命名参数(浮点数、整数和字符串)。 然后,您的设计人员应该能够使用 Quartz Composer 的可视化编辑器将这些命名输入连接到他需要的任何补丁参数。
There are bindings in the Objective-C based Mac OS APIs to do what you want, however I don't know how you would access those in Java.
Quartz Composer however supports OpenSoundControl which allows you to send named parameters (Floats, ints, and Strings) over a UDP or TCP connection. Your designer then should be able to connect these named inputs to whatever patch parameters he needs using Quartz Composer's visual editor.
我自己没有这样做,但我假设您可以使用 JNI 从 java 应用程序访问已发布端口的 Objective-C 接口。
I haven't done this myself, but I assume you could use JNI to access the objective-c interface to the published ports from you java application.