BPM Tap control slider?
Hey I was wondering if someone could help me with this:
I want to tap out a BPM and then have a slider bounce between 0 and 100 (hitting all the numbers inbetween) within the given tempo that I tapped out, basically going up to 100 on 1 beat and then coming back down to 0 on the next. Could anyone help me with how to go about doing that?
I have BPM tapper here:
{
"boxes" : [ {
"box" : {
"maxclass" : "comment",
"text" : "BPM",
"patching_rect" : [ 124.0, 223.0, 150.0, 20.0 ],
"numinlets" : 1,
"id" : "obj-6",
"fontname" : "Arial",
"numoutlets" : 0,
"fontsize" : 12.0
}
}
, {
"box" : {
"maxclass" : "comment",
"text" : "Milliseconds",
"patching_rect" : [ 327.0, 240.0, 150.0, 20.0 ],
"numinlets" : 1,
"id" : "obj-5",
"fontname" : "Arial",
"numoutlets" : 0,
"fontsize" : 12.0
}
}
, {
"box" : {
"maxclass" : "comment",
"text" : "Tap twice",
"patching_rect" : [ 309.0, 100.0, 150.0, 20.0 ],
"numinlets" : 1,
"id" : "obj-4",
"fontname" : "Arial",
"numoutlets" : 0,
"fontsize" : 12.0
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "/ 1.",
"patching_rect" : [ 206.0, 377.0, 32.5, 20.0 ],
"numinlets" : 2,
"id" : "obj-18",
"fontname" : "Arial",
"numoutlets" : 1,
"outlettype" : [ "float" ],
"fontsize" : 12.0
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "60000.",
"patching_rect" : [ 266.0, 280.0, 47.0, 18.0 ],
"numinlets" : 2,
"id" : "obj-17",
"fontname" : "Arial",
"numoutlets" : 1,
"outlettype" : [ "" ],
"fontsize" : 12.0
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "/ 1.",
"patching_rect" : [ 60.0, 311.0, 32.5, 20.0 ],
"numinlets" : 2,
"id" : "obj-15",
"fontname" : "Arial",
"numoutlets" : 1,
"outlettype" : [ "float" ],
"fontsize" : 12.0
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "60000.",
"patching_rect" : [ 50.0, 269.0, 47.0, 18.0 ],
"numinlets" : 2,
"id" : "obj-14",
"fontname" : "Arial",
"numoutlets" : 1,
"outlettype" : [ "" ],
"fontsize" : 12.0
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "Stop",
"patching_rect" : [ 435.0, 300.0, 35.0, 18.0 ],
"numinlets" : 2,
"id" : "obj-3",
"fontname" : "Arial",
"numoutlets" : 1,
"outlettype" : [ "" ],
"fontsize" : 12.0
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "prepend set",
"patching_rect" : [ 123.0, 353.0, 74.0, 20.0 ],
"numinlets" : 1,
"id" : "obj-7",
"fontname" : "Arial",
"numoutlets" : 1,
"outlettype" : [ "" ],
"fontsize" : 12.0
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "metro",
"patching_rect" : [ 380.0, 286.0, 41.0, 20.0 ],
"numinlets" : 2,
"id" : "obj-16",
"fontname" : "Arial",
"numoutlets" : 1,
"outlettype" : [ "bang" ],
"fontsize" : 12.0
}
}
, {
"box" : {
"maxclass" : "led",
"bgcolor" : [ 1.0, 1.0, 1.0, 1.0 ],
"patching_rect" : [ 390.0, 330.0, 106.0, 106.0 ],
"numinlets" : 1,
"id" : "obj-13",
"numoutlets" : 1,
"outlettype" : [ "int" ]
}
}
, {
"box" : {
"maxclass" : "flonum",
"patching_rect" : [ 62.0, 223.0, 50.0, 20.0 ],
"numinlets" : 1,
"id" : "obj-12",
"fontname" : "Arial",
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ],
"fontsize" : 12.0
}
}
, {
"box" : {
"maxclass" : "flonum",
"patching_rect" : [ 275.0, 240.0, 50.0, 20.0 ],
"numinlets" : 1,
"id" : "obj-9",
"fontname" : "Arial",
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ],
"fontsize" : 12.0
}
}
, {
"box" : {
"maxclass" : "button",
"patching_rect" : [ 284.0, 100.0, 20.0, 20.0 ],
"numinlets" : 1,
"id" : "obj-2",
"numoutlets" : 1,
"outlettype" : [ "bang" ]
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "timer",
"patching_rect" : [ 276.0, 198.0, 37.0, 20.0 ],
"numinlets" : 2,
"id" : "obj-1",
"fontname" : "Arial",
"numoutlets" : 2,
"outlettype" : [ "float", "" ],
"fontsize" : 12.0
}
}
],
"lines" : [ {
"patchline" : {
"source" : [ "obj-16", 0 ],
"destination" : [ "obj-13", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-3", 0 ],
"destination" : [ "obj-16", 1 ],
"hidden" : 0,
"midpoints" : [ 444.5, 271.0, 411.5, 271.0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-12", 0 ],
"destination" : [ "obj-15", 1 ],
"hidden" : 0,
"midpoints" : [ 71.5, 256.0, 107.0, 256.0, 107.0, 298.0, 83.0, 298.0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-12", 0 ],
"destination" : [ "obj-14", 0 ],
"hidden" : 0,
"midpoints" : [ 71.5, 256.0, 59.5, 256.0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-14", 0 ],
"destination" : [ "obj-15", 0 ],
"hidden" : 0,
"midpoints" : [ 59.5, 298.0, 69.5, 298.0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-15", 0 ],
"destination" : [ "obj-7", 0 ],
"hidden" : 0,
"midpoints" : [ 69.5, 349.0, 132.5, 349.0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-17", 0 ],
"destination" : [ "obj-18", 0 ],
"hidden" : 0,
"midpoints" : [ 275.5, 364.0, 215.5, 364.0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-9", 0 ],
"destination" : [ "obj-18", 1 ],
"hidden" : 0,
"midpoints" : [ 284.5, 262.0, 229.0, 262.0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-18", 0 ],
"destination" : [ "obj-12", 0 ],
"hidden" : 0,
"midpoints" : [ 215.5, 397.0, 122.0, 397.0, 122.0, 208.0, 71.5, 208.0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-9", 0 ],
"destination" : [ "obj-17", 0 ],
"hidden" : 0,
"midpoints" : [ 284.5, 268.0, 275.5, 268.0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-7", 0 ],
"destination" : [ "obj-9", 0 ],
"hidden" : 0,
"midpoints" : [ 132.5, 373.0, 110.0, 373.0, 110.0, 253.0, 260.0, 253.0, 260.0, 235.0, 284.5, 235.0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-9", 0 ],
"destination" : [ "obj-16", 1 ],
"hidden" : 0,
"midpoints" : [ 284.5, 343.0, 365.0, 343.0, 365.0, 271.0, 411.5, 271.0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-2", 0 ],
"destination" : [ "obj-1", 0 ],
"hidden" : 0,
"midpoints" : [ 293.5, 184.0, 285.5, 184.0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-2", 0 ],
"destination" : [ "obj-1", 1 ],
"hidden" : 0,
"midpoints" : [ 293.5, 184.0, 303.5, 184.0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-1", 0 ],
"destination" : [ "obj-9", 0 ],
"hidden" : 0,
"midpoints" : [ 285.5, 235.0, 284.5, 235.0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-2", 0 ],
"destination" : [ "obj-16", 0 ],
"hidden" : 0,
"midpoints" : [ 293.5, 178.0, 389.5, 178.0 ]
}
}
]
}
Using the line object allows you to move between two numbers (ramp) over a period of time, try this:
You may also use [sync~].
J-F.
the same a bit streamlined...
Oh yeah, nice one! Much cleaner, got into a dirty habit of using the message box like that