seq~ & timing


    Nov 29 2008 | 9:50 pm
    hello everybody,
    i got a patch that using the seq~ object to store data and play it with
    the phasor~ 1.
    i send two "add A_seq $1 bang" messages (one with 0. and the other with
    0.5) to seq~
    just to detect the time between the bangs via a timer object and i get
    unprecise results.
    what i expect is: 500., 500., 500., 500...
    what i get is:
    print: 510.748993
    print: 511.000000
    print: 510.000000
    print: 512.000000
    print: 462.111145
    print: 512.310242
    print: 511.772797
    print: 510.000000
    print: 465.000000
    print: 511.000000
    print: 511.000000
    is there any preferences for time handling in max 5?
    any other suggestions?
    thanks, johannes.
    {
    "patcher" : {
    "fileversion" : 1,
    "rect" : [ 166.0, 126.0, 594.0, 439.0 ],
    "bglocked" : 0,
    "defrect" : [ 166.0, 126.0, 594.0, 439.0 ],
    "openrect" : [ 0.0, 0.0, 0.0, 0.0 ],
    "openinpresentation" : 0,
    "default_fontsize" : 10.0,
    "default_fontface" : 0,
    "default_fontname" : "Arial",
    "gridonopen" : 0,
    "gridsize" : [ 15.0, 15.0 ],
    "gridsnaponopen" : 0,
    "toolbarvisible" : 1,
    "boxanimatetime" : 200,
    "imprint" : 0,
    "metadata" : [ ],
    "boxes" : [ {
    "box" : {
    "maxclass" : "newobj",
    "text" : "del 100",
    "fontsize" : 10.0,
    "numinlets" : 2,
    "id" : "obj-6",
    "numoutlets" : 1,
    "fontname" : "Arial",
    "patching_rect" : [ 541.0, 54.0, 43.0, 18.0 ],
    "outlettype" : [ "bang" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "comment",
    "text" : "stert/stop",
    "fontsize" : 10.0,
    "numinlets" : 1,
    "id" : "obj-16",
    "numoutlets" : 0,
    "fontname" : "Arial",
    "patching_rect" : [ 485.0, 90.0, 150.0, 18.0 ]
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "click~",
    "fontsize" : 10.0,
    "numinlets" : 1,
    "id" : "obj-5",
    "numoutlets" : 1,
    "fontname" : "Arial",
    "patching_rect" : [ 41.0, 290.0, 36.0, 18.0 ],
    "outlettype" : [ "signal" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "loadbang",
    "fontsize" : 10.0,
    "numinlets" : 1,
    "id" : "obj-2",
    "numoutlets" : 1,
    "fontname" : "Arial",
    "patching_rect" : [ 468.0, 7.0, 52.0, 18.0 ],
    "outlettype" : [ "bang" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "flonum",
    "fontsize" : 10.0,
    "numinlets" : 1,
    "id" : "obj-13",
    "numoutlets" : 2,
    "fontname" : "Arial",
    "patching_rect" : [ 136.0, 288.0, 84.0, 18.0 ],
    "outlettype" : [ "float", "bang" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "timer",
    "fontsize" : 10.0,
    "numinlets" : 2,
    "id" : "obj-11",
    "numoutlets" : 2,
    "fontname" : "Arial",
    "patching_rect" : [ 136.0, 260.0, 33.0, 18.0 ],
    "outlettype" : [ "float", "" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "message",
    "text" : "0.5",
    "fontsize" : 10.0,
    "numinlets" : 2,
    "id" : "obj-10",
    "numoutlets" : 1,
    "fontname" : "Arial",
    "patching_rect" : [ 354.0, 51.0, 32.5, 16.0 ],
    "outlettype" : [ "" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "message",
    "text" : "0.",
    "fontsize" : 10.0,
    "numinlets" : 2,
    "id" : "obj-9",
    "numoutlets" : 1,
    "fontname" : "Arial",
    "patching_rect" : [ 305.0, 51.0, 32.5, 16.0 ],
    "outlettype" : [ "" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "message",
    "text" : "erase",
    "fontsize" : 10.0,
    "numinlets" : 2,
    "id" : "obj-7",
    "numoutlets" : 1,
    "fontname" : "Arial",
    "patching_rect" : [ 485.0, 147.0, 36.0, 16.0 ],
    "outlettype" : [ "" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "message",
    "text" : "add A_seq $1 bang",
    "fontsize" : 12.0,
    "numinlets" : 2,
    "id" : "obj-1",
    "numoutlets" : 1,
    "fontname" : "Courier",
    "patching_rect" : [ 305.0, 112.0, 131.0, 16.0 ],
    "outlettype" : [ "" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "button",
    "numinlets" : 1,
    "id" : "obj-3",
    "numoutlets" : 1,
    "patching_rect" : [ 41.0, 260.0, 20.0, 20.0 ],
    "outlettype" : [ "bang" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "ezdac~",
    "varname" : "autohelp_dac",
    "numinlets" : 2,
    "id" : "obj-4",
    "local" : 1,
    "numoutlets" : 0,
    "patching_rect" : [ 41.0, 328.0, 45.0, 45.0 ]
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "snapshot~ 20",
    "fontsize" : 11.595187,
    "numinlets" : 2,
    "id" : "obj-32",
    "numoutlets" : 1,
    "fontname" : "Arial",
    "patching_rect" : [ 136.0, 61.0, 80.0, 20.0 ],
    "outlettype" : [ "float" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "* 127.",
    "fontsize" : 11.595187,
    "numinlets" : 2,
    "id" : "obj-33",
    "numoutlets" : 1,
    "fontname" : "Arial",
    "patching_rect" : [ 136.0, 83.0, 41.0, 20.0 ],
    "outlettype" : [ "float" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "slider",
    "orientation" : 1,
    "numinlets" : 1,
    "id" : "obj-34",
    "numoutlets" : 1,
    "patching_rect" : [ 136.0, 109.0, 140.0, 20.0 ],
    "outlettype" : [ "" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "message",
    "text" : "seq A_seq",
    "fontsize" : 11.595187,
    "numinlets" : 2,
    "id" : "obj-35",
    "numoutlets" : 1,
    "fontname" : "Arial",
    "patching_rect" : [ 468.0, 53.0, 65.0, 18.0 ],
    "outlettype" : [ "" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "seq~",
    "fontsize" : 11.595187,
    "numinlets" : 1,
    "id" : "obj-43",
    "numoutlets" : 3,
    "fontname" : "Arial",
    "patching_rect" : [ 41.0, 174.0, 46.0, 20.0 ],
    "outlettype" : [ "", "", "" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "r toseq",
    "fontsize" : 11.595187,
    "numinlets" : 0,
    "id" : "obj-44",
    "numoutlets" : 1,
    "fontname" : "Arial",
    "patching_rect" : [ 79.0, 148.0, 46.0, 20.0 ],
    "outlettype" : [ "" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "route bang",
    "fontsize" : 11.595187,
    "numinlets" : 1,
    "id" : "obj-45",
    "numoutlets" : 2,
    "fontname" : "Arial",
    "patching_rect" : [ 41.0, 200.0, 66.0, 20.0 ],
    "outlettype" : [ "", "" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "toggle",
    "numinlets" : 1,
    "id" : "obj-47",
    "numoutlets" : 1,
    "patching_rect" : [ 462.0, 88.0, 20.0, 20.0 ],
    "outlettype" : [ "int" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "message",
    "text" : "play $1",
    "fontsize" : 11.595187,
    "numinlets" : 2,
    "id" : "obj-48",
    "numoutlets" : 1,
    "fontname" : "Arial",
    "patching_rect" : [ 462.0, 112.0, 48.0, 18.0 ],
    "outlettype" : [ "" ]
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "s toseq",
    "fontsize" : 11.595187,
    "numinlets" : 1,
    "id" : "obj-52",
    "numoutlets" : 0,
    "fontname" : "Arial",
    "patching_rect" : [ 433.0, 234.0, 46.0, 20.0 ]
    }
    }
    , {
    "box" : {
    "maxclass" : "newobj",
    "text" : "phasor~ 1.",
    "fontsize" : 11.595187,
    "numinlets" : 2,
    "id" : "obj-54",
    "numoutlets" : 1,
    "fontname" : "Arial",
    "patching_rect" : [ 41.0, 105.0, 66.0, 20.0 ],
    "outlettype" : [ "signal" ]
    }
    }
    ],
    "lines" : [ {
    "patchline" : {
    "source" : [ "obj-6", 0 ],
    "destination" : [ "obj-47", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-2", 0 ],
    "destination" : [ "obj-6", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-5", 0 ],
    "destination" : [ "obj-4", 1 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-5", 0 ],
    "destination" : [ "obj-4", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-3", 0 ],
    "destination" : [ "obj-5", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-2", 0 ],
    "destination" : [ "obj-10", 0 ],
    "hidden" : 0,
    "midpoints" : [ 477.5, 43.0, 363.5, 43.0 ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-2", 0 ],
    "destination" : [ "obj-9", 0 ],
    "hidden" : 0,
    "midpoints" : [ 477.5, 35.0, 314.5, 35.0 ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-2", 0 ],
    "destination" : [ "obj-35", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-44", 0 ],
    "destination" : [ "obj-43", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-32", 0 ],
    "destination" : [ "obj-33", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-33", 0 ],
    "destination" : [ "obj-34", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-35", 0 ],
    "destination" : [ "obj-52", 0 ],
    "hidden" : 0,
    "midpoints" : [ 477.5, 77.0, 442.5, 77.0 ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-48", 0 ],
    "destination" : [ "obj-52", 0 ],
    "hidden" : 0,
    "midpoints" : [ 471.5, 145.0, 442.5, 145.0 ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-47", 0 ],
    "destination" : [ "obj-48", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-43", 0 ],
    "destination" : [ "obj-45", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-45", 0 ],
    "destination" : [ "obj-3", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-9", 0 ],
    "destination" : [ "obj-1", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-10", 0 ],
    "destination" : [ "obj-1", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-11", 0 ],
    "destination" : [ "obj-13", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-45", 0 ],
    "destination" : [ "obj-11", 1 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-45", 0 ],
    "destination" : [ "obj-11", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-54", 0 ],
    "destination" : [ "obj-43", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-54", 0 ],
    "destination" : [ "obj-32", 0 ],
    "hidden" : 0,
    "midpoints" : [ 50.5, 135.0, 126.0, 135.0, 126.0, 53.0, 145.5, 53.0 ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-1", 0 ],
    "destination" : [ "obj-52", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    , {
    "patchline" : {
    "source" : [ "obj-7", 0 ],
    "destination" : [ "obj-52", 0 ],
    "hidden" : 0,
    "midpoints" : [ ]
    }
    }
    ]
    }
    }

    • Nov 29 2008 | 11:04 pm
      The [metro] object with an argument of 500 will do what your patch is attempting, send out a bang every 500 ms. If you want to explore timing in Max then have a look at tutorial number 19. Also the [transport] object will help with sequencing events. Have a look at the helpfile, references and related objects.
      One other thing, when copying your work as text to the forum/mailing list from Max5 you want to select your patch and then choose "Copy Compressed" from the Edit menu. It takes up less space in a post and should look a little bit like the following.
      lh
    • Nov 30 2008 | 12:17 am
      thanks,
      finally i like the seq~ object to schedule trigger notes. the sum of it can
      be scaled to one phase of a phasor~ (from 0. to 1.) then i play it back
      and send it as midinotes to a synthesizer.
      what about the priority and precision in time of signal objects in comparison
      to message based objekts?
      j
      Luke schrieb:
      > The [metro] object with an argument of 500 will do what your patch is attempting, send out a bang every 500 ms. If you want to explore timing in Max then have a look at tutorial number 19. Also the [transport] object will help with sequencing events. Have a look at the helpfile, references and related objects.
      >
      > One other thing, when copying your work as text to the forum/mailing list from Max5 you want to select your patch and then choose "Copy Compressed" from the Edit menu. It takes up less space in a post and should look a little bit like the following.
      >
      > lh
      >
      >
      >
      >
      >
      >
    • Nov 30 2008 | 12:55 am