Large Value Jumps

Nov 25, 2012 at 9:51pm

Large Value Jumps

How can I eliminate large value jumps?

It’s for a pitchtracking (sigmund~) patch that obviously jumps around a lot when using a live audio input, I wish to eliminate these big jumps that occur, Im thinking something along the lines of a bucket object and an if $f1>$f2 object and perhaps a + object but I cant quite get my head around it.

Many thanks :)

#65359
Nov 25, 2012 at 10:14pm

If you’re tracking a specific instrument, why not do a little filtering to cut off frequencies above the highest frequency you actually want to detect? Ditto with the low end. Better input, better output.

#235545
Nov 25, 2012 at 10:35pm

This kinda works but has anyone got anything better?

{
“boxes” : [ {
"box" : {
"maxclass" : "number",
"patching_rect" : [ 177.099991, 194.0, 50.0, 20.0 ],
“numinlets” : 1,
“parameter_enable” : 0,
“numoutlets” : 2,
“fontname” : “Arial”,
“outlettype” : [ "int", "bang" ],
“id” : “obj-102″,
“fontsize” : 12.0
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “speedlim 1″,
“patching_rect” : [ 241.0, 224.5, 69.0, 20.0 ],
“numinlets” : 2,
“numoutlets” : 1,
“fontname” : “Arial”,
“outlettype” : [ "" ],
“id” : “obj-98″,
“fontsize” : 12.0
}

}
, {
“box” : {
“maxclass” : “flonum”,
“patching_rect” : [ 242.0, 750.19989, 50.0, 20.0 ],
“numinlets” : 1,
“parameter_enable” : 0,
“numoutlets” : 2,
“fontname” : “Arial”,
“outlettype” : [ "float", "bang" ],
“id” : “obj-89″,
“presentation_rect” : [ 243.100006, 750.19989, 0.0, 0.0 ],
“fontsize” : 12.0
}

}
, {
“box” : {
“maxclass” : “flonum”,
“patching_rect” : [ 300.299988, 114.399986, 50.0, 20.0 ],
“numinlets” : 1,
“parameter_enable” : 0,
“numoutlets” : 2,
“fontname” : “Arial”,
“outlettype” : [ "float", "bang" ],
“id” : “obj-74″,
“fontsize” : 12.0
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “*~”,
“patching_rect” : [ 241.0, 154.0, 78.299988, 20.0 ],
“numinlets” : 2,
“numoutlets” : 1,
“fontname” : “Arial”,
“outlettype” : [ "signal" ],
“id” : “obj-72″,
“fontsize” : 12.0
}

}
, {
“box” : {
“maxclass” : “ezdac~”,
“patching_rect” : [ 242.0, 856.099976, 45.0, 45.0 ],
“numinlets” : 2,
“numoutlets” : 0,
“id” : “obj-71″
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “cycle~”,
“patching_rect” : [ 242.0, 796.0, 45.0, 20.0 ],
“numinlets” : 2,
“numoutlets” : 1,
“fontname” : “Arial”,
“outlettype” : [ "signal" ],
“id” : “obj-70″,
“presentation_rect” : [ 242.100006, 616.699951, 0.0, 0.0 ],
“fontsize” : 12.0
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “mtof”,
“patching_rect” : [ 242.0, 713.799927, 34.0, 20.0 ],
“numinlets” : 1,
“numoutlets” : 1,
“fontname” : “Arial”,
“outlettype” : [ "" ],
“id” : “obj-65″,
“fontsize” : 12.0
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “bucket 2″,
“patching_rect” : [ 242.0, 295.899994, 193.0, 20.0 ],
“numinlets” : 1,
“numoutlets” : 2,
“fontname” : “Arial”,
“outlettype” : [ "", "" ],
“id” : “obj-56″,
“presentation_rect” : [ 292.600006, 357.499969, 0.0, 0.0 ],
“fontsize” : 12.0
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “if $f1 == $f2 then out2 $f2 else $f1″,
“patching_rect” : [ 242.0, 329.999969, 193.0, 20.0 ],
“numinlets” : 2,
“numoutlets” : 2,
“fontname” : “Arial”,
“outlettype” : [ "", "" ],
“id” : “obj-55″,
“fontsize” : 12.0
}

}
, {
“box” : {
“maxclass” : “ezadc~”,
“patching_rect” : [ 241.0, 38.899986, 45.0, 45.0 ],
“numinlets” : 1,
“numoutlets” : 2,
“outlettype” : [ "signal", "signal" ],
“id” : “obj-54″
}

}
, {
“box” : {
“maxclass” : “flonum”,
“patching_rect” : [ 333.5, 231.100006, 50.0, 20.0 ],
“numinlets” : 1,
“parameter_enable” : 0,
“numoutlets” : 2,
“fontname” : “Arial”,
“outlettype” : [ "float", "bang" ],
“id” : “obj-41″,
“fontsize” : 12.0
}

}
, {
“box” : {
“maxclass” : “flonum”,
“patching_rect” : [ 242.0, 683.099915, 50.0, 20.0 ],
“numinlets” : 1,
“parameter_enable” : 0,
“numoutlets” : 2,
“fontname” : “Arial”,
“outlettype” : [ "float", "bang" ],
“id” : “obj-29″,
“presentation_rect” : [ 240.899994, 479.599945, 0.0, 0.0 ],
“fontsize” : 12.0
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “if $f2 > ($f1+200.) then out2 $f2 else $f1″,
“patching_rect” : [ 242.0, 502.699951, 281.199982, 20.0 ],
“numinlets” : 2,
“numoutlets” : 2,
“fontname” : “Arial”,
“outlettype” : [ "", "" ],
“id” : “obj-28″,
“fontsize” : 12.0
}

}
, {
“box” : {
“maxclass” : “flonum”,
“patching_rect” : [ 504.199982, 471.899933, 50.0, 20.0 ],
“numinlets” : 1,
“parameter_enable” : 0,
“numoutlets” : 2,
“fontname” : “Arial”,
“outlettype” : [ "float", "bang" ],
“id” : “obj-25″,
“fontsize” : 12.0
}

}
, {
“box” : {
“maxclass” : “flonum”,
“patching_rect” : [ 242.0, 471.899933, 50.0, 20.0 ],
“numinlets” : 1,
“parameter_enable” : 0,
“numoutlets” : 2,
“fontname” : “Arial”,
“outlettype” : [ "float", "bang" ],
“id” : “obj-24″,
“fontsize” : 12.0
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “bucket 2″,
“patching_rect” : [ 242.0, 426.799957, 281.199982, 20.0 ],
“numinlets” : 1,
“numoutlets” : 2,
“fontname” : “Arial”,
“outlettype” : [ "", "" ],
“id” : “obj-23″,
“fontsize” : 12.0
}

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

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

}
, {
“box” : {
“maxclass” : “flonum”,
“patching_rect” : [ 242.0, 256.399994, 50.0, 20.0 ],
“numinlets” : 1,
“parameter_enable” : 0,
“numoutlets” : 2,
“fontname” : “Arial”,
“outlettype” : [ "float", "bang" ],
“id” : “obj-3″,
“fontsize” : 12.0
}

}
, {
“box” : {
“maxclass” : “newobj”,
“text” : “sigmund~ @hop 4096 pitch env”,
“patching_rect” : [ 241.0, 194.0, 204.0, 20.0 ],
“numinlets” : 1,
“numoutlets” : 3,
“fontname” : “Arial”,
“outlettype” : [ "float", "float", "" ],
“id” : “obj-1″,
“fontsize” : 11.600006
}

}
],
“lines” : [ {
"patchline" : {
"source" : [ "obj-102", 0 ],
“destination” : [ "obj-98", 1 ],
“hidden” : 0,
“midpoints” : [ 186.599991, 218.75, 300.5, 218.75 ],
“disabled” : 0
}

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

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

}
, {
“patchline” : {
“source” : [ "obj-65", 0 ],
“destination” : [ "obj-89", 0 ],
“hidden” : 0,
“disabled” : 0
}

}
, {
“patchline” : {
“source” : [ "obj-89", 0 ],
“destination” : [ "obj-70", 0 ],
“hidden” : 0,
“disabled” : 0
}

}
, {
“patchline” : {
“source” : [ "obj-7", 0 ],
“destination” : [ "obj-72", 0 ],
“hidden” : 0,
“disabled” : 0
}

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

}
, {
“patchline” : {
“source” : [ "obj-56", 0 ],
“destination” : [ "obj-55", 0 ],
“hidden” : 0,
“disabled” : 0
}

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

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

}
, {
“patchline” : {
“source” : [ "obj-74", 0 ],
“destination” : [ "obj-72", 1 ],
“hidden” : 0,
“disabled” : 0
}

}
, {
“patchline” : {
“source” : [ "obj-70", 0 ],
“destination” : [ "obj-71", 1 ],
“hidden” : 0,
“disabled” : 0
}

}
, {
“patchline” : {
“source” : [ "obj-70", 0 ],
“destination” : [ "obj-71", 0 ],
“hidden” : 0,
“disabled” : 0
}

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

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

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

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

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

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

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

}
, {
“patchline” : {
“source” : [ "obj-56", 1 ],
“destination” : [ "obj-55", 1 ],
“hidden” : 0,
“disabled” : 0
}

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

}
],
“appversion” : {
“major” : 6,
“minor” : 0,
“revision” : 4
}

}

#235546
Dec 7, 2012 at 4:34pm

Hi gregory,

I alreacy tried the filtering prior to pitch tracking, the problem is when the signal is small (for example in between words or sounds), this means the pitch tracker cannot find a specific pitch and so jumps around wildly, I`m looking for something using Max rather than MSP to filter out the unwanted values as I think the pitch tracker will always behave this way no matter what.

Thanks for your reply

Johnny :)

#235547
Dec 7, 2012 at 4:56pm

i seem to say this every few years, but there’s a third party object called ‘lbyl’ which can be useful in these kind of cases.

http://www.maxobjects.com/?v=objects&id_objet=3772&requested=lbyl&operateur=AND&id_plateforme=0&id_format=0

or to continue Gregory’s train of thought- perhaps some kind of gate to kill off the frequencies in those *dead spots* that you are looking to avoid.

#235548
Dec 7, 2012 at 11:11pm

That sounds like exactly what Im after, thanks kthozoid.. I have used a noise gate to avoid the dead spots but I still get big jumps while sounds are playing. Many thanks though Ill check that object out now.. :)

#235549

You must be logged in to reply to this topic.