Forums > MaxMSP

syncing transport bar with loops

February 13, 2011 | 6:20 pm

Hi i am trying to use the tempo in the transport bar to control the playback speed of my loops in the groove~ object so that the speed of the loop is the same tempo as in the transport bar but am having some trouble figuring out exactly how to do it and was wondering if anyone might be able to help


February 13, 2011 | 11:39 pm

translate


February 14, 2011 | 11:16 am

what i want to be able to do is to import a loop into a buffer and play it back through the groove~ object however I would like to be able to then control the speed of the loop with the tempo from the transport object so that the transport bpm and the bpm of the loop are in time with each other. This is a patch with the main objects in it.

{
"boxes" : [ {
"box" : {
"maxclass" : "comment",
"text" : "what i want to be able to do is to import a loop into the buffer and play it back through the groove~ object however I would like to be able to then control the speed of the loop with the tempo from the transport object so that the transport bpm and the bpm of the loop are in time with each other",
"linecount" : 11,
"fontsize" : 18.0,
"numinlets" : 1,
"patching_rect" : [ 552.0, 46.0, 248.0, 234.0 ],
"id" : "obj-7",
"fontname" : "Arial",
"numoutlets" : 0
}

}
, {
"box" : {
"maxclass" : "number",
"fontsize" : 12.0,
"numinlets" : 1,
"patching_rect" : [ 450.0, 390.0, 50.0, 20.0 ],
"id" : "obj-65",
"fontname" : "Arial",
"numoutlets" : 2,
"outlettype" : [ "int", "bang" ]
}

}
, {
"box" : {
"maxclass" : "number",
"fontsize" : 12.0,
"numinlets" : 1,
"patching_rect" : [ 386.0, 314.0, 50.0, 20.0 ],
"id" : "obj-64",
"fontname" : "Arial",
"numoutlets" : 2,
"outlettype" : [ "int", "bang" ]
}

}
, {
"box" : {
"maxclass" : "message",
"text" : "tempo $1",
"fontsize" : 12.0,
"numinlets" : 2,
"patching_rect" : [ 386.0, 338.0, 61.0, 18.0 ],
"id" : "obj-62",
"fontname" : "Arial",
"numoutlets" : 1,
"outlettype" : [ "" ]
}

}
, {
"box" : {
"maxclass" : "newobj",
"text" : "transport",
"fontsize" : 12.0,
"numinlets" : 2,
"patching_rect" : [ 386.0, 363.0, 146.0, 20.0 ],
"id" : "obj-60",
"fontname" : "Arial",
"numoutlets" : 9,
"outlettype" : [ "int", "int", "float", "float", "float", "", "int", "float", "" ]
}

}
, {
"box" : {
"maxclass" : "message",
"text" : "read",
"fontsize" : 12.0,
"numinlets" : 2,
"patching_rect" : [ 612.0, 319.0, 35.0, 18.0 ],
"id" : "obj-12",
"fontname" : "Arial",
"numoutlets" : 1,
"outlettype" : [ "" ]
}

}
, {
"box" : {
"maxclass" : "newobj",
"text" : "buffer~ playhey",
"fontsize" : 12.0,
"numinlets" : 1,
"patching_rect" : [ 611.0, 352.0, 93.0, 20.0 ],
"id" : "obj-9",
"fontname" : "Arial",
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ]
}

}
, {
"box" : {
"maxclass" : "message",
"text" : "startloop",
"fontsize" : 12.0,
"numinlets" : 2,
"patching_rect" : [ 104.0, 162.0, 57.0, 18.0 ],
"id" : "obj-28",
"fontname" : "Arial",
"numoutlets" : 1,
"outlettype" : [ "" ]
}

}
, {
"box" : {
"maxclass" : "toggle",
"numinlets" : 1,
"patching_rect" : [ 38.0, 115.0, 20.0, 20.0 ],
"id" : "obj-27",
"numoutlets" : 1,
"outlettype" : [ "int" ]
}

}
, {
"box" : {
"maxclass" : "message",
"text" : "loop $1",
"fontsize" : 12.0,
"numinlets" : 2,
"patching_rect" : [ 36.0, 161.0, 50.0, 18.0 ],
"id" : "obj-25",
"fontname" : "Arial",
"numoutlets" : 1,
"outlettype" : [ "" ]
}

}
, {
"box" : {
"maxclass" : "flonum",
"fontsize" : 12.0,
"numinlets" : 1,
"patching_rect" : [ 179.0, 90.0, 50.0, 20.0 ],
"id" : "obj-22",
"fontname" : "Arial",
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ]
}

}
, {
"box" : {
"maxclass" : "newobj",
"text" : "sig~",
"fontsize" : 12.0,
"numinlets" : 1,
"patching_rect" : [ 174.0, 132.0, 33.0, 20.0 ],
"id" : "obj-20",
"fontname" : "Arial",
"numoutlets" : 1,
"outlettype" : [ "signal" ]
}

}
, {
"box" : {
"maxclass" : "message",
"text" : "set playhey",
"fontsize" : 12.0,
"numinlets" : 2,
"patching_rect" : [ 266.0, 116.0, 71.0, 18.0 ],
"id" : "obj-6",
"fontname" : "Arial",
"numoutlets" : 1,
"outlettype" : [ "" ]
}

}
, {
"box" : {
"maxclass" : "waveform~",
"buffername" : "playhey",
"numinlets" : 5,
"patching_rect" : [ 266.0, 144.0, 256.0, 64.0 ],
"id" : "obj-4",
"numoutlets" : 6,
"textcolor" : [ ],
"outlettype" : [ "float", "float", "float", "float", "list", "" ]
}

}
, {
"box" : {
"maxclass" : "newobj",
"text" : "*~ 0.5",
"fontsize" : 12.0,
"numinlets" : 2,
"patching_rect" : [ 158.0, 272.0, 42.0, 20.0 ],
"id" : "obj-3",
"fontname" : "Arial",
"numoutlets" : 1,
"outlettype" : [ "signal" ]
}

}
, {
"box" : {
"maxclass" : "ezdac~",
"numinlets" : 2,
"patching_rect" : [ 170.0, 323.0, 45.0, 45.0 ],
"id" : "obj-2",
"numoutlets" : 0
}

}
, {
"box" : {
"maxclass" : "newobj",
"text" : "groove~ playhey",
"fontsize" : 12.0,
"numinlets" : 3,
"patching_rect" : [ 174.0, 220.0, 99.0, 20.0 ],
"id" : "obj-1",
"fontname" : "Arial",
"numoutlets" : 2,
"outlettype" : [ "signal", "signal" ]
}

}
],
"lines" : [ {
"patchline" : {
"source" : [ "obj-62", 0 ],
"destination" : [ "obj-60", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-64", 0 ],
"destination" : [ "obj-62", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-60", 4 ],
"destination" : [ "obj-65", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-12", 0 ],
"destination" : [ "obj-9", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}

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

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

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

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

}
, {
"patchline" : {
"source" : [ "obj-4", 2 ],
"destination" : [ "obj-1", 1 ],
"hidden" : 0,
"midpoints" : [ ]
}

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

}
, {
"patchline" : {
"source" : [ "obj-6", 0 ],
"destination" : [ "obj-4", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-20", 0 ],
"destination" : [ "obj-1", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-22", 0 ],
"destination" : [ "obj-20", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-25", 0 ],
"destination" : [ "obj-1", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-27", 0 ],
"destination" : [ "obj-25", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}

}
, {
"patchline" : {
"source" : [ "obj-28", 0 ],
"destination" : [ "obj-1", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}

}
]
}


Viewing 3 posts - 1 through 3 (of 3 total)