Help please for my simon says

6 views
Skip to first unread message

Elizabeth Boyle

unread,
Mar 25, 2013, 2:02:12 PM3/25/13
to media-ins...@googlegroups.com
I am creating a motion tracking simon says game, and I am trying to figure out a way to create a random sequence that will add one bang after each successful press of a ubutton. Any ideas?

dtin...@asu.edu

unread,
Mar 26, 2013, 12:15:27 AM3/26/13
to media-ins...@googlegroups.com
nice little object called "accum" for adding, subtracting, tallying.

{
    "boxes" : [         {
            "box" :             {
                "maxclass" : "button",
                "presentation_rect" : [ 91.0, 120.0, 0.0, 0.0 ],
                "numinlets" : 1,
                "patching_rect" : [ 165.0, 135.0, 45.0, 45.0 ],
                "numoutlets" : 1,
                "id" : "obj-2",
                "outlettype" : [ "bang" ]
            }

        }
,         {
            "box" :             {
                "maxclass" : "newobj",
                "text" : "trigger bang -1",
                "fontsize" : 13.0,
                "numinlets" : 1,
                "patching_rect" : [ 165.0, 195.0, 95.0, 21.0 ],
                "numoutlets" : 2,
                "id" : "obj-3",
                "fontname" : "Arial",
                "outlettype" : [ "bang", "int" ]
            }

        }
,         {
            "box" :             {
                "maxclass" : "button",
                "numinlets" : 1,
                "patching_rect" : [ 285.0, 135.0, 45.0, 45.0 ],
                "numoutlets" : 1,
                "id" : "obj-42",
                "outlettype" : [ "bang" ]
            }

        }
,         {
            "box" :             {
                "maxclass" : "flonum",
                "fontsize" : 13.0,
                "numinlets" : 1,
                "patching_rect" : [ 240.0, 313.0, 50.0, 21.0 ],
                "numoutlets" : 2,
                "id" : "obj-39",
                "fontname" : "Arial",
                "parameter_enable" : 0,
                "outlettype" : [ "float", "bang" ]
            }

        }
,         {
            "box" :             {
                "maxclass" : "newobj",
                "text" : "trigger bang 1",
                "fontsize" : 13.0,
                "numinlets" : 1,
                "patching_rect" : [ 285.0, 195.0, 91.0, 21.0 ],
                "numoutlets" : 2,
                "id" : "obj-34",
                "fontname" : "Arial",
                "outlettype" : [ "bang", "int" ]
            }

        }
,         {
            "box" :             {
                "maxclass" : "newobj",
                "text" : "accum 1",
                "fontsize" : 13.0,
                "numinlets" : 3,
                "patching_rect" : [ 240.0, 285.0, 60.0, 21.0 ],
                "numoutlets" : 1,
                "id" : "obj-29",
                "fontname" : "Arial",
                "outlettype" : [ "int" ]
            }

        }
 ],
    "lines" : [         {
            "patchline" :             {
                "source" : [ "obj-3", 1 ],
                "destination" : [ "obj-29", 1 ],
                "hidden" : 0,
                "disabled" : 0
            }

        }
,         {
            "patchline" :             {
                "source" : [ "obj-3", 0 ],
                "destination" : [ "obj-29", 0 ],
                "hidden" : 0,
                "disabled" : 0
            }

        }
,         {
            "patchline" :             {
                "source" : [ "obj-2", 0 ],
                "destination" : [ "obj-3", 0 ],
                "hidden" : 0,
                "disabled" : 0
            }

        }
,         {
            "patchline" :             {
                "source" : [ "obj-34", 0 ],
                "destination" : [ "obj-29", 0 ],
                "hidden" : 0,
                "disabled" : 0
            }

        }
,         {
            "patchline" :             {
                "source" : [ "obj-34", 1 ],
                "destination" : [ "obj-29", 1 ],
                "hidden" : 0,
                "disabled" : 0
            }

        }
,         {
            "patchline" :             {
                "source" : [ "obj-42", 0 ],
                "destination" : [ "obj-34", 0 ],
                "hidden" : 0,
                "disabled" : 0
            }

        }
,         {
            "patchline" :             {
                "source" : [ "obj-29", 0 ],
                "destination" : [ "obj-39", 0 ],
                "hidden" : 0,
                "disabled" : 0
            }

        }
 ],
    "appversion" :     {
        "major" : 6,
        "minor" : 0,
        "revision" : 5
    }

}

Reply all
Reply to author
Forward
0 new messages