Is this the best way to make an lfo?

Jun 14, 2008 at 3:35pm

Is this the best way to make an lfo?

Can someone please check my sine lfo to see if it is OK? I would really like to trigger it at different phases and sync it to bpm but am not sure how to do this. I am using it to trigger drum samples in my machinedrum. Could someone give me a pointer please.

If anyone has any better more efficient lfo, I would be grateful.

Thanks, Miles

{
“patcher” : {
“fileversion” : 1,
“rect” : [ 29.0, 75.0, 957.0, 742.0 ],
“bglocked” : 0,
“defrect” : [ 29.0, 75.0, 957.0, 742.0 ],
“openrect” : [ 0.0, 0.0, 0.0, 0.0 ],
“openinpresentation” : 0,
“default_fontsize” : 12.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" : "delay 500",
"outlettype" : [ "bang" ],
“fontname” : “Arial”,
“id” : “obj-2″,
“fontsize” : 12.0,
“numinlets” : 2,
“patching_rect” : [ 255.0, 75.0, 63.0, 20.0 ],
“numoutlets” : 1
}

}
, {
“box” : {
“maxclass” : “toggle”,
“outlettype” : [ "int" ],
“id” : “obj-29″,
“numinlets” : 1,
“patching_rect” : [ 90.0, 150.0, 20.0, 20.0 ],
“numoutlets” : 1
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “dac~”,
“fontname” : “Arial”,
“id” : “obj-7″,
“fontsize” : 12.0,
“numinlets” : 2,
“patching_rect” : [ 90.0, 180.0, 37.0, 20.0 ],
“numoutlets” : 0
}

}
, {
“box” : {
“maxclass” : “message”,
“text” : “0″,
“outlettype” : [ "" ],
“fontname” : “Arial”,
“id” : “obj-16″,
“fontsize” : 9.0,
“numinlets” : 2,
“patching_rect” : [ 630.0, 255.0, 32.5, 15.0 ],
“numoutlets” : 1
}

}
, {
“box” : {
“maxclass” : “button”,
“outlettype” : [ "bang" ],
“id” : “obj-3″,
“numinlets” : 1,
“patching_rect” : [ 630.0, 191.0, 15.0, 15.0 ],
“numoutlets” : 1
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “delay 500″,
“outlettype” : [ "bang" ],
“fontname” : “Arial”,
“id” : “obj-4″,
“fontsize” : 9.0,
“numinlets” : 2,
“patching_rect” : [ 630.0, 210.0, 49.0, 17.0 ],
“numoutlets” : 1
}

}
, {
“box” : {
“maxclass” : “button”,
“outlettype” : [ "bang" ],
“id” : “obj-11″,
“numinlets” : 1,
“patching_rect” : [ 630.0, 233.0, 15.0, 15.0 ],
“numoutlets” : 1
}

}
, {
“box” : {
“maxclass” : “umenu”,
“items” : [ "Delta AP MIDI", ",", "ReMOTE25 V1.0" ],
“outlettype” : [ "int", "", "" ],
“fontname” : “Arial”,
“labelclick” : 1,
“types” : [ ],
“id” : “obj-12″,
“fontsize” : 9.0,
“numinlets” : 1,
“patching_rect” : [ 615.0, 285.0, 100.0, 17.0 ],
“numoutlets” : 3
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “midiinfo”,
“outlettype” : [ "" ],
“fontname” : “Arial”,
“id” : “obj-15″,
“fontsize” : 9.0,
“numinlets” : 2,
“patching_rect” : [ 615.0, 150.0, 41.0, 17.0 ],
“numoutlets” : 1
}

}
, {
“box” : {
“maxclass” : “message”,
“text” : “1″,
“outlettype” : [ "" ],
“fontname” : “Arial”,
“id” : “obj-60″,
“fontsize” : 9.0,
“numinlets” : 2,
“patching_rect” : [ 405.0, 75.0, 16.0, 15.0 ],
“numoutlets” : 1
}

}
, {
“box” : {
“maxclass” : “message”,
“text” : “0.25″,
“outlettype” : [ "" ],
“fontname” : “Arial”,
“id” : “obj-28″,
“fontsize” : 12.0,
“numinlets” : 2,
“patching_rect” : [ 315.0, 75.0, 34.0, 18.0 ],
“numoutlets” : 1
}

}
, {
“box” : {
“maxclass” : “number”,
“outlettype” : [ "int", "bang" ],
“fontname” : “Arial”,
“id” : “obj-27″,
“fontsize” : 12.0,
“numinlets” : 1,
“patching_rect” : [ 555.0, 285.0, 50.0, 20.0 ],
“numoutlets” : 2
}

}
, {
“box” : {
“maxclass” : “slider”,
“min” : 20.0,
“outlettype” : [ "" ],
“id” : “obj-26″,
“size” : 140.0,
“numinlets” : 1,
“patching_rect” : [ 555.0, 135.0, 20.0, 140.0 ],
“numoutlets” : 1
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “+ 20″,
“outlettype” : [ "int" ],
“fontname” : “Arial”,
“id” : “obj-25″,
“fontsize” : 12.0,
“numinlets” : 2,
“patching_rect” : [ 540.0, 315.0, 34.0, 20.0 ],
“numoutlets” : 1
}

}
, {
“box” : {
“maxclass” : “message”,
“text” : “100″,
“outlettype” : [ "" ],
“fontname” : “Arial”,
“id” : “obj-24″,
“fontsize” : 12.0,
“numinlets” : 2,
“patching_rect” : [ 375.0, 75.0, 32.5, 18.0 ],
“numoutlets” : 1
}

}
, {
“box” : {
“maxclass” : “message”,
“text” : “36″,
“outlettype” : [ "" ],
“fontname” : “Arial”,
“id” : “obj-23″,
“fontsize” : 12.0,
“numinlets” : 2,
“patching_rect” : [ 345.0, 75.0, 32.5, 18.0 ],
“numoutlets” : 1
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “loadbang”,
“outlettype” : [ "bang" ],
“fontname” : “Arial”,
“id” : “obj-22″,
“fontsize” : 12.0,
“numinlets” : 1,
“patching_rect” : [ 345.0, 30.0, 60.0, 20.0 ],
“numoutlets” : 1
}

}
, {
“box” : {
“maxclass” : “flonum”,
“outlettype” : [ "float", "bang" ],
“fontname” : “Arial”,
“id” : “obj-21″,
“fontsize” : 12.0,
“numinlets” : 1,
“patching_rect” : [ 240.0, 150.0, 50.0, 20.0 ],
“numoutlets” : 2
}

}
, {
“box” : {
“maxclass” : “number”,
“outlettype” : [ "int", "bang" ],
“triscale” : 0.9,
“fontname” : “Arial”,
“id” : “obj-54″,
“presentation_rect” : [ 735.0, 135.0, 35.0, 17.0 ],
“htextcolor” : [ 0.870588, 0.870588, 0.870588, 1.0 ],
“fontsize” : 9.0,
“numinlets” : 1,
“patching_rect” : [ 555.0, 435.0, 35.0, 17.0 ],
“presentation” : 1,
“numoutlets” : 2,
“bgcolor” : [ 0.866667, 0.866667, 0.866667, 1.0 ]
}

}
, {
“box” : {
“maxclass” : “number”,
“outlettype” : [ "int", "bang" ],
“triscale” : 0.9,
“fontname” : “Arial”,
“id” : “obj-57″,
“presentation_rect” : [ 690.0, 135.0, 35.0, 17.0 ],
“htextcolor” : [ 0.870588, 0.870588, 0.870588, 1.0 ],
“fontsize” : 9.0,
“numinlets” : 1,
“patching_rect” : [ 510.0, 435.0, 35.0, 17.0 ],
“presentation” : 1,
“numoutlets” : 2,
“bgcolor” : [ 0.866667, 0.866667, 0.866667, 1.0 ]
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “noteout”,
“fontname” : “Arial”,
“id” : “obj-61″,
“presentation_rect” : [ 690.0, 180.0, 40.0, 17.0 ],
“fontsize” : 9.0,
“numinlets” : 3,
“patching_rect” : [ 510.0, 480.0, 40.0, 17.0 ],
“presentation” : 1,
“numoutlets” : 0
}

}
, {
“box” : {
“maxclass” : “flonum”,
“outlettype” : [ "float", "bang" ],
“fontname” : “Arial”,
“id” : “obj-20″,
“fontsize” : 12.0,
“numinlets” : 1,
“patching_rect” : [ 240.0, 525.0, 50.0, 20.0 ],
“numoutlets” : 2
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “* 250.”,
“outlettype” : [ "float" ],
“fontname” : “Arial”,
“id” : “obj-19″,
“fontsize” : 12.0,
“numinlets” : 2,
“patching_rect” : [ 240.0, 495.0, 42.0, 20.0 ],
“numoutlets” : 1
}

}
, {
“box” : {
“maxclass” : “slider”,
“outlettype” : [ "" ],
“floatoutput” : 1,
“id” : “obj-17″,
“size” : 2.0,
“numinlets” : 1,
“patching_rect” : [ 240.0, 345.0, 20.0, 140.0 ],
“numoutlets” : 1
}

}
, {
“box” : {
“maxclass” : “button”,
“outlettype” : [ "bang" ],
“id” : “obj-14″,
“numinlets” : 1,
“patching_rect” : [ 510.0, 375.0, 20.0, 20.0 ],
“numoutlets” : 1
}

}
, {
“box” : {
“maxclass” : “flonum”,
“outlettype” : [ "float", "bang" ],
“fontname” : “Arial”,
“id” : “obj-13″,
“fontsize” : 12.0,
“numinlets” : 1,
“patching_rect” : [ 240.0, 315.0, 91.0, 20.0 ],
“numoutlets” : 2
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “+ 1.”,
“outlettype” : [ "float" ],
“fontname” : “Arial”,
“id” : “obj-10″,
“fontsize” : 12.0,
“numinlets” : 2,
“patching_rect” : [ 240.0, 285.0, 32.5, 20.0 ],
“numoutlets” : 1
}

}
, {
“box” : {
“maxclass” : “toggle”,
“outlettype” : [ "int" ],
“id” : “obj-9″,
“numinlets” : 1,
“patching_rect” : [ 510.0, 300.0, 20.0, 20.0 ],
“numoutlets” : 1
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “metro”,
“outlettype” : [ "bang" ],
“fontname” : “Arial”,
“id” : “obj-8″,
“fontsize” : 12.0,
“numinlets” : 2,
“patching_rect” : [ 510.0, 345.0, 41.0, 20.0 ],
“numoutlets” : 1
}

}
, {
“box” : {
“maxclass” : “flonum”,
“outlettype” : [ "float", "bang" ],
“fontname” : “Arial”,
“id” : “obj-6″,
“fontsize” : 12.0,
“numinlets” : 1,
“patching_rect” : [ 240.0, 255.0, 50.0, 20.0 ],
“numoutlets” : 2
}

}
, {
“box” : {
“maxclass” : “number~”,
“outlettype” : [ "signal", "float" ],
“fontname” : “Arial”,
“mode” : 2,
“sig” : 0.0,
“id” : “obj-5″,
“fontsize” : 12.0,
“numinlets” : 2,
“patching_rect” : [ 240.0, 225.0, 56.0, 20.0 ],
“numoutlets” : 2
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “cycle~ 1″,
“outlettype” : [ "signal" ],
“fontname” : “Arial”,
“id” : “obj-1″,
“fontsize” : 12.0,
“numinlets” : 2,
“patching_rect” : [ 240.0, 195.0, 55.0, 20.0 ],
“numoutlets” : 1
}

}
, {
“box” : {
“maxclass” : “panel”,
“id” : “obj-18″,
“numinlets” : 1,
“patching_rect” : [ 150.0, 135.0, 213.0, 428.0 ],
“numoutlets” : 0
}

}
],
“lines” : [ {
"patchline" : {
"source" : [ "obj-29", 0 ],
“destination” : [ "obj-7", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

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

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

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

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

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

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

}
, {
“patchline” : {
“source” : [ "obj-24", 0 ],
“destination” : [ "obj-54", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

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

}
, {
“patchline” : {
“source” : [ "obj-23", 0 ],
“destination” : [ "obj-57", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

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

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

}
, {
“patchline” : {
“source” : [ "obj-14", 0 ],
“destination” : [ "obj-57", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

}
, {
“patchline” : {
“source” : [ "obj-54", 0 ],
“destination” : [ "obj-61", 1 ],
“hidden” : 1,
“midpoints” : [ 564.5, 459.0, 530.0, 459.0 ]
}

}
, {
“patchline” : {
“source” : [ "obj-57", 0 ],
“destination” : [ "obj-61", 0 ],
“hidden” : 1,
“midpoints” : [ 519.5, 459.0, 519.5, 459.0 ]
}

}
, {
“patchline” : {
“source” : [ "obj-17", 0 ],
“destination” : [ "obj-19", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

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

}
, {
“patchline” : {
“source” : [ "obj-10", 0 ],
“destination” : [ "obj-13", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

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

}
, {
“patchline” : {
“source” : [ "obj-13", 0 ],
“destination” : [ "obj-17", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

}
, {
“patchline” : {
“source” : [ "obj-8", 0 ],
“destination” : [ "obj-14", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

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

}
, {
“patchline” : {
“source” : [ "obj-5", 1 ],
“destination” : [ "obj-6", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

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

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

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

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

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

}
, {
“patchline” : {
“source” : [ "obj-60", 0 ],
“destination” : [ "obj-15", 1 ],
“hidden” : 0,
“midpoints” : [ ]
}

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

}
, {
“patchline” : {
“source” : [ "obj-12", 1 ],
“destination” : [ "obj-61", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

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

}
, {
“patchline” : {
“source” : [ "obj-60", 0 ],
“destination” : [ "obj-61", 2 ],
“hidden” : 0,
“midpoints” : [ ]
}

}
, {
“patchline” : {
“source” : [ "obj-11", 0 ],
“destination” : [ "obj-16", 0 ],
“hidden” : 0,
“midpoints” : [ ]
}

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

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

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

}
]
}

}

#38406
Jun 14, 2008 at 4:54pm

Here is two LFO examples…

The use of snapshot~ has lower overhead than number~

– Pasted Max Patch, click to expand. –
#133938
Jun 21, 2008 at 9:51am

Thanks spleef. That is much more efficient. Sorry about the late reply. I just got back from my holiday.

Regards,

Miles

#133939

You must be logged in to reply to this topic.