}
,
"classnamespace" : "box",
- "rect" : [ 86.0, 104.0, 1009.0, 647.0 ],
+ "rect" : [ 196.0, 129.0, 985.0, 642.0 ],
"bglocked" : 0,
"openinpresentation" : 0,
"default_fontsize" : 12.0,
"gridsnaponopen" : 1,
"objectsnaponopen" : 1,
"statusbarvisible" : 2,
- "toolbarvisible" : 1,
- "lefttoolbarpinned" : 0,
- "toptoolbarpinned" : 0,
- "righttoolbarpinned" : 0,
- "bottomtoolbarpinned" : 0,
- "toolbars_unpinned_last_save" : 0,
+ "toolbarvisible" : 0,
+ "lefttoolbarpinned" : 2,
+ "toptoolbarpinned" : 2,
+ "righttoolbarpinned" : 2,
+ "bottomtoolbarpinned" : 2,
+ "toolbars_unpinned_last_save" : 15,
"tallnewobj" : 0,
"boxanimatetime" : 200,
"enablehscroll" : 1,
"subpatcher_template" : "Untitled5_template",
"assistshowspatchername" : 0,
"boxes" : [ {
+ "box" : {
+ "id" : "obj-54",
+ "maxclass" : "newobj",
+ "numinlets" : 2,
+ "numoutlets" : 1,
+ "outlettype" : [ "signal" ],
+ "patcher" : {
+ "fileversion" : 1,
+ "appversion" : {
+ "major" : 8,
+ "minor" : 3,
+ "revision" : 3,
+ "architecture" : "x64",
+ "modernui" : 1
+ }
+,
+ "classnamespace" : "box",
+ "rect" : [ 59.0, 104.0, 640.0, 480.0 ],
+ "bglocked" : 0,
+ "openinpresentation" : 0,
+ "default_fontsize" : 14.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" : "Untitled5_template",
+ "assistshowspatchername" : 0,
+ "boxes" : [ {
+ "box" : {
+ "id" : "obj-42",
+ "maxclass" : "newobj",
+ "numinlets" : 1,
+ "numoutlets" : 1,
+ "outlettype" : [ "" ],
+ "patching_rect" : [ 50.0, 100.0, 95.0, 24.0 ],
+ "text" : "prepend open"
+ }
+
+ }
+, {
+ "box" : {
+ "id" : "obj-29",
+ "maxclass" : "newobj",
+ "numinlets" : 2,
+ "numoutlets" : 2,
+ "outlettype" : [ "signal", "bang" ],
+ "patching_rect" : [ 118.0, 134.0, 53.0, 24.0 ],
+ "text" : "sfplay~"
+ }
+
+ }
+, {
+ "box" : {
+ "comment" : "",
+ "id" : "obj-43",
+ "index" : 2,
+ "maxclass" : "inlet",
+ "numinlets" : 0,
+ "numoutlets" : 1,
+ "outlettype" : [ "" ],
+ "patching_rect" : [ 94.0, 36.0, 30.0, 30.0 ]
+ }
+
+ }
+, {
+ "box" : {
+ "comment" : "",
+ "id" : "obj-51",
+ "index" : 1,
+ "maxclass" : "inlet",
+ "numinlets" : 0,
+ "numoutlets" : 1,
+ "outlettype" : [ "int" ],
+ "patching_rect" : [ 28.0, 36.0, 30.0, 30.0 ]
+ }
+
+ }
+, {
+ "box" : {
+ "comment" : "",
+ "id" : "obj-53",
+ "index" : 1,
+ "maxclass" : "outlet",
+ "numinlets" : 1,
+ "numoutlets" : 0,
+ "patching_rect" : [ 118.0, 216.0, 30.0, 30.0 ]
+ }
+
+ }
+ ],
+ "lines" : [ {
+ "patchline" : {
+ "destination" : [ "obj-53", 0 ],
+ "source" : [ "obj-29", 0 ]
+ }
+
+ }
+, {
+ "patchline" : {
+ "destination" : [ "obj-29", 0 ],
+ "source" : [ "obj-42", 0 ]
+ }
+
+ }
+, {
+ "patchline" : {
+ "destination" : [ "obj-42", 0 ],
+ "source" : [ "obj-43", 0 ]
+ }
+
+ }
+, {
+ "patchline" : {
+ "destination" : [ "obj-29", 0 ],
+ "source" : [ "obj-51", 0 ]
+ }
+
+ }
+ ]
+ }
+,
+ "patching_rect" : [ 441.5, 482.0, 66.0, 22.0 ],
+ "saved_object_attributes" : {
+ "description" : "",
+ "digest" : "",
+ "fontsize" : 14.0,
+ "globalpatchername" : "",
+ "tags" : ""
+ }
+,
+ "text" : "p playback"
+ }
+
+ }
+, {
+ "box" : {
+ "channels" : 1,
+ "id" : "obj-38",
+ "lastchannelcount" : 0,
+ "maxclass" : "live.gain~",
+ "numinlets" : 1,
+ "numoutlets" : 4,
+ "outlettype" : [ "signal", "", "float", "list" ],
+ "parameter_enable" : 1,
+ "patching_rect" : [ 441.5, 512.0, 37.0, 107.0 ],
+ "saved_attribute_attributes" : {
+ "valueof" : {
+ "parameter_longname" : "out",
+ "parameter_mmax" : 6.0,
+ "parameter_mmin" : -70.0,
+ "parameter_shortname" : "out",
+ "parameter_type" : 0,
+ "parameter_unitstyle" : 4
+ }
+
+ }
+,
+ "varname" : "live.gain~"
+ }
+
+ }
+, {
+ "box" : {
+ "id" : "obj-37",
+ "maxclass" : "ezdac~",
+ "numinlets" : 2,
+ "numoutlets" : 0,
+ "patching_rect" : [ 488.0, 587.5, 32.0, 32.0 ]
+ }
+
+ }
+, {
+ "box" : {
+ "id" : "obj-34",
+ "maxclass" : "toggle",
+ "numinlets" : 1,
+ "numoutlets" : 1,
+ "outlettype" : [ "int" ],
+ "parameter_enable" : 0,
+ "patching_rect" : [ 413.0, 482.0, 22.0, 22.0 ]
+ }
+
+ }
+, {
+ "box" : {
+ "fontname" : "Lato",
+ "fontsize" : 13.0,
+ "id" : "obj-27",
+ "linecount" : 3,
+ "maxclass" : "comment",
+ "numinlets" : 1,
+ "numoutlets" : 0,
+ "patching_rect" : [ 101.0, 94.0, 426.0, 53.0 ],
+ "text" : "The Ocular Scores Morphograph object performs user-specified analyses on audio material. It allows the user to choose how these analyses will affect graphic objects in an output SVG score",
+ "textcolor" : [ 0.537254901960784, 0.537254901960784, 0.537254901960784, 1.0 ]
+ }
+
+ }
+, {
+ "box" : {
+ "fontname" : "Lato",
+ "fontsize" : 13.0,
+ "id" : "obj-23",
+ "maxclass" : "comment",
+ "numinlets" : 1,
+ "numoutlets" : 0,
+ "patching_rect" : [ 101.0, 68.0, 372.0, 22.0 ],
+ "text" : "analyze an audio buffer, and export graphic score elements"
+ }
+
+ }
+, {
+ "box" : {
+ "fontname" : "Lato",
+ "fontsize" : 36.0,
+ "id" : "obj-17",
+ "maxclass" : "comment",
+ "numinlets" : 1,
+ "numoutlets" : 0,
+ "patching_rect" : [ 101.0, 27.0, 611.0, 50.0 ],
+ "text" : "Ocular Scores, featuring Morphograph"
+ }
+
+ }
+, {
"box" : {
"id" : "obj-15",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "bang" ],
- "patching_rect" : [ 830.0, 499.5, 58.0, 22.0 ],
+ "patching_rect" : [ 859.0, 452.0, 58.0, 22.0 ],
"text" : "loadbang"
}
, {
"box" : {
"id" : "obj-12",
- "linecount" : 5,
+ "linecount" : 4,
"maxclass" : "message",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
- "patching_rect" : [ 830.0, 529.5, 114.0, 76.0 ],
- "text" : "/Users/jml/Documents/freelance/linda_bouchard/mgraph_project/mgraph_patchers/"
+ "patching_rect" : [ 859.0, 482.0, 114.0, 62.0 ],
+ "text" : "/Users/jml/Documents/freelance/linda_bouchard/mgraph_project/demo/"
}
}
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
- "patching_rect" : [ 298.5, 212.0, 22.0, 20.0 ],
+ "patching_rect" : [ 308.5, 208.0, 22.0, 20.0 ],
"text" : "3. ",
- "textcolor" : [ 1.0, 0.058823529411765, 0.058823529411765, 1.0 ]
+ "textcolor" : [ 0.988235294117647, 0.0, 0.996078431372549, 1.0 ]
}
}
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
- "patching_rect" : [ 806.0, 367.0, 150.0, 20.0 ],
+ "patching_rect" : [ 816.0, 363.0, 150.0, 20.0 ],
"text" : "1. define SVG write path",
- "textcolor" : [ 1.0, 0.058823529411765, 0.058823529411765, 1.0 ]
+ "textcolor" : [ 0.988235294117647, 0.0, 0.996078431372549, 1.0 ]
}
}
"numinlets" : 1,
"numoutlets" : 5,
"outlettype" : [ "", "", "", "", "" ],
- "patching_rect" : [ 780.0, 425.0, 90.0, 22.0 ],
+ "patching_rect" : [ 790.0, 421.0, 90.0, 22.0 ],
"text" : "regexp .+:(.+)"
}
"numoutlets" : 1,
"outlettype" : [ "bang" ],
"parameter_enable" : 0,
- "patching_rect" : [ 780.0, 367.0, 24.0, 24.0 ]
+ "patching_rect" : [ 790.0, 363.0, 24.0, 24.0 ]
}
}
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "", "bang" ],
- "patching_rect" : [ 780.0, 401.0, 90.0, 22.0 ],
+ "patching_rect" : [ 790.0, 397.0, 90.0, 22.0 ],
"text" : "opendialog fold"
}
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
- "patching_rect" : [ 316.5, 212.0, 51.0, 22.0 ],
+ "patching_rect" : [ 326.5, 208.0, 51.0, 22.0 ],
"text" : "process"
}
- }
-, {
- "box" : {
- "border" : 0,
- "filename" : "helpdetails.js",
- "id" : "obj-2",
- "ignoreclick" : 1,
- "jsarguments" : [ "morphograph" ],
- "maxclass" : "jsui",
- "numinlets" : 1,
- "numoutlets" : 1,
- "outlettype" : [ "" ],
- "parameter_enable" : 0,
- "patching_rect" : [ 14.0, 15.5, 637.0, 113.0 ]
- }
-
}
, {
"box" : {
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 55.0, 247.0, 109.0, 24.0 ],
- "text" : "713728."
+ "text" : "416990."
}
}
]
}
,
- "patching_rect" : [ 285.0, 596.5, 51.0, 22.0 ],
+ "patching_rect" : [ 295.0, 587.5, 51.0, 22.0 ],
"saved_object_attributes" : {
"description" : "",
"digest" : "",
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
- "patching_rect" : [ 566.0, 159.5, 150.0, 33.0 ],
+ "patching_rect" : [ 576.0, 155.5, 150.0, 33.0 ],
"text" : "2. dbl-click for example specification; edit",
- "textcolor" : [ 1.0, 0.058823529411765, 0.058823529411765, 1.0 ]
+ "textcolor" : [ 0.988235294117647, 0.0, 0.996078431372549, 1.0 ]
}
}
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
- "patching_rect" : [ 24.0, 307.0, 94.0, 20.0 ],
+ "patching_rect" : [ 34.0, 303.0, 94.0, 20.0 ],
"text" : "post information"
}
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
- "patching_rect" : [ 28.0, 190.0, 93.0, 20.0 ],
+ "patching_rect" : [ 37.0, 186.0, 93.0, 20.0 ],
"text" : "set active buffer"
}
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
- "patching_rect" : [ 183.0, 190.0, 110.0, 20.0 ],
+ "patching_rect" : [ 192.0, 186.0, 110.0, 20.0 ],
"text" : "set svg export path"
}
, {
"box" : {
"id" : "obj-26",
- "linecount" : 2,
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
- "patching_rect" : [ 418.0, 159.5, 76.0, 33.0 ],
+ "patching_rect" : [ 413.0, 186.0, 124.0, 20.0 ],
"text" : "load svg file from disk"
}
"numoutlets" : 1,
"outlettype" : [ "bang" ],
"parameter_enable" : 0,
- "patching_rect" : [ 389.0, 159.5, 24.0, 24.0 ]
+ "patching_rect" : [ 399.0, 155.5, 24.0, 24.0 ]
}
}
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
- "patching_rect" : [ 389.0, 237.0, 79.0, 22.0 ],
+ "patching_rect" : [ 399.0, 233.0, 79.0, 22.0 ],
"text" : "prepend load"
}
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "", "bang" ],
- "patching_rect" : [ 389.0, 212.0, 133.0, 22.0 ],
+ "patching_rect" : [ 399.0, 208.0, 133.0, 22.0 ],
"text" : "opendialog @types svg"
}
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
- "patching_rect" : [ 796.0, 367.0, 140.0, 87.0 ],
+ "patching_rect" : [ 796.0, 367.0, 143.0, 87.0 ],
"text" : "hint: the transform properties that you issue with the input dictionary determine the default dimensions for the generated shapes."
}
]
}
,
- "patching_rect" : [ 780.0, 310.152261123267749, 87.0, 22.0 ],
+ "patching_rect" : [ 790.0, 306.152261123267749, 122.0, 22.0 ],
"saved_object_attributes" : {
"description" : "",
"digest" : "",
"tags" : ""
}
,
- "text" : "p mapping_api"
+ "text" : "p \"mapping api / info\""
}
}
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
- "patching_rect" : [ 107.0, 549.0, 95.0, 22.0 ],
+ "patching_rect" : [ 117.0, 540.0, 95.0, 22.0 ],
"text" : "prepend replace"
}
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
- "patching_rect" : [ 39.0, 486.0, 85.0, 22.0 ],
+ "patching_rect" : [ 49.0, 474.0, 85.0, 22.0 ],
"text" : "prepend prefix"
}
"numinlets" : 0,
"numoutlets" : 1,
"outlettype" : [ "" ],
- "patching_rect" : [ 39.0, 457.0, 80.0, 22.0 ],
+ "patching_rect" : [ 49.0, 445.0, 80.0, 22.0 ],
"text" : "r morphopath"
}
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 0,
- "patching_rect" : [ 798.0, 467.652261123267749, 82.0, 22.0 ],
+ "patching_rect" : [ 808.0, 575.652261123267749, 82.0, 22.0 ],
"text" : "s morphopath"
}
"numinlets" : 0,
"numoutlets" : 1,
"outlettype" : [ "" ],
- "patching_rect" : [ 170.0, 159.5, 80.0, 22.0 ],
+ "patching_rect" : [ 180.0, 155.5, 80.0, 22.0 ],
"text" : "r morphopath"
}
"box" : {
"autopopulate" : 1,
"id" : "obj-25",
- "items" : [ "Brahms_4.wav", ",", "Koonitz.wav" ],
+ "items" : [ "Allora_1_prt1.aif", ",", "BassGesture.aif", ",", "BowedCymbalNORM.wav", ",", "Brahms_4.wav", ",", "Calzadilla_1.aif", ",", "Coda_Box3_a.aif", ",", "Cymbal_onHead2.wav", ",", "Koonitz.wav", ",", "LoriFreedman_Improv4.wav", ",", "Meandre_1.aif", ",", "Pointillistic.aif", ",", "ReceidingSimple.aif", ",", "Scen2Box(a).aif", ",", "scene 3-box 4.aif", ",", "SustainedTextured_Crackel-Mix.aif", ",", "tongue6.wav", ",", "tongue7_FH.wav", ",", "TrombDrum.wav" ],
"maxclass" : "umenu",
"numinlets" : 1,
"numoutlets" : 3,
"outlettype" : [ "int", "", "" ],
"parameter_enable" : 0,
- "patching_rect" : [ 39.0, 521.0, 155.0, 22.0 ],
- "prefix" : "~/Documents/freelance/linda_bouchard/mgraph_project/mgraph_patchers/",
+ "patching_rect" : [ 49.0, 513.0, 155.0, 22.0 ],
+ "prefix" : "~/Documents/freelance/linda_bouchard/mgraph_project/demo/",
"types" : [ "WAVE", "AIFF", "MP3" ]
}
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "bang" ],
- "patching_rect" : [ 14.0, 159.5, 58.0, 22.0 ],
+ "patching_rect" : [ 24.0, 155.5, 58.0, 22.0 ],
"text" : "loadbang"
}
]
}
,
- "patching_rect" : [ 780.0, 336.152261123267749, 80.0, 22.0 ],
+ "patching_rect" : [ 790.0, 332.152261123267749, 80.0, 22.0 ],
"saved_object_attributes" : {
"description" : "",
"digest" : "",
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
- "patching_rect" : [ 716.0, 190.0, 150.0, 20.0 ],
+ "patching_rect" : [ 726.0, 186.0, 150.0, 20.0 ],
"text" : "errors if cannot find"
}
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
- "patching_rect" : [ 170.0, 212.0, 102.0, 22.0 ],
+ "patching_rect" : [ 180.0, 208.0, 102.0, 22.0 ],
"text" : "prepend set_path"
}
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "dictionary" ],
- "patching_rect" : [ 540.0, 271.0, 29.0, 22.0 ],
+ "patching_rect" : [ 550.0, 254.0, 29.0, 22.0 ],
"text" : "thru"
}
"numoutlets" : 1,
"outlettype" : [ "bang" ],
"parameter_enable" : 0,
- "patching_rect" : [ 540.0, 159.5, 24.0, 24.0 ]
+ "patching_rect" : [ 550.0, 107.5, 44.5, 44.5 ]
}
}
"data" : {
"filename" : "mgraph_example.svg",
"shape" : "triangles",
- "style" : "stroke",
+ "style" : "both",
"descmap" : {
"energy" : "size",
- "zcr" : "ylocation",
- "speckurt" : "xscale",
- "speccentr" : "brightness"
+ "speccrest" : "xscale",
+ "speckurt" : "brightness",
+ "zcr" : "ylocation"
}
,
"transform" : {
- "width" : 300,
- "height" : 300,
- "zoom" : 1.0
+ "width" : 600,
+ "height" : 600,
+ "zoom" : 1
}
}
"numinlets" : 2,
"numoutlets" : 4,
"outlettype" : [ "dictionary", "", "", "" ],
- "patching_rect" : [ 540.0, 212.0, 164.0, 22.0 ],
+ "patching_rect" : [ 550.0, 208.0, 164.0, 22.0 ],
"saved_object_attributes" : {
"embed" : 1,
"parameter_enable" : 0,
"numoutlets" : 1,
"outlettype" : [ "bang" ],
"parameter_enable" : 0,
- "patching_rect" : [ 170.0, 462.0, 24.0, 24.0 ]
+ "patching_rect" : [ 180.0, 477.0, 24.0, 24.0 ]
}
}
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
- "patching_rect" : [ 716.0, 212.0, 89.0, 22.0 ],
+ "patching_rect" : [ 726.0, 208.0, 89.0, 22.0 ],
"text" : "dictionary putty"
}
"maxclass" : "dict.view",
"numinlets" : 1,
"numoutlets" : 0,
- "patching_rect" : [ 540.0, 307.0, 221.0, 315.0 ]
+ "patching_rect" : [ 550.0, 303.0, 207.0, 264.0 ]
}
}
"numoutlets" : 1,
"outlettype" : [ "bang" ],
"p_hopsize" : 1024,
- "patching_rect" : [ 170.0, 320.652261123267749, 352.0, 132.347738876732251 ]
+ "patching_rect" : [ 180.0, 299.65226100000001, 357.0, 162.999999999999943 ]
}
}
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ],
- "patching_rect" : [ 107.0, 572.5, 197.0, 22.0 ],
+ "patching_rect" : [ 117.0, 563.5, 197.0, 22.0 ],
"text" : "buffer~ morph1 Brahms_4.wav -1 1"
}
"numoutlets" : 1,
"outlettype" : [ "bang" ],
"parameter_enable" : 0,
- "patching_rect" : [ 28.0, 271.0, 24.0, 24.0 ]
+ "patching_rect" : [ 38.0, 267.0, 24.0, 24.0 ]
}
}
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
- "patching_rect" : [ 14.0, 212.0, 69.0, 22.0 ],
+ "patching_rect" : [ 24.0, 208.0, 69.0, 22.0 ],
"text" : "set morph1"
}
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
- "patching_rect" : [ 85.0, 212.0, 33.0, 22.0 ],
+ "patching_rect" : [ 95.0, 208.0, 33.0, 22.0 ],
"text" : "view"
}
, {
"patchline" : {
"destination" : [ "obj-40", 0 ],
+ "order" : 1,
+ "source" : [ "obj-25", 1 ]
+ }
+
+ }
+, {
+ "patchline" : {
+ "destination" : [ "obj-54", 1 ],
+ "hidden" : 1,
+ "order" : 0,
"source" : [ "obj-25", 1 ]
}
"source" : [ "obj-33", 0 ]
}
+ }
+, {
+ "patchline" : {
+ "destination" : [ "obj-54", 0 ],
+ "hidden" : 1,
+ "source" : [ "obj-34", 0 ]
+ }
+
}
, {
"patchline" : {
"source" : [ "obj-35", 0 ]
}
+ }
+, {
+ "patchline" : {
+ "destination" : [ "obj-37", 1 ],
+ "hidden" : 1,
+ "order" : 0,
+ "source" : [ "obj-38", 0 ]
+ }
+
+ }
+, {
+ "patchline" : {
+ "destination" : [ "obj-37", 0 ],
+ "hidden" : 1,
+ "order" : 1,
+ "source" : [ "obj-38", 0 ]
+ }
+
}
, {
"patchline" : {
"source" : [ "obj-5", 0 ]
}
+ }
+, {
+ "patchline" : {
+ "destination" : [ "obj-38", 0 ],
+ "source" : [ "obj-54", 0 ]
+ }
+
}
, {
"patchline" : {
}
],
- "dependency_cache" : [ {
- "name" : "helpdetails.js",
- "bootpath" : "C74:/help/resources",
- "type" : "TEXT",
- "implicit" : 1
+ "parameters" : {
+ "obj-38" : [ "out", "out", 0 ],
+ "parameterbanks" : {
+ "0" : {
+ "index" : 0,
+ "name" : "",
+ "parameters" : [ "-", "-", "-", "-", "-", "-", "-", "-" ]
+ }
+
}
-, {
+,
+ "inherited_shortname" : 1
+ }
+,
+ "dependency_cache" : [ {
"name" : "morphograph.mxo",
"type" : "iLaX"
}
#include "ext.h" //core externals header
#include "ext_obex.h" //basic max object functionality
+
+//need to include???
+#include "ext_path.h"
+#include "ext_sysfile.h"
+
#include "ext_dictobj.h"
#include "ext_buffer.h"
#include "z_dsp.h"
void morphograph_load(t_morphograph *x, t_symbol *s);
void morphograph_process(t_morphograph *x);
+//------------------TEST FILE WRITER-------------------------------
+//-----------------------------------------------------------------
+void morphograph_writefile(t_morphograph *x, char *filename, short path);
+void morphograph_dowrite(t_morphograph *x, t_symbol *s);
+void morphograph_write(t_morphograph *x, t_symbol *s);
+
t_max_err morphograph_notify(t_morphograph *x, t_symbol *s, t_symbol *msg, void *sender, void *data); //buffer related
//custom/private user methods- internal only
Document *doc;
Parameters *params;
std::string shape;
- float rotation, size, width, height, y, xdev, linewidth;
+ float rotation, size, width, height, y, xdev, linewidth, trilen, yoffset;
unsigned idx, vecsize, bright;
double rv;
short drawstyle;
public:
-// ShapeWriter(t_morphograph *_x, std::string &_shape, Document *_doc, double scf, double scnrg, long vsize) {
-ShapeWriter(t_morphograph *_x, std::string &_shape, Document *_doc) {
+ ShapeWriter(t_morphograph *_x, std::string &_shape, Document *_doc) {
+ //fork out primitive code to be the default, then stroke/fill
x = _x;
doc = _doc;
shape = _shape;
height = 1.0;
y = 0.5;
xdev = 0.;
- bright = 128;
+ bright = 0;
linewidth = 0.5;
-
+ drawstyle = 0; //stroke
}
virtual ~ShapeWriter() {
void draw(){
if(shape == std::string("circles")){
- draw_circle(drawstyle);
+ draw_circle();
}
if(shape == std::string("rectangles")){
- draw_rectangle(drawstyle);
+ draw_rectangle();
}
if(shape == std::string("ellipses")){
draw_ellipse();
}
if(shape == std::string("triangles")){
//object_error((t_object *)x, "triangle is not implemented.");
- draw_triangle(drawstyle);
+ draw_triangle();
}
}
void set_idx(unsigned _i){
idx = _i;
}
- void set_brightness(unsigned _bright){
+ void set_brightness(char _bright){
bright = _bright;
}
-
void set_drawstyle(std::string _style){
if(_style == std::string("stroke")){
private:
- void draw_triangle(short style){
-
-
- double tx = (double)idx / vecsize * params->width;
- double ty = y * params->height;
-
- //Polygon pg = Polygon(Stroke(1, Color(0,0,0)));
- Polygon pg = Polygon(Fill(Color(0,0,0)));
-
- pg << pPoint(tx, ty);
- //pPoint p2 = pPoint((tx + 10), ty + 0);
- pPoint p2 = pPoint((tx + 10) + (size * 20), ty + 0);
- pg << p2;
- //pPoint p3 = pPoint((tx + 5), (ty + 10));
- pPoint p3 = pPoint((tx + 5) + (size * 10), (ty + 10) + (size * 20));
- pg << p3;
-
- (*doc) << pg;
+ void draw_triangle(){
+ switch(drawstyle){
+ case 0: { //stroke
+ //initial pos
+ double tx = (double)idx / vecsize * params->width;
+ double ty = (y * params->height) - 10.;
+ Polygon pg = Polygon(Fill(), Stroke(linewidth, Color(0,0,0)));
+ pg << pPoint(tx, ty);
+ double p2x = (tx + (size * 20)) * width;
+ pPoint p2 = pPoint(p2x, ty + 0);
+ pg << p2;
+ double p2y = (ty + (size * 20)) * height;
+ pPoint p3 = pPoint(tx, p2y);
+ pg << p3;
+
+ (*doc) << pg;
+ }
+ break;
+ case 1: { //fill
+ //initial pos
+ double tx = (double)idx / vecsize * params->width;
+ double ty = (y * params->height) - 10.;
+ Polygon pg = Polygon(Fill(Color(bright, bright, bright)));
+ pg << pPoint(tx, ty);
+ double p2x = (tx + (size * 20)) * width;
+ pPoint p2 = pPoint(p2x, ty + 0);
+ pg << p2;
+ double p2y = (ty + (size * 20)) * height;
+ pPoint p3 = pPoint(tx, p2y);
+ pg << p3;
+
+ (*doc) << pg;
+ }
+ break;
+
+ case 2: { //both
+ //initial pos
+ double tx = (double)idx / vecsize * params->width;
+ double ty = (y * params->height) - 10.;
+ Polygon pg = Polygon(Fill(Color(bright, bright, bright)), Stroke(linewidth, Color(0,0,0)));
+ pg << pPoint(tx, ty);
+ double p2x = (tx + (size * 20)) * width;
+ pPoint p2 = pPoint(p2x, ty + 0);
+ pg << p2;
+ double p2y = (ty + (size * 20)) * height;
+ pPoint p3 = pPoint(tx, p2y);
+ pg << p3;
+
+ (*doc) << pg;
+ }
+ break;
+
+ default: {
+ //initial pos
+ double tx = (double)idx / vecsize * params->width;
+ double ty = (y * params->height) - 10.;
+ Polygon pg = Polygon(Fill(Color(bright, bright, bright)));
+ pg << pPoint(tx, ty);
+ double p2x = (tx + (size * 20)) * width;
+ pPoint p2 = pPoint(p2x, ty + 0);
+ pg << p2;
+ double p2y = (ty + (size * 20)) * height;
+ pPoint p3 = pPoint(tx, p2y);
+ pg << p3;
+
+ (*doc) << pg;
+ }
+ break;
+ }
+
}
- void draw_circle(short style){
- switch(style){
+ void draw_circle(){
+ switch(drawstyle){
case 0: //stroke
(*doc) << Circle(
pPoint (((double)idx / vecsize) * params->width, y * params->height),
(params->width / SHAPE_DIVISOR) * size,
Fill(),
- Stroke(1, Color (0, 0, 0))
+ Stroke(linewidth, Color (0, 0, 0))
);
break;
case 1: //fill
}
}
- void draw_rectangle(short style){
+ void draw_rectangle(){
//Rectangle(pPoint, width, height);
- switch(style){
+ switch(drawstyle){
case 0: //stroke
+
(*doc) << Rectangle(
pPoint(((double)idx / vecsize) * params->width, y * params->height),
((width * params->width) / SHAPE_DIVISOR) * size, ((height * params->height) / SHAPE_DIVISOR) * size,
);
break;
case 1: //fill
+ object_post((t_object *)x, "fill rectangle called");
(*doc) << Rectangle(
pPoint(((double)idx / vecsize) * params->width, y * params->height),
((width * params->width) / SHAPE_DIVISOR) * size, ((height * params->height) / SHAPE_DIVISOR) * size,
);
break;
case 2: //both
+ object_post((t_object *)x, "both rectangle called");
(*doc) << Rectangle(
pPoint(((double)idx / vecsize) * params->width, y * params->height),
((width * params->width) / SHAPE_DIVISOR) * size, ((height * params->height) / SHAPE_DIVISOR) * size,
break;
default:
+ object_post((t_object *)x, "default rectangle called");
(*doc) << Rectangle(
pPoint(((double)idx / vecsize) * params->width, y * params->height),
((width * params->width) / SHAPE_DIVISOR) * size, ((height * params->height) / SHAPE_DIVISOR) * size,
fname = std::string(x->l_fnamesvg->s_name);
fpath = std::string(x->l_filepath->s_name);
- Dimensions dims (params.width + OFFSET, params.height + OFFSET);
+ Dimensions dims (params.width, params.height);
doc = new Document (fpath + fname, Layout(dims, Layout::BottomLeft, params.zoom));
}
case FEATURE_HFC: {
curr_feature_datum = layers[i].desc.hfc[j];
} break;
- case FEATURE_INHARM: {
- curr_feature_datum = layers[i].desc.inharmonicity[j];
- } break;
+// case FEATURE_INHARM: {
+// curr_feature_datum = layers[i].desc.inharmonicity[j];
+// } break;
case FEATURE_SPECIRR: {
curr_feature_datum = layers[i].desc.specirr[j];
} break;
- case FEATURE_SPECCENTER: {
- curr_feature_datum = layers[i].desc.speccentr[j];
- } break;
- case FEATURE_SPECSPREAD: {
- curr_feature_datum = layers[i].desc.specspread[j];
- } break;
+// case FEATURE_SPECCENTER: {
+// curr_feature_datum = layers[i].desc.speccentr[j];
+// } break;
+// case FEATURE_SPECSPREAD: {
+// curr_feature_datum = layers[i].desc.specspread[j];
+// } break;
case FEATURE_SPECSKEW: {
curr_feature_datum = layers[i].desc.specskew[j];
} break;
case FEATURE_SPECKURT: {
curr_feature_datum = layers[i].desc.speckurt[j];
} break;
- case FEATURE_SPECFLUX: {
- curr_feature_datum = layers[i].desc.specflux[j];
- } break;
- case FEATURE_SPECDECR: {
- curr_feature_datum = layers[i].desc.specdecr[j];
- } break;
- case FEATURE_SPECSLOPE: {
- curr_feature_datum = layers[i].desc.specslope[j];
- } break;
+// case FEATURE_SPECFLUX: {
+// curr_feature_datum = layers[i].desc.specflux[j];
+// } break;
+// case FEATURE_SPECDECR: {
+// curr_feature_datum = layers[i].desc.specdecr[j];
+// } break;
+// case FEATURE_SPECSLOPE: {
+// curr_feature_datum = layers[i].desc.specslope[j];
+// } break;
case FEATURE_SPECFLAT: {
curr_feature_datum = layers[i].desc.specflat[j];
} break;
}
switch(get_action_id(x, k)){
- case PARAM_ROTATION: {
- //unimplemented
- object_error((t_object *)x, "render: rotation is unimplemented.");
- } break;
+// case PARAM_ROTATION: {
+// //unimplemented
+// object_error((t_object *)x, "render: rotation is unimplemented.");
+// } break;
case PARAM_XSCALE: {
//object_post((t_object *)x, "detected xscale");
swrite.set_width(curr_feature_datum);
swrite.set_y(curr_feature_datum);
} break;
- case PARAM_XDEV: {
- //unimplemented
- object_error((t_object *)x, "x deviation is unimplemented.");
- } break;
+// case PARAM_XDEV: {
+// //unimplemented
+// object_error((t_object *)x, "x deviation is unimplemented.");
+// } break;
case PARAM_BRIGHTNESS: {
char b = curr_feature_datum * 255;
swrite.set_brightness(b);
}
int ptr = 0;
+ bool feature_valid = true;
- while (ptr < nsamps) {
+ while (ptr < nsamps && feature_valid) {
if (p.fft_size + ptr > nsamps) break; // discard incomplete frame
//run fft()
sum += a * a;
}
double e = std::sqrt (sum / p.fft_size); //we push this later
+ d.energy.push_back(e * 10.);
+ //d.energy.push_back(e);
//centroid
double sc = speccentr(&s[0], &freqs[0], p.fft_size / 2);
switch(get_feature_id(x, i)) {
case FEATURE_ENERGY: {
object_post((t_object *)x, "spec energy: %f", e * 10.);
- d.energy.push_back(e * 10.);
+ //d.energy.push_back(e * 10.);
} break;
case FEATURE_ZCR: {
//double z = zcr<double>(&vsamples[ptr], p.fft_size / 2);
object_post((t_object *)x, "hfc: %f", h);
d.hfc.push_back(h);
} break;
- case FEATURE_INHARM: {
- //don't understand how to implement this
- //double ih = inharmonicity(&s[0], &freqs[0], p.fft_size, <#T f0#>, <#T R#>, <#T &sumAmpl#>)
- object_error((t_object *)x, "inharmonicity is currently unimplemented.");
- return;
- } break;
+// case FEATURE_INHARM: {
+// //don't understand how to implement this
+// //double ih = inharmonicity(&s[0], &freqs[0], p.fft_size, <#T f0#>, <#T R#>, <#T &sumAmpl#>)
+// object_error((t_object *)x, "inharmonicity is currently unimplemented.");
+// feature_valid = false;
+// } break;
case FEATURE_SPECIRR: {
double si = specirr(&s[0], p.fft_size / 2);
- object_post((t_object *)x, "spec irr: %f", si);
- d.specirr.push_back(si);
- } break;
- case FEATURE_SPECCENTER: {
- //skip bc we already compute - should take this out
- object_post((t_object *)x, "spec centroid: %f", sc);
- } break;
- case FEATURE_SPECSPREAD:{
- //skip bc we already compute - should take this out
- object_post((t_object *)x, "spec spread: %f", sspr);
+ object_post((t_object *)x, "spec irr: %f", si * 0.001);
+ d.specirr.push_back(si * 0.001);
} break;
+// case FEATURE_SPECCENTER: {
+// //skip bc we already compute - should take this out
+// object_post((t_object *)x, "spec centroid: %f", sc);
+// } break;
+// case FEATURE_SPECSPREAD:{
+// //skip bc we already compute - should take this out
+// object_post((t_object *)x, "spec spread: %f", sspr);
+// } break;
case FEATURE_SPECSKEW: {
double ssk = specskew(&s[0], &freqs[0], p.fft_size / 2, sc, sspr);
- object_post((t_object *)x, "spec skew: %f", ssk);
- d.specskew.push_back(ssk);
+ object_post((t_object *)x, "spec skew: %f", ssk * 0.1);
+ d.specskew.push_back(ssk * 0.1);
} break;
case FEATURE_SPECKURT: {
double k = speckurt(&s[0], &freqs[0], p.fft_size / 2, sc, sspr);
object_post((t_object *)x, "spec kurt: %f", k);
d.speckurt.push_back(k * 0.01);
} break;
- case FEATURE_SPECFLUX: {
- //how to calculate the old amplitudes... ???
- //double f = specflux(&s[0], oa, p.fft_size);
- object_error((t_object *)x, "spectral flux is currently unimplemented.");
- return;
- } break;
- case FEATURE_SPECDECR: {
- double sd = specdecr(&s[0], p.fft_size / 2);
- object_post((t_object *)x, "spec decrease: %f", sd);
- d.specdecr.push_back(sd);
- } break;
- case FEATURE_SPECSLOPE: {
- double ssl = specslope(&s[0], &freqs[0], p.fft_size / 2);
- object_post((t_object *)x, "spec slope: %f", ssl);
- d.specslope.push_back(ssl);
- } break;
+// case FEATURE_SPECFLUX: {
+// //how to calculate the old amplitudes... ???
+// //double f = specflux(&s[0], oa, p.fft_size);
+// object_error((t_object *)x, "spectral flux is currently unimplemented.");
+// feature_valid = false;
+// } break;
+// case FEATURE_SPECDECR: {
+// double sd = specdecr(&s[0], p.fft_size / 2);
+// object_post((t_object *)x, "spec decrease: %f", sd);
+// d.specdecr.push_back(sd);
+// } break;
+// case FEATURE_SPECSLOPE: {
+// double ssl = specslope(&s[0], &freqs[0], p.fft_size / 2);
+// object_post((t_object *)x, "spec slope: %f", ssl);
+// d.specslope.push_back(ssl);
+// } break;
case FEATURE_SPECFLAT: {
double sf = specflat(&s[0], p.fft_size / 2);
- object_post((t_object *)x, "spec flatness: %f", sf);
- d.specflat.push_back(sf);
+ object_post((t_object *)x, "spec flatness: %f", sf * 10000.);
+ d.specflat.push_back(sf * 10000.);
} break;
case FEATURE_SPECCREST: {
double scr = speccrest(&s[0], p.fft_size / 2);
- object_post((t_object *)x, "spec crest: %f", scr);
- d.speccrest.push_back(scr);
+ object_post((t_object *)x, "spec crest: %f", scr * 10);
+ d.speccrest.push_back(scr * 10);
} break;
default: {
object_error((t_object *)x, "analysis: cannot find valid feature id.");
- return;
+ feature_valid = false;
}
}
}
x->l_features[0] = (char *)"energy";
x->l_features[1] = (char *)"zcr";
x->l_features[2] = (char *)"hfc";
- x->l_features[3] = (char *)"inharmonicity";
- x->l_features[4] = (char *)"specirr";
- x->l_features[5] = (char *)"speccentr";
- x->l_features[6] = (char *)"specspread";
+ x->l_features[3] = (char *)"specirr";
+ x->l_features[4] = (char *)"speckurt";
+ x->l_features[5] = (char *)"speccrest";
+ x->l_features[6] = (char *)"specflat";
x->l_features[7] = (char *)"specskew";
- x->l_features[8] = (char *)"speckurt";
- x->l_features[9] = (char *)"specflux";
- x->l_features[10] = (char *)"specdecr";
- x->l_features[11] = (char *)"specslope";
- x->l_features[12] = (char *)"specflat";
- x->l_features[13] = (char *)"speccrest";
+
+// x->l_features[8] = (char *)"speccentr";
+// x->l_features[9] = (char *)"specspread";
+// x->l_features[10] = (char *)"specflux";
+// x->l_features[11] = (char *)"specdecr";
+// x->l_features[12] = (char *)"specslope";
+// x->l_features[13] = (char *)"inharmonicity";
}
static void populate_actions(t_morphograph *x){
- x->l_actions[0] = (char *)"rotation";
- x->l_actions[1] = (char *)"xscale";
- x->l_actions[2] = (char *)"yscale";
- x->l_actions[3] = (char *)"size";
- x->l_actions[4] = (char *)"ylocation";
- x->l_actions[5] = (char *)"xdeviation";
- x->l_actions[6] = (char *)"brightness";
+
+ x->l_actions[0] = (char *)"xscale";
+ x->l_actions[1] = (char *)"yscale";
+ x->l_actions[2] = (char *)"size";
+ x->l_actions[3] = (char *)"ylocation";
+ x->l_actions[4] = (char *)"brightness";
+
+// x->l_actions[5] = (char *)"rotation";
+// x->l_actions[6] = (char *)"xdeviation";
+
}
static void populate_shapes(t_morphograph *x){
void morphograph_set_path(t_morphograph *x, t_symbol *s) {
x->l_filepath = s;
- object_post((t_object *)x, "the path: %s", x->l_filepath->s_name);
+ object_post((t_object *)x, "svg write path: %s", x->l_filepath->s_name);
}
//this should be handled by the process_descmap() function
} else {
//path is input by user (via open dialog object for ex)
strcpy(filename,s->s_name);
+ // locatefile_extended(<#char *name#>, <#short *outvol#>, <#t_fourcc *outtype#>, <#const t_fourcc *filetypelist#>, <#short numtypes#>)
if (!locatefile_extended(filename, &pathid, &outtype, type, ntype)) {
//continue
} else {
jsvg_render(x->l_svg, g);
}else{
- t_jrgba color, color_r;
- double offset = 5.;
- double offset2 = 10.;
+ t_jrgba color_bg, color_rr;
+ double offset = 2.;
+ double offset2 = 7.;
//alpha is transparent if zero
- color.red = 0.; color.green = 1.; color.blue = 0.; color.alpha = 1.;
- color_r.red = 0.2; color_r.green = 0.5; color_r.blue = 0.; color_r.alpha = 1.;
-
+ color_bg.red = 0.064286; color_bg.green = 0.315738; color_bg.blue = 0.364286; color_bg.alpha = 1.;
+ color_rr.red = 0.217857; color_rr.green = 0.492961; color_rr.blue = 0.496429; color_rr.alpha = 1.;
- jgraphics_set_source_jrgba(g, &color);
- jgraphics_rectangle(g, offset, offset, rect.width - offset*2, rect.height - offset*2);
+
+
+ jgraphics_set_source_jrgba(g, &color_bg);
+ jgraphics_rectangle(g, 0, 0, rect.width, rect.height);
jgraphics_fill(g);
- jgraphics_set_source_jrgba(g, &color_r);
+ jgraphics_set_source_jrgba(g, &color_rr);
jgraphics_rectangle_rounded(g, offset2, offset2, rect.width - offset2*2, rect.height - offset2*2, 30, 30);
jgraphics_fill(g);
}
}
+
+
//-------------------------------------------------------------------------------------------------
//c functions: std max api
//-------------------------------------------------------------------------------------------------
+//test filewriter ---------------------------------------------------------------------------------
+//-------------------------------------------------------------------------------------------------
+void morphograph_write(t_morphograph *x, t_symbol *s){
+ defer(x, (method)morphograph_dowrite, s, 0, NULL);
+}
+
+void morphograph_dowrite(t_morphograph *x, t_symbol *s){
+// long filetype = 'TEXT', outtype;
+ char filename[512];
+ //short path;
+
+ //jml
+ short pathid;
+ t_fourcc type = NULL;
+ t_fourcc otype;
+
+ //prev
+ //saveasdialog_extended(filename, &path, &outtype, &filetype, 1)
+
+ if (s == gensym("")) { // if no argument supplied, ask for file
+ if (saveasdialog_extended(filename, &pathid, &otype, &type, 1)) // non-zero: user cancelled
+ return;
+ } else {
+ strcpy(filename, s->s_name);
+ pathid = path_getdefault();
+ }
+ morphograph_writefile(x, filename, pathid);
+}
+
+void morphograph_writefile(t_morphograph *x, char *filename, short path){
+
+ char *buf = (char *)"write me into a file";
+
+ long err;
+ t_filehandle fh;
+
+ err = path_createsysfile(filename, path, 'TEXT', &fh);
+ if (err)
+ return;
+ err = sysfile_writetextfile(fh, &buf, TEXT_LB_NATIVE);
+ sysfile_close(fh);
+
+}
+//-------------------------------------------------------------------------------------------------
+
void morphograph_anything(t_morphograph *x, const t_symbol * const s, const long ac, const t_atom *av){
}
class_addmethod(c, (method)morphograph_anything, "anything", A_GIMME, 0);
class_addmethod(c, (method)morphograph_bang, "bang", 0);
class_addmethod(c, (method)morphograph_assist, "assist", A_CANT, 0);
-
+ //test text stuff
+ class_addmethod(c, (method)morphograph_write, "write", A_DEFSYM, 0);
+
//register custom user methods
class_addmethod(c, (method)morphograph_set, "set", A_SYM, 0);
class_addmethod(c, (method)morphograph_size, "size", A_LONG, A_LONG, 0);