don't lookup~
Am I going nuts? The lookup after all this time just doesn't do what it says on the tin. With buffer values going from -1 to 1 over 512 samples you should expect a signal input of -1 to be -1 at out put and 1 to be 1 etc. You do get 0 as -1 and 1 as 1 but the tin says "Input values of -1 to +1 are mapped to table values between 0 (or the specified sample offset) and the size of the table."
whats going on?
{
"boxes" : [ {
"box" : {
"maxclass" : "message",
"text" : "-1",
"patching_rect" : [ 184.0, 88.0, 29.5, 22.0 ],
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"id" : "obj-26"
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "0",
"patching_rect" : [ 226.0, 88.0, 29.5, 22.0 ],
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"id" : "obj-25"
}
}
, {
"box" : {
"maxclass" : "message",
"text" : "1",
"patching_rect" : [ 268.0, 88.0, 29.5, 22.0 ],
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"id" : "obj-24"
}
}
, {
"box" : {
"maxclass" : "number~",
"patching_rect" : [ 226.0, 257.0, 56.0, 22.0 ],
"numinlets" : 2,
"sig" : 0.0,
"fontname" : "Arial",
"numoutlets" : 2,
"outlettype" : [ "signal", "float" ],
"fontface" : 0,
"id" : "obj-22",
"fontsize" : 12.0,
"mode" : 2
}
}
, {
"box" : {
"maxclass" : "button",
"patching_rect" : [ 50.0, 69.0, 24.0, 24.0 ],
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "bang" ],
"parameter_enable" : 0,
"id" : "obj-21"
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "zmap 0 511 -1. 1.",
"patching_rect" : [ 103.0, 178.0, 101.0, 22.0 ],
"numinlets" : 5,
"numoutlets" : 1,
"outlettype" : [ "" ],
"id" : "obj-19"
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "peek~ shape",
"patching_rect" : [ 86.0, 225.0, 78.0, 22.0 ],
"numinlets" : 3,
"numoutlets" : 1,
"outlettype" : [ "float" ],
"id" : "obj-18"
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "uzi 1048",
"patching_rect" : [ 51.0, 127.0, 54.0, 22.0 ],
"numinlets" : 2,
"numoutlets" : 3,
"outlettype" : [ "bang", "bang", "int" ],
"id" : "obj-17"
}
}
, {
"box" : {
"maxclass" : "number~",
"patching_rect" : [ 226.0, 146.0, 67.0, 22.0 ],
"numinlets" : 2,
"sig" : 0.0,
"fontname" : "Arial",
"numoutlets" : 2,
"outlettype" : [ "signal", "float" ],
"fontface" : 0,
"id" : "obj-16",
"fontsize" : 12.0,
"mode" : 1
}
}
, {
"box" : {
"maxclass" : "waveform~",
"patching_rect" : [ 27.0, 334.0, 318.0, 282.0 ],
"numinlets" : 5,
"setmode" : 4,
"numoutlets" : 6,
"outlettype" : [ "float", "float", "float", "float", "list", "" ],
"buffername" : "shape",
"id" : "obj-13",
"clipdraw" : 1
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "buffer~ shape @samps 512",
"patching_rect" : [ 43.5, 288.0, 156.0, 22.0 ],
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ],
"id" : "obj-3"
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "lookup~ shape",
"patching_rect" : [ 226.0, 211.0, 87.0, 22.0 ],
"numinlets" : 3,
"numoutlets" : 1,
"outlettype" : [ "signal" ],
"id" : "obj-2"
}
}
],
"lines" : [ {
"patchline" : {
"source" : [ "obj-24", 0 ],
"destination" : [ "obj-16", 0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-25", 0 ],
"destination" : [ "obj-16", 0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-26", 0 ],
"destination" : [ "obj-16", 0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-16", 0 ],
"destination" : [ "obj-2", 0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-17", 2 ],
"destination" : [ "obj-19", 0 ],
"order" : 0
}
}
, {
"patchline" : {
"source" : [ "obj-19", 0 ],
"destination" : [ "obj-18", 1 ]
}
}
, {
"patchline" : {
"source" : [ "obj-2", 0 ],
"destination" : [ "obj-22", 0 ]
}
}
, {
"patchline" : {
"source" : [ "obj-17", 2 ],
"destination" : [ "obj-18", 0 ],
"order" : 1
}
}
, {
"patchline" : {
"source" : [ "obj-21", 0 ],
"destination" : [ "obj-17", 0 ]
}
}
],
"appversion" : {
"major" : 8,
"minor" : 2,
"revision" : 1,
"architecture" : "x64",
"modernui" : 1
}
,
"styles" : [ {
"name" : "myDefault",
"default" : {
"selectioncolor" : [ 0.019607843137255, 0.996078431372549, 0.0, 1.0 ],
"locked_bgcolor" : [ 0.898039, 0.898039, 0.898039, 1.0 ],
"color" : [ 1.0, 0.576470588235294, 0.0, 1.0 ]
}
,
"parentstyle" : "",
"multi" : 0
}
],
"classnamespace" : "box"
}
"Input values of -1 to +1 are mapped to table values between 0 (or the specified sample offset) and the size of the table."
ha, at first i thought it was an issue of semantics(this passage is more clearly written as "Input values of.... are mapped to table indices between..." (values are not mapped to values but to indices)... however, your patch is just missing the proper base for the [uzi] object(it starts counting at '1' by default)
since buffer~ indices start at '0'... all you need to do is rewrite the uzi object with a second argument as
[uzi 512 0] <-2nd argument is the base to start counting from(in this case you want '0'), and then the entire table is filled properly, otherwise, you miss the very starting sample, and it remains unwritten at a value of '0' which is why you got '0' with input of '-1':
hope it helps 🍻
many thanks maybe we can save the planet after all.