Interpolation for all arc display mappings

  • So a while back I shared my 'arc mapping' patches, which cobbled together some stuff I got from GtZ, along with other bits I figured out to have a relatively comprehensive mapping for 'regular' arc usage.

    Since seeing tehn's interpolation patch, and implementing it for some stuff, I got really hooked on the extra display resolution this affords you, and have set out to recreate all of the mapping solutions, but using interpolation.

    Since I'm not moving around a point, like in tehn's interpolation patch, I'm mainly using zl objects to adjust the single LED at the end of the row.

    Below is what I have.

    Normal works beautifully, as does rolling image. Static image I'm having some problems with (you can notice some flickering when at the bottom of the range, and when decreasing the values, there's a tiny flicker too). The problem is to do with zl nth's replace mode, and order of operations, but for the life of me I've not been able to figure it out....

    Also included are position/window, start/end, and infinite rotate modes, for which I have no interpolation at all. My position/window and start/end are based on the static image code, so until I can fix that, I can't fix those.

    Does anyone have any interpolation tricks up their sleeves? Or solutions to these (or similar) problems?

    Would be nice to have a 'canned' interpolating LED library going.

  • I've been thinking that jitter probably holds a lot of answers. We can create larger images (w/ possibly more brightness levels for our work space), scale those down to 64 pixels, apply a blur if desired...

    That's not what you've created here. But it might handle the infinite rotation...

    (I'm also very interested in seeing a "magnifying glass" type effect, with a high resolution inspector of some data, and a low resolution indicator of what's on either side of it. Jitter seems the right answer for that as well.)

  • I'm sure there's much better ways to do it, even using js like in tehn's patch. I don't know js or jitter well, so I went with what I could figure out, list manipulation.

    That sounds really interesting. Have you done any arc/jitter stuff?

  • What's "tehn's interpolation patch"? I searched the forums, but was unsuccessful.

  • @nomubiku,

    http://monome.org/community/discussion/16058

    @Rodrigo,

    Little to none. I think I did some basic tests after Raja gave us this for grid:
    http://monome.org/community/discussion/14897/varibright-w-levelmap-and-jitter-monomeasanledsplashpool/p1

    and I know I was anxious to redo all of my arc stuff that way while this thread was going on:
    http://monome.org/community/discussion/15670/thoughts-on-designing-for-arc/p1
    ...but I don't remember if I got anywhere at all with it.

    (I think my LED work is chock full of workarounds that Jitter natively handles better)

  • Here's the actual finished app: returns
    http://monome.org/docs/app:returns

    That graphite app is pretty cool. I definitely want to incorporate more meaningful arc mappings. I basically got the arc, and incorporated it into my setup as quickly as possible, so as a result, it's mainly just high res MIDI style encoders.

    The interpolation alone adds a ton of depth. I've done one gig sense changing that out, and it's awesome.

    One of the first things I tried doing was tweaking tehn's js file, but I couldn't figure out how to do it for an increasing parameter amount (rather than rotating).

  • @rodrigo: i'm not sure what you mean by that last sentence? how can i make this js more versatile?

  • Oh right, I missed this.

    I mean that rather than having sine interpolation across the whole 'width', that it would be possible to adjust the 'waveshape' of it, so it could be more tahn shaped, or even better be able to control width independently of interpolation size. So in the regular sine implementation it interpolates over 50% of the length of it. Setting it to 10% would make it tanh shaped (regardless of the width).

    Here's a version of the 'static image' interpolation that works perfectly using vexpr.



    ----------begin_max5_patcher----------
    2505.3oc6bk0aiiiD94jeEDFMvBLSFu7RTVySy.L6CKv9OnQi.YaZGMirjgD
    c5Kz+2Wdn6SJej33NPFV1jRjE+phUU7p9982MaY7W3oy.+N3if6t662e2c5j
    TIbW1+ua1N+urJzOU+Xyh3eNd4eO6ASVB9WD5j2CRE9hfUOFryeKOO689hUO
    EDs8wD9JgoVvT3b3C.O1bmG.KVn9MVlB3SYuRzgcAQgbgt1PYIFrVWIxJ92P
    N4E9l3HQj+NtNq+LIvObVYYDePzrPLII95dtgRlMqnRUEUZv2zYfvRZpB4yS
    xPiL3P9zAg7m4IoAwQUJ+6l4ueekjuqxqnvv+NVWPrGJRJHxjDpHoD9yA4uO
    oHU+DIHJjH3gDSi8KKXyLY9i6yq7JHriBTYdpuoD8MB0sDhkb3sgwq9GtFTg
    4IFumGEDsOgmxiTrRCUTj8Z9F+CghG6Fppm+F+U7de4NYY2MaaRv53HEQT6M
    UImWceDfzMM02kMF8SD4uuiWVIRdHcoehBUWFpKDbdlh33v5YUvHk8.7ijBx
    BtHvPrXXQgFraeRPjnVEwi7kkwSoqRhCCqUTlbdtibVK40q3eNXs3IcYUEJk
    Odv9bVvrBLZcvVdpndZB+so0SoVW5pBgU6ZWK8FcwWEuamTFHu.q0OOLXWf.
    rLVHh2A3QqAow.grOB+ekB7C+r+WSAwQbv+6+7W.egJmrmsZgEFDwWEevfgj
    JYrIY6x5XQOJQbHZ4.nQb.o+WMQ79zjzRaBrJg0u3YasJvFuW09D447i6uO+
    GObA3E6jcoB1G9UED+DHLHUjBDwa4J9AvWwaV4GJY.9q9GY5.Xoty1rA7wvF
    vXlV+MkY5VR05ZHGAefbkyFpY0qNWv.xv4.zbEhQj2mMLrQzvkqaEY3pl.aC
    ZrtAMuiEzpxD52p3qHlFF6udoez1Q.RLzqDIYvwAxdj9nWDfT2.do.yc7zzR
    GupilHf5BquH5Kp9xQewzWt5qEYWdYWHXkOnJevU9Pp7gV4iSwmd05Psh+hL
    dzfVn+myhg3v3t4vt3a19J6AR2H24G93F+0ReUsQ0ChosX5gN5dLtuBvYyVV
    oi40QtdcPuOmza75c4rdONr2uS6i43dMm2a3.+Bnl8XFbjim9FE6UmM0sW7V
    3IuMdyOpG8V5U+.d1am28i3g+nd4Ohm9i5seed7OrW+C64+vd+O3H.5aT.cO
    RftGMPSo8lpfZk+XphpqN5WAnl40gdHlqZ3+HlVcDAq9SS8PCpauke7Mqygk
    IGTuT25lzB.epiZoKM90z5WWy+EF9+VHHgu0BNPlMUCGf1ouSShCr3T4.3w3
    .ydngEhqTVfPRG1v.xbXko8dkfriCf5mCfeuSPIGvFFfbjpNEL.L8jY.Hu2Y
    .YiIlGJGwgCYBbABVOTNrcbAx.bA5oxEHiwELCMs79aAVRhrUnllBKXIHTUM
    SNnS11.h7twgNlsHjcFJPTcmBBTeyyxdHr9YGNzKtdp2BrhfIf8T5YxQU22M
    QXPe+koSSajw.Akb59IcwYAaBi8ei3nzRPf7ZCHv9gLfcm6A87P3hoj6jXGN
    mJ6vwVy0pdFk2LLoGdyzg42lV2En9FCcxZrnKdu+Rmq0ik92p6z34blrcSYu
    a61LMGqdR1slaMGHyaVF9j8l8mHmYau5y0YCNdfuwShSA+pryf7KDHPv2oWJ
    5VfTWKpbuKSAzMmMIMxPWb5CM+zGUH7puSgZUSUqCnky+DAVhwtmtcbF5mCM
    SsWo05bAH303pxpsdM94CsDNpsNvLqEWYvBmOwFyoKbNkYl.9t8zL6oogAq3
    SwmlrQjwHm97Cgee9gpr9MwB.zdtvYyQeDz6mG1fFQlfnt9am7uGFigCMSnt
    mcsI4NooW52W.nyPRVicYyclsf2PNwQVLMWzrEYpucCTVlFYEy0MV0yMLrkF
    eHYUNiKaQRAsa+q4ohfnhMpwGqzcrim9of0qauKHLaLfT0VNvrgPNJAgisc4
    No1EahsqUwgl8cyGkidvAh7XH4nBThSlwGzgH0tf06iChDo46rDs5QhZmB5A
    gKV7fzPmaOIQMi8f3k+m1MrWMfV4j8KERmiu8BxudvfZELrFFbu7hauhHwD.
    hE2pRCx1E1RLfd5fPMQhqOjfLEj.cKiDTa0SRu7xDMLHggT8FfaAdtmC0ygo
    1.JlC0RQRWYnIxVz7VtCFcJdvgukM7PYS.IbNdj.cMa4gLEuwHKtQQAL5kxa
    rZpGfywNPuE1ouko8lmPx1h4nh+cMgiSRZ5VV4Bx65WhxXt95VhR6YisFtwn
    azwGflxnEQd2pn.YJyRCkciZrRq3z1tDNzaZsrSwfC4MyjQ12Dm1S+c7anFF
    ahy1C5hoGqo0Pyrkhbbl6JuKuU7uqIA9IO86nKffA3S2WoQVdnVS8elu9QYc
    yWIdzWHRBVdPXVIhNZfmsimocGEzi37H1KgMBAMDgrMLdoeX1w+snL54XPde
    aFvk8nX+L+K6S.eXC5eiblC9C0tEzOYW7Zdsyiz.mzcLxLmGL2i9jYytYOn6
    GO5ZN06mAv041Gb+kOrA+KHmiAeyBCLcuKWsJLMfdaiuM2TA8iUY68tNWS7d
    2LA8djpNdvnyUH+LfDs1i.CH1jcFBr.K5KHNQsK9.MVisLlh0ZK.T196x2iJ
    nPKeNZ4KpsyhQ2dZzsWFCxwlJE6hsjjYWOjrkTryUCEyrjhQMcB8Uihcl.Ee
    cfwTa65guZH41SqaOzr20CIaqbA8LQxYieJerSiMtouelBPkiG.LmPTarShX
    fJuuJc3wC0brPFPT+sgyeBA70DPb5pAhyqDS.UHycG2giyqv1w4UB5EHNudD
    vQ8iDSId7e+KPprwq394UVyS7RmvDEUFNbYzoGNbKNPXViSvKOXXhEvfZwBX
    qfCUPQQBDlPiXVzkzaJvAjdJvQdWRTGPjhsb9593ueuJ5oV6.bT7mwCexHrY
    +ivbmtDCDdc1ypGjp7TMMebbIKzZ5LYTg4dcBJogAkQ0uYO6WpjudN8CILxb
    Bjh77TmjNSr7fMFvr2OQVMBdxilnXVefF6nglBXoPaf9P.Kei8GDUKCi08By
    5CXf+Y+vC73Msi81kslv3nscCf0drzmhSDV7b4sLRG4EDUMdyceUmXNJyv5f
    8a+RCcj8.ZOXYAxhr3mbkI3Oq01d07XDGrGs8JBbRBPdcK+f6U94gZxPxGW7
    05EdtbEiV9P4E.rLIIIKQ2Jq1Q0nN3ETlqMaZ.AuQd3ygzmtIWe5NLBiMGEP
    lHY6wwVan28MQA0Fsaa29a6xeqNGVSOLKnGjyKF8PPWW3Sildeq8E7kifZTW
    VLb2IPOF46Fw7UEozHFu1H1t1Nlt1WrbUVO+39+ecByp9
    -----------end_max5_patcher-----------

  • And here is list interpolation using vexpr. This little ditty will likely solve all my arc interpolation problems.



    ----------begin_max5_patcher----------
    1184.3oc2Ys0iahCF84jeEdQ8ocmA4qboO08evp80ppQjfSFWQfHrS1osp+2
    WeARHYHClsDznMQhArcrOb746lmerbQvppW3x.vGAeFrXwOVtXgsISCKZddQ
    vtrWVWjIsCKnj+OUq9ZvCttT7WT1lKpxxWkUtssiMUkJo36bSmHbHro4xC6D
    kEbkctPMMVcPoaR8s8bGPBrSD3KMcuOSs9YQ41mp4qUtQPhH5oDPRLWiflqX
    80S+D8x3lzKVGQtEpZ3+Hh1EnkY6rKcveVKxJBLc7ykKMWd3WiUT.AXCXEXy
    jPKhRUvCffMZt1diiuaa3s3KVrghPvHKSQSGfvn8PX3okv1wkxrs7WwXI.yW
    DC3tAd+91tzEhR95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c09tybk3gtGOZi0Y.39H.FzMyDZff
    7.OwuyBxv7.yIyW9Jdxfnwxf2w3FwdFlF9NByDeRSkLea6PefyLhGerJthC8
    GOthLx1u+HuV1LmVnnK.6qNYPzC1GEktGsUzDTyM+GVbi29efIHqVWyjRWvz
    gZWAMujDoKmQuN+b4+1ZANZK
    -----------end_max5_patcher-----------

  • And here is every display type I use, using interpolation.

  • I don't think people will appreciate at a glance how powerful the Vexpr solution is, so I hacked your demo to make it more obvious. =)




    ----------begin_max5_patcher----------
    1933.3oc6akziaaCE9r8uBVgbpchqHoV6oFfFf1CEnHW5gAACnkn8nTYICIZ
    mIIn+2KWjjkr0BsGuHWjY.7LlKRu22agO9djea5Di4ouPyM.+B3QvjIea5jI
    xlDMLo36SLVQdIHljKGlQP5pUzDlwCp9XzWXx1+PJivhRS.+UZdj3eJGQbTB
    MHcShbXnhFWjsbt36lyLKZIYypnjXJS9VfkCKMgkG8UprMT8wltgUN3xVWSX
    AOGkr7oLZ.SwRPLZl8C.roKet.W4mX9mfOVLmnPIwmN+Su011n1aMgrR9VMd
    WVDItrm4alOOVQMhF92oSEe7flP2h3TNka7pY3RPT0D6KqoJtU7BHbICvXNI
    YoQES1Bv3hjPAzV.O1Bo..Y1NtX4OLtrljwamQydhlPJPHyS.gRnel+JOP2Z
    MHHiRXz+LcKstx2oCgv9gvggNjmDzfvdwNroNXG+UPyJPkBXgOgnX5VZVtvR
    ZGAOwfrdcslmTaJBr7SoxGjyCUMEknZBV0TFcaT47wUsRx3LJiykaxTD4KdN
    FpN4xuokSsDET5L9VhOcrjewxqFJvkzKiSC9GZXMSTNdullDkrNilyEiR+EM
    5NjtfrIl8T6xvl8ufDP6bxsB0SLVlEEllHHhFyTzb4qi6zvVJYsqyLxQjPV2
    xjy47wl74jLApVn6iJ6jklF2rqJAI2RfjDshqVyhTDKxr5gFsZcVjxkYUaJS
    qmyCxRiia7nT8rskdB4x5.5miBYO2vcqnG9viVWJBLpvnvnkzbVy1Xjk4Mao
    w5F0UBqah2n89L0aZty8jjkBprcNzTGUqiNTU5zjucy9FNL6xxWoyCMk+w1a
    eC+8M9g9F6Qm6oUV1ozIYgg14GMYf4.XmPI7TfRzfPIeMHo5qdHJRhkXqAQT
    uQAhRBBpVF+PDEe1UN0BIghUxg1NROwNChj1iBj7m4VSythl4MWce.rzSWsR
    70CKkfSm.1kT+RsDuJZG6xO6BRPMLTK2xfbAjyHXnXDsbs05NF5W9icjAGqA
    y5eLL6tXJDaLpikPkDkn+1Qg7zMYAkRuRUPPSBju9NKJoJDqG2Qq6MvmiBCa
    FRiJJfbQLEgUQxOnL6noYtNB.pAMK7Us2.uozrotz7HAm80kl8FOzrstzLdz
    PyHs0MNW1ffONs91yLxIaogOweEbOYOQXrrn4aXJWL02Y4qcSTCuIsiXmEsR
    D87x65kx2r4bRbwdoqlaKafY5NP7HSNQWY9529v69avu+9O79wPFurvP45UV
    x0v5OiWH2KcFu5LeNaourN6ORXzr0owj5oKrsH.ek4zQmLg4XoRmiSeoyA47
    +0z4Hiqy76Iy46Iy47m9gHvBvbvhyaJHrFZCMOre5veP6s+UOMOHK+A2+GZT
    rW5e3s.3HbuzlkKG445Z5J1WkrjL8BnvQAfJWiB7lEve5MKPWQfUGLEy+Ah4
    foGdlqsEzCx0X8clYaZZ5.6GdsGWn6OxQWvulGPhIYqRCo8jrxa.ViPty73f
    sqEGrwNyrbft9HNX63Oy222y0qev146f8ooXWGqKJ4VOvr6HIU6wf3qXp1Eq
    oMrFrItBUq6GF5aMjiX7n.U+ZLHKkct0Te8.K10S3Z.YiDkC1eF2kfkC2Mgk
    6PZqnQCtRWN1P05pqPNTh7QXaupTO2m1p8HRccTCqBKeOKWLWw02dlC+GO2A
    vVqwQk2lmC5ofQvaZPt0gUK7fZqiCmquEXNV2zPcq+B0Tg60dAUy67RwcL3i
    1EiCeMJF2EANNJ2ZZiGV20EmbWLxVN617mFrs8MuLkXcKSoilUHIHMVkNzGA
    vpLXBK9nw7WEEtNMJgUvI19xXeQtpT8n7V23aXjJQ5XWIdK2+GZ+m5kupRZC
    YhjlblwrKO24nIyoaEfqwaEYz11D5KRHxMhAE4FDfzfCw1Gu3aWR6MugbmNk
    vWrt7XoD9BZFqCMaMtnYScw4QR4vOBW82kl1XM08Qmrg8s12ETSQn6c3JO3i
    f2fmJucibK6dDqpZdmwaRuxZ4Jbz3IrEmxcPxiHZV2CfUKxia1JNZGpLZ7Py
    ZqNOdNPg5pZfr+94b6d7bt0wg1JNkDthlmWUHlKw0uSmadm5RKdXMAajrCTO
    mTqS.SXoKWFS6kw0jCqeX66gIsbJKNWOLI7be+KWw02ixiiBoYkO5sjcpY05
    9Q3GKGQNmkYeowAhpcDRMyCilvAai7sNLjhNt1qkZW13N0hdX.MIDRcN+vEk
    .UcHwfv1wYXMNkyVbDqVX50OZYhATRFl8HZfMbjU4AqGeYaIwanoKN7LBt6w
    GmlrreIUigm+bZFq0wiac7k7Etk9hRpel3lV2+841Cj5nbcw7+L3EmtPyAhk
    4JzoW6Sn040Ijv6KYI8.bwCH9EZCT+i4k62VOgy3azI2sTT3np2tizahkc6x
    B+yrnPeGkn6YGk7Ui1UsAsbV5cm6rb73sTBTMK+hR0b+.1KTPOHPcqFWzjth
    RuQN3OLB8CiN+.SEcomlaDtC5YOh9RROHnFzydD8kjdzQbAuZTCTWkG30QX4
    nA83c8zcP5.OWQokkFzyoZZo7Ds2UUQPI6cEU165ob3USoqqkB+87uS+OSv0
    FVB
    -----------end_max5_patcher-----------