Output Power

scalf's picture


Similar to my post about outputting the frame rate of the composition to any device, is there a way to output the power remaining (seconds, percent, etc) of a computer as well?

I looked and there seemed to be no indication of such a patch. Would it be safe to say another java patch could be a way to output this info?

JavaQCView (Composition by dust)

Author: dust
License: MIT
Date: 2011.01.16
Compatibility: 10.6
Required plugins:

this isn't really a composition its basically a java jni lib to render quartz composer in java. eventually i will have the messaging system working so you can send messages back and forth from qc to java....

right now it just loads a qc comp from the repo and displays it in java. the principles are derived from a deprecated apple dev example "qc cocoa component" circa 2005.

even though this builds a binary java app, i don't see why the lib couldn't be used in processing to display a qc comp.

don't know if the helps anybody but i certainly like being able to load a qc comp in java. the next step is to get published inputs and outputs working.

GL Line Structure Patch and JavaScript

toneburst's picture

Is it possible to use a JavaScript patch to create a structure to feed into a GL Line Structure patch?

I've tried this as a basic test, which takes in input structure from the Kineme Audio Input patch and creates a struct of points from it:

// Initialise objects
var points = new Object();
var levels = new Object();
function (__structure outputStructure) main (__structure inputStructure, __number dummy)
   // Adjustment variables
   var dist = 0.05;      // Distance between points on X-axis
   var offsetx = 0.25;   // Offset on X-axis
   var scaley = 5.0;      // Scale points on Y-axis
   // Copy input levels struct if not undefined
   if(inputStructure != undefined)
      levels = inputStructure[0];
   // Create points structure
   for(i = 0; i < 64; i++) {
      px = dist * i - offsetx;      // Point X
      py = levels[i] * scaley;      // Point Y
      points[i] = Array(px,py,0);   // Point XYZ
   var result = new Object();
   result.outputStructure = points;
   return result;

The weird thing is, the items in the structure appearing at the output aren't in the right order. Any way to get the structure into the right order so that the resulting lines make some kind of sense?