Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
inlets = 1;
outlets = 2;
var dir = "/Users/fimbul/Desktop/autovj/mov/";
var mov = {
"Rhodanthe* - Jumping!!" : dir + "Jumping!! Rhodanthe Music Clip (short).mov",
"Rhodanthe* - Your Voice" : dir + "Your Voice Rhodanthe Music Clip (short).mov"
};
var title = "";
function anything() {
var a = arrayfromargs(messagename, arguments);
var metadata = JSON.parse(a);
var tmp = metadata.icestats.source.artist + ' - ' + metadata.icestats.source.title;
if (title != tmp) {
title = tmp;
post(title, '\n');
outlet(1, mov[title]);
}
outlet(0, title);
}
{
"patcher" : {
"fileversion" : 1,
"appversion" : {
"major" : 7,
"minor" : 2,
"revision" : 4,
"architecture" : "x86",
"modernui" : 1
}
,
"rect" : [ 1314.0, 79.0, 1212.0, 1140.0 ],
"bglocked" : 0,
"openinpresentation" : 0,
"default_fontsize" : 12.0,
"default_fontface" : 0,
"default_fontname" : "Arial",
"gridonopen" : 1,
"gridsize" : [ 15.0, 15.0 ],
"gridsnaponopen" : 1,
"objectsnaponopen" : 1,
"statusbarvisible" : 2,
"toolbarvisible" : 1,
"lefttoolbarpinned" : 0,
"toptoolbarpinned" : 0,
"righttoolbarpinned" : 0,
"bottomtoolbarpinned" : 0,
"toolbars_unpinned_last_save" : 0,
"tallnewobj" : 0,
"boxanimatetime" : 200,
"enablehscroll" : 1,
"enablevscroll" : 1,
"devicewidth" : 0.0,
"description" : "",
"digest" : "",
"tags" : "",
"style" : "",
"subpatcher_template" : "",
"boxes" : [ {
"box" : {
"attr" : "vol",
"displaymode" : 2,
"fontface" : 0,
"fontname" : "Arial",
"fontsize" : 13.0,
"id" : "obj-19",
"lock" : 1,
"maxclass" : "attrui",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 266.0, 41.0, 95.0, 23.0 ],
"style" : "",
"text_width" : 47.0
}
}
, {
"box" : {
"id" : "obj-35",
"maxclass" : "message",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 210.0, 41.0, 37.0, 22.0 ],
"style" : "",
"text" : "clear"
}
}
, {
"box" : {
"id" : "obj-32",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 83.0, 314.0, 82.0, 22.0 ],
"style" : "",
"text" : "prepend read"
}
}
, {
"box" : {
"id" : "obj-6",
"maxclass" : "message",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 162.0, 41.0, 35.0, 22.0 ],
"style" : "",
"text" : "read"
}
}
, {
"box" : {
"id" : "obj-55",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "", "" ],
"patching_rect" : [ 166.5, 273.0, 55.0, 22.0 ],
"saved_object_attributes" : {
"filename" : "autovj",
"parameter_enable" : 0
}
,
"style" : "",
"text" : "js autovj"
}
}
, {
"box" : {
"id" : "obj-52",
"maxclass" : "newobj",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "bang" ],
"patching_rect" : [ 100.5, 88.0, 71.0, 22.0 ],
"style" : "",
"text" : "metro 1000"
}
}
, {
"box" : {
"id" : "obj-51",
"maxclass" : "toggle",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "int" ],
"parameter_enable" : 0,
"patching_rect" : [ 18.0, 39.0, 24.0, 24.0 ],
"style" : ""
}
}
, {
"box" : {
"id" : "obj-49",
"maxclass" : "newobj",
"numinlets" : 2,
"numoutlets" : 2,
"outlettype" : [ "", "" ],
"patching_rect" : [ 166.5, 246.0, 67.0, 22.0 ],
"style" : "",
"text" : "route body"
}
}
, {
"box" : {
"id" : "obj-37",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "dictionary", "" ],
"patching_rect" : [ 100.5, 216.0, 85.0, 22.0 ],
"style" : "",
"text" : "dict.strip body"
}
}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 13.0,
"id" : "obj-20",
"maxclass" : "newobj",
"numinlets" : 2,
"numoutlets" : 4,
"outlettype" : [ "dictionary", "", "", "" ],
"patching_rect" : [ 100.5, 182.0, 59.5, 23.0 ],
"saved_object_attributes" : {
"embed" : 0,
"parameter_enable" : 0
}
,
"style" : "",
"text" : "dict"
}
}
, {
"box" : {
"id" : "obj-18",
"maxclass" : "message",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 100.5, 119.0, 220.0, 22.0 ],
"style" : "",
"text" : "get http://127.0.0.1:8000/status-json.xsl"
}
}
, {
"box" : {
"id" : "obj-16",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "dictionary", "" ],
"patching_rect" : [ 100.5, 152.0, 47.0, 22.0 ],
"style" : "",
"text" : "maxurl"
}
}
, {
"box" : {
"id" : "obj-13",
"maxclass" : "jit.pwindow",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "", "" ],
"patching_rect" : [ 18.0, 419.0, 1280.0, 720.0 ]
}
}
, {
"box" : {
"id" : "obj-10",
"maxclass" : "message",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 119.5, 41.0, 33.0, 22.0 ],
"style" : "",
"text" : "stop"
}
}
, {
"box" : {
"id" : "obj-8",
"maxclass" : "message",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 75.5, 41.0, 34.0, 22.0 ],
"style" : "",
"text" : "start"
}
}
, {
"box" : {
"id" : "obj-3",
"maxclass" : "newobj",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "bang" ],
"patching_rect" : [ 18.0, 315.0, 58.0, 22.0 ],
"style" : "",
"text" : "metro 30"
}
}
, {
"box" : {
"id" : "obj-2",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "jit_matrix", "" ],
"patching_rect" : [ 18.0, 373.0, 121.0, 22.0 ],
"style" : "",
"text" : "jit.qt.movie 1280 720"
}
}
],
"lines" : [ {
"patchline" : {
"destination" : [ "obj-2", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-10", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-20", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-16", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-16", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-18", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-2", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-19", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-13", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-2", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-37", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-20", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-2", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-3", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-2", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-32", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-2", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-35", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-49", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-37", 1 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-55", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-49", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-3", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-51", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-52", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-51", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-18", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-52", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-32", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-55", 1 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-2", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-6", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-2", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-8", 0 ]
}
}
],
"dependency_cache" : [ {
"name" : "autovj.js",
"bootpath" : "~/Desktop/autovj",
"type" : "TEXT",
"implicit" : 1
}
],
"autosave" : 0
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment