{ "patcher" : { "fileversion" : 1, "appversion" : { "major" : 6, "minor" : 0, "revision" : 8 } , "rect" : [ 732.0, 259.0, 838.0, 588.0 ], "bglocked" : 0, "openinpresentation" : 0, "default_fontsize" : 12.0, "default_fontface" : 0, "default_fontname" : "Arial", "gridonopen" : 0, "gridsize" : [ 15.0, 15.0 ], "gridsnaponopen" : 0, "statusbarvisible" : 2, "toolbarvisible" : 1, "boxanimatetime" : 200, "imprint" : 0, "enablehscroll" : 1, "enablevscroll" : 1, "devicewidth" : 0.0, "description" : "", "digest" : "", "tags" : "", "boxes" : [ { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-41", "maxclass" : "flonum", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "float", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 228.0, 285.0, 50.0, 20.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-37", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 163.0, 303.0, 44.0, 20.0 ], "text" : "!/ 200." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-30", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 223.0, 180.0, 122.0, 47.0 ], "text" : "This code generates a value for the constant PI" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-25", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "bang", "int" ], "patching_rect" : [ 423.0, 345.0, 32.5, 20.0 ], "text" : "t b i" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-23", "maxclass" : "flonum", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "float", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 423.0, 285.0, 50.0, 20.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-17", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 423.0, 240.0, 82.0, 20.0 ], "text" : "Phase" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-16", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "bang", "int" ], "patching_rect" : [ 149.5, 345.0, 32.5, 20.0 ], "text" : "t b i" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-10", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "patching_rect" : [ 149.5, 270.0, 30.0, 20.0 ], "text" : "abs" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-14", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "int", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 149.5, 240.0, 50.0, 20.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-15", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 228.0, 240.0, 82.0, 33.0 ], "text" : "Frequency\n(cycles)" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-11", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "patching_rect" : [ 328.0, 315.0, 30.0, 20.0 ], "text" : "abs" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-7", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 190.0, 365.0, 32.5, 20.0 ], "text" : "* 2." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-6", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 4, "outlettype" : [ "bang", "bang", "bang", "bang" ], "patching_rect" : [ 94.75, 135.0, 59.5, 20.0 ], "text" : "t b b b b" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-32", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 75.0, 450.0, 57.0, 20.0 ], "text" : "s redraw" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-29", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "bang", "int" ], "patching_rect" : [ 328.0, 345.0, 32.5, 20.0 ], "text" : "t b i" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-28", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 30.0, 135.0, 55.0, 20.0 ], "text" : "r redraw" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-27", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "int", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 328.0, 285.0, 50.0, 20.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-26", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 328.0, 240.0, 82.0, 33.0 ], "text" : "Amplitude (pixels)" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-24", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 186.5, 480.0, 73.0, 33.0 ], "text" : "Move down to center" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-22", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "int" ], "patching_rect" : [ 135.5, 480.0, 41.0, 20.0 ], "text" : "+ 100" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-21", "maxclass" : "newobj", "numinlets" : 3, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 135.5, 450.0, 122.0, 20.0 ], "text" : "expr $i2*sin($f1+$f3)" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-20", "linecount" : 2, "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 60.0, 522.0, 153.0, 31.0 ], "text" : ";\rlcd setpixel $1 $2 64 64 64" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-18", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 60.0, 495.0, 56.0, 20.0 ], "text" : "pack 0 0" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-13", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 190.0, 345.0, 28.0, 20.0 ], "text" : "r pi" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-12", "maxclass" : "newobj", "numinlets" : 6, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 136.0, 390.0, 86.5, 20.0 ], "text" : "scale 1 200 0." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-9", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 130.0, 180.0, 85.0, 20.0 ], "text" : "expr acos(-1.)" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-8", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 130.0, 207.0, 29.0, 20.0 ], "text" : "s pi" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-19", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 3, "outlettype" : [ "bang", "bang", "int" ], "patching_rect" : [ 30.0, 210.0, 49.0, 20.0 ], "text" : "uzi 200" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-31", "linecount" : 2, "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 499.0, 165.0, 55.0, 31.0 ], "text" : ";\rlcd clear" } } , { "box" : { "id" : "obj-33", "maxclass" : "button", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "bang" ], "patching_rect" : [ 30.0, 165.0, 30.0, 30.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-36", "linecount" : 4, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 585.0, 440.0, 200.0, 60.0 ], "text" : "The second coordinate is the vertical value at that point. It is a function of frequency, amplitude and phase." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-34", "linecount" : 4, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 585.0, 360.0, 200.0, 60.0 ], "text" : "The first coordinate for setpixel is simply the horizontal position of the pixel from 1 (left edge) to 200 (right edge)." } } , { "box" : { "id" : "obj-1", "maxclass" : "lcd", "numinlets" : 1, "numoutlets" : 4, "outlettype" : [ "list", "list", "int", "" ], "patching_rect" : [ 585.0, 135.0, 200.0, 200.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-5", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 585.0, 90.0, 33.0, 20.0 ], "text" : "r lcd" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-4", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 90.0, 540.0, 33.0 ], "text" : "In this patch we draw a sine curve to an Lcd object by calculating points on the curve then using a setpixel message to draw each." } } , { "box" : { "bubble" : 1, "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-2", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 15.0, 15.0, 315.0, 51.0 ], "text" : "Patch 056. Plotting Sine Curves\nWilliam J Turkel\nhttp://williamjturkel.net/code/#programming" } } , { "box" : { "bgcolor" : [ 1.0, 1.0, 1.0, 0.0 ], "border" : 1, "id" : "obj-3", "maxclass" : "panel", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 15.0, 77.5, 810.0, 495.0 ], "rounded" : 20 } } ], "lines" : [ { "patchline" : { "color" : [ 0.5, 0.0, 0.5, 1.0 ], "destination" : [ "obj-16", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-10", 0 ] } } , { "patchline" : { "destination" : [ "obj-37", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-10", 0 ] } } , { "patchline" : { "color" : [ 1.0, 0.5, 0.0, 1.0 ], "destination" : [ "obj-29", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-11", 0 ] } } , { "patchline" : { "color" : [ 0.5, 0.0, 0.5, 1.0 ], "destination" : [ "obj-21", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-12", 0 ] } } , { "patchline" : { "destination" : [ "obj-7", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-13", 0 ] } } , { "patchline" : { "color" : [ 0.5, 0.0, 0.5, 1.0 ], "destination" : [ "obj-10", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-14", 0 ] } } , { "patchline" : { "color" : [ 0.5, 0.0, 0.5, 1.0 ], "destination" : [ "obj-12", 2 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-16", 1 ] } } , { "patchline" : { "destination" : [ "obj-32", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 159.0, 380.0, 84.5, 380.0 ], "source" : [ "obj-16", 0 ] } } , { "patchline" : { "destination" : [ "obj-20", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-18", 0 ] } } , { "patchline" : { "destination" : [ "obj-12", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-19", 2 ] } } , { "patchline" : { "destination" : [ "obj-18", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-19", 2 ] } } , { "patchline" : { "destination" : [ "obj-22", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-21", 0 ] } } , { "patchline" : { "destination" : [ "obj-18", 1 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-22", 0 ] } } , { "patchline" : { "color" : [ 0.0, 0.0, 1.0, 1.0 ], "destination" : [ "obj-25", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-23", 0 ] } } , { "patchline" : { "color" : [ 0.0, 0.0, 1.0, 1.0 ], "destination" : [ "obj-21", 2 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 446.0, 440.0, 248.0, 440.0 ], "source" : [ "obj-25", 1 ] } } , { "patchline" : { "destination" : [ "obj-32", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 432.5, 431.0, 84.5, 431.0 ], "source" : [ "obj-25", 0 ] } } , { "patchline" : { "color" : [ 1.0, 0.5, 0.0, 1.0 ], "destination" : [ "obj-11", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-27", 0 ] } } , { "patchline" : { "destination" : [ "obj-33", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-28", 0 ] } } , { "patchline" : { "color" : [ 1.0, 0.5, 0.0, 1.0 ], "destination" : [ "obj-21", 1 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 351.0, 424.0, 196.5, 424.0 ], "source" : [ "obj-29", 1 ] } } , { "patchline" : { "destination" : [ "obj-32", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 337.5, 416.0, 84.5, 416.0 ], "source" : [ "obj-29", 0 ] } } , { "patchline" : { "destination" : [ "obj-6", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 39.5, 200.0, 90.0, 200.0, 90.0, 132.0, 104.25, 132.0 ], "source" : [ "obj-33", 0 ] } } , { "patchline" : { "destination" : [ "obj-41", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 172.5, 332.0, 220.0, 332.0, 220.0, 281.0, 237.5, 281.0 ], "source" : [ "obj-37", 0 ] } } , { "patchline" : { "destination" : [ "obj-1", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-5", 0 ] } } , { "patchline" : { "destination" : [ "obj-19", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 117.75, 206.0, 39.5, 206.0 ], "source" : [ "obj-6", 1 ] } } , { "patchline" : { "destination" : [ "obj-31", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 144.75, 163.0, 508.5, 163.0 ], "source" : [ "obj-6", 3 ] } } , { "patchline" : { "destination" : [ "obj-9", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-6", 2 ] } } , { "patchline" : { "destination" : [ "obj-12", 4 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-7", 0 ] } } , { "patchline" : { "destination" : [ "obj-8", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-9", 0 ] } } ], "dependency_cache" : [ ] } }