{ "patcher" : { "fileversion" : 1, "appversion" : { "major" : 7, "minor" : 0, "revision" : 1, "architecture" : "x86", "modernui" : 1 } , "rect" : [ 439.0, 226.0, 861.0, 601.0 ], "bgcolor" : [ 0.721569, 0.737255, 0.85098, 1.0 ], "editing_bgcolor" : [ 0.721569, 0.737255, 0.85098, 1.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" : "IceCubeTray", "boxes" : [ { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-55", "linecount" : 4, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 480.0, 255.0, 317.0, 60.0 ], "style" : "", "text" : "Try setting the two frequencies that are being summed very close together (e.g., 440 and 442). As the two waves interfere with one another, the amplitude of the output fluctuates, resulting in perceptible \"beats.\"" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-53", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 405.0, 510.0, 394.0, 47.0 ], "style" : "", "text" : "Displaying the frequency axis with a linear scale in the spectrogram makes it easier to see the frequencies of the different signals that make up the sound that we hear." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-51", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 465.0, 330.0, 56.0, 22.0 ], "style" : "", "text" : "logfreq 1" } } , { "box" : { "id" : "obj-50", "logfreq" : 1, "maxclass" : "spectroscope~", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 405.0, 360.0, 390.0, 130.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-49", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "signal" ], "patching_rect" : [ 405.0, 285.0, 42.0, 22.0 ], "style" : "", "text" : "*~ 0.5" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-48", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "signal" ], "patching_rect" : [ 405.0, 255.0, 32.5, 22.0 ], "style" : "", "text" : "+~" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "format" : 6, "id" : "obj-47", "maxclass" : "flonum", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 465.0, 180.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "format" : 6, "id" : "obj-46", "maxclass" : "flonum", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 405.0, 180.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-44", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "signal" ], "patching_rect" : [ 465.0, 220.0, 45.0, 22.0 ], "style" : "", "text" : "cycle~" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-43", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "signal" ], "patching_rect" : [ 405.0, 220.0, 45.0, 22.0 ], "style" : "", "text" : "cycle~" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-42", "linecount" : 5, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 525.0, 166.5, 272.0, 74.0 ], "style" : "", "text" : "MSP has a number of operators that let us combine multiple signals in various ways. Here we add two signals together, then divide the output by two (to bring it back into an appropriate range)." } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-40", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 45.0, 240.0, 90.0, 47.0 ], "style" : "", "text" : " Off\n Single Wave\nSummed Wave" } } , { "box" : { "disabled" : [ 0, 0, 0 ], "id" : "obj-38", "itemtype" : 0, "maxclass" : "radiogroup", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "parameter_enable" : 0, "patching_rect" : [ 135.0, 240.0, 18.0, 50.0 ], "size" : 3, "style" : "", "value" : 2 } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-37", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 212.375, 270.0, 129.0, 47.0 ], "style" : "", "text" : "The selector~ object lets us choose among input signals" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-35", "maxclass" : "newobj", "numinlets" : 3, "numoutlets" : 1, "outlettype" : [ "signal" ], "patching_rect" : [ 135.0, 300.0, 70.0, 22.0 ], "style" : "", "text" : "selector~ 2" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-32", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 507.0, 90.0, 47.0 ], "style" : "", "text" : "Turn sound on and off with ezdac~ button" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-30", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 135.0, 349.0, 33.0 ], "style" : "", "text" : "440 Hz (also known as A440) is the note A above middle C. It is a standard for tuning instruments." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-28", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 180.0, 195.0, 47.0 ], "style" : "", "text" : "The cycle~ object is a sinusoidal oscillator. It creates a periodic wave of a given frequency." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-26", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 197.5, 507.0, 143.0, 47.0 ], "style" : "", "text" : "The scope~ parameters allow us to see the wave form" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-24", "linecount" : 4, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 405.0, 90.0, 390.0, 60.0 ], "style" : "", "text" : "People can hear sounds with frequencies between about 20 and 20000 Hz (cycles per second). We are most sensitive to frequencies in the middle of that range (note that the volume on the gain~ slider has to be turned for 110 Hz than for 440 Hz to get the same subjective intensity)." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-22", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 341.0, 180.0, 34.0, 22.0 ], "style" : "", "text" : "880." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-21", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 307.0, 180.0, 34.0, 22.0 ], "style" : "", "text" : "440." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-20", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 273.0, 180.0, 34.0, 22.0 ], "style" : "", "text" : "220." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-19", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 240.0, 180.0, 33.0, 22.0 ], "style" : "", "text" : "110." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-15", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 287.0, 330.0, 32.5, 22.0 ], "style" : "", "text" : "5" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-13", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 319.5, 330.0, 32.5, 22.0 ], "style" : "", "text" : "128" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-11", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 202.0, 330.0, 85.0, 22.0 ], "style" : "", "text" : "range -1.5 1.5" } } , { "box" : { "calccount" : 5, "id" : "obj-9", "maxclass" : "scope~", "numinlets" : 2, "numoutlets" : 0, "patching_rect" : [ 197.5, 360.0, 130.0, 130.0 ], "range" : [ -1.5, 1.5 ], "style" : "" } } , { "box" : { "id" : "obj-8", "maxclass" : "ezdac~", "numinlets" : 2, "numoutlets" : 0, "patching_rect" : [ 135.0, 507.0, 45.0, 45.0 ], "style" : "" } } , { "box" : { "id" : "obj-7", "interpinlet" : 1, "maxclass" : "gain~", "numinlets" : 2, "numoutlets" : 2, "outlettype" : [ "signal", "int" ], "parameter_enable" : 0, "patching_rect" : [ 135.0, 360.0, 30.0, 130.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-1", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "signal" ], "patching_rect" : [ 240.0, 220.0, 72.0, 22.0 ], "style" : "", "text" : "cycle~ 440." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-4", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 90.0, 345.0, 33.0 ], "style" : "", "text" : "We hear sinusoidal waves as tones. The higher the frequency of the wave, the higher pitched it sounds." } } , { "box" : { "bubble" : 1, "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-2", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 15.0, 15.0, 360.0, 51.0 ], "style" : "", "text" : "Patch 7-051. Sinusoidal Waves\nWilliam J Turkel\nhttp://williamjturkel.net/code/#programming" } } , { "box" : { "angle" : 0.0, "bgcolor" : [ 1.0, 1.0, 1.0, 0.0 ], "border" : 1, "id" : "obj-3", "maxclass" : "panel", "mode" : 0, "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 15.0, 75.0, 810.0, 495.0 ], "proportion" : 0.39, "rounded" : 20, "style" : "" } } ], "lines" : [ { "patchline" : { "destination" : [ "obj-35", 1 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 249.5, 248.0, 170.0, 248.0 ], "source" : [ "obj-1", 0 ] } } , { "patchline" : { "destination" : [ "obj-9", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-11", 0 ] } } , { "patchline" : { "destination" : [ "obj-9", 1 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-13", 0 ] } } , { "patchline" : { "destination" : [ "obj-9", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-15", 0 ] } } , { "patchline" : { "destination" : [ "obj-1", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-19", 0 ] } } , { "patchline" : { "destination" : [ "obj-1", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-20", 0 ] } } , { "patchline" : { "destination" : [ "obj-1", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-21", 0 ] } } , { "patchline" : { "destination" : [ "obj-1", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-22", 0 ] } } , { "patchline" : { "destination" : [ "obj-50", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 144.5, 330.0, 198.0, 330.0, 198.0, 323.0, 414.5, 323.0 ], "source" : [ "obj-35", 0 ] } } , { "patchline" : { "destination" : [ "obj-7", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-35", 0 ] } } , { "patchline" : { "destination" : [ "obj-9", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 144.5, 345.0, 183.0, 345.0, 183.0, 357.0, 207.0, 357.0 ], "source" : [ "obj-35", 0 ] } } , { "patchline" : { "destination" : [ "obj-35", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-38", 0 ] } } , { "patchline" : { "destination" : [ "obj-48", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-43", 0 ] } } , { "patchline" : { "destination" : [ "obj-48", 1 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-44", 0 ] } } , { "patchline" : { "destination" : [ "obj-43", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-46", 0 ] } } , { "patchline" : { "destination" : [ "obj-44", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-47", 0 ] } } , { "patchline" : { "destination" : [ "obj-49", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-48", 0 ] } } , { "patchline" : { "destination" : [ "obj-35", 2 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 414.5, 313.0, 351.0, 313.0, 351.0, 255.0, 195.5, 255.0 ], "source" : [ "obj-49", 0 ] } } , { "patchline" : { "destination" : [ "obj-50", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-51", 0 ] } } , { "patchline" : { "destination" : [ "obj-8", 1 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 144.5, 501.0, 170.5, 501.0 ], "source" : [ "obj-7", 0 ] } } , { "patchline" : { "destination" : [ "obj-8", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-7", 0 ] } } ], "dependency_cache" : [ ], "embedsnapshot" : 0, "default_bgcolor" : [ 0.207843, 0.215686, 0.278431, 1.0 ], "color" : [ 0.901961, 0.901961, 0.901961, 1.0 ], "elementcolor" : [ 0.376471, 0.407843, 0.619608, 1.0 ], "accentcolor" : [ 0.552941, 0.588235, 0.85098, 1.0 ], "selectioncolor" : [ 0.552941, 0.588235, 0.85098, 1.0 ], "textcolor" : [ 0.090196, 0.07451, 0.07451, 1.0 ], "textcolor_inverse" : [ 0.721569, 0.737255, 0.85098, 1.0 ], "patchlinecolor" : [ 0.207843, 0.215686, 0.278431, 0.9 ], "bgfillcolor_type" : "gradient", "bgfillcolor_color1" : [ 0.376471, 0.407843, 0.619608, 1.0 ], "bgfillcolor_color2" : [ 0.376471, 0.407843, 0.619608, 1.0 ], "bgfillcolor_color" : [ 0.290196, 0.309804, 0.301961, 1.0 ], "bgfillcolor_angle" : 270.0, "bgfillcolor_proportion" : 0.39 } }