Request - interp modes: zero stuffing

Issue #84 resolved
Owen Green created an issue

I was surprised to find that /interp none (e.g in fl.lookup~) gives you nearest neighbour rather than zero stuffing. Can there be a zero stuffing option too?

Meanwhile, is there an easier way to get there than this?

----------begin_max5_patcher----------
838.3oc2XssbaBCD8Y7WAidriaB5B25uRmNYH1JIJEjnfH0oYBe6UHADaGGr
RQILSevlYkW3rmcW1K9oUdfqE6n0.+u4+ceOumV44oOp6.udYOPQ1tM4Y0Z0
.EM4RVcNaKsBr176kYUYETIs5JJO65bZmdA8+VM6OZYLp+.QiLmJkOVRMnB.
qUe7+wvyphVS4xLISvuphtQZzJkbQvZ+3PX2kf9uFuIdSAiqdpZKDNfr7Qio
..unlAcsdnQqWt4NF+18PKLtCgn3jtKHHp6BL.uGhrs5mr356+ZXJn6rmWsp
6q0ertwD67heLNjPBxJGRx+hCgS+s5lGrLIcmFZvM4WHEJEaAuIymGqgmk0A
g5rAcVGB8FbN1sblKjze0jkW2pRzeuTGMepiHoczkDocAonI4Nzsb+KsKAgQ
I6ErISFrID2R356X2Ha8gKAsizUTwo5KgoSRarao8WaWvDarNkFCmhvXGWH6
xVexxkZiRiNepMNxsTVv2PWhR2CbVGkCwSRYx+UsqhLyHMc6JriKYmKD+ror
0+RFWM+RoOWvouWO.1YQcb+q0Xxj9f.GG2yts0OmxuUd2xUHGYx3SlL5iRcK
yUisVtf8rQglV2SNjBJw0CorL0xMgYXhoV9zT1wyjZxsWjp48r1lRanHWmby
2JJTk1Lz2OY4RzMDGBimj+g6yesFfbF+3k70nzc9gNkZQS0lAB02oPsq8HPa
o0RFWuc9dJoVAVqzIc71hjZEJKPJwAHobQVfzglSAaaoP0cq2MhvwWDpBBDy
tgQiBi2fnpa09t9ZyxVwI1XqPW3+sIRqV8QkANSjTcdOORGQ7S6+wIoCc.Fj
dc..NKiUs0ikFK7yHsTUd67tEHT2d.EGLJ4Z2hcF6gwvQnQe7PqywfmwOkRz
oMlWh6DdsoFLuLchMdoPWTSyl5D3HGfDNxV2+r4jMcDPtn2CxFNMXNyqbhMY
DG0z8zIugXybPIl+5lCjhBiLiJjdBIR7K8rzBeFkyOh2NpTfcPisoSRLduRl
ZIWWLXHS87kLOrShYFtrxxGnU08ZqAQMB68BsgEuVKx3FQ8pzfJ5CrA8I5Sx
pTSVJUiU1TYlDcWjYIFPgPQQdCquwfB4mW8WOuU3GC
-----------end_max5_patcher-----------

Comments (4)

  1. Alex Harker repo owner

    None is inline with supercollider interpolation and what I would expect from no interpolation. the issue with what you are suggesting is that it assumes exact integer sample values, which will only be relevant if the sample is units.- otherwise floating-point error comes into play. I see what it is that you want to do, but I'm not sure fl.lookup~ should be the mechanism to do this - nor, however am I sure what that mechanism should be yet...

  2. Owen Green reporter

    Hmm, yes the units is a problem (FWIW, to me nearest neighbour seems distinct from no interpolation for upsampling in a strict sense, but I agree this is a perverse case for most likely usages).

    Maybe a fl.resample~ that only has sample units but allows more low level signal-processy tomfoolery? -param 1: decimation factor -param 2: interpolation factor -param 3: enable interpolation low pass (downside: object has to design a filter; upside: user doesn't have to design a filter)

    Not that I can think of a use case for such a thing at the moment. Maybe I should just roll my own zero-stuffing object

  3. Alex Harker repo owner

    I'm more into the idea of fl.resample~ - note the fl.lookup~ is a lookup table, not a resampler....

  4. Log in to comment