Hi Bart,

On 05/10, b...@magnetophon.nl wrote:
>
> On a more serious note: I have no idea how to get this working on NixOS,
> sorry.

Hmm. I think it should work just fine on NixOS. But nevermind, please
forget.

> I have also noticed the bug around the edge values with .cub, and have
> mentioned it in the docs.

from basics.lib:

        // Note that processing the last point in each interval is not safe.
        // So either be sure the inputs stay in their respective ranges, or use 
`C = 1`.
        // Similarly for the first point when doing cubic interpolation.

this? this is not what I meant...

> Have you compared the two implementations while
> staying away from the edges?

let me try... Yes, it seems that tabulateNd().cub works better if we stay
away from the edges, in this case at least.

But this depends. Say, lets modify my test.dsp to use atan2:

        // + 0.1 to avoid atan2(0,0)
        fxy(x,y) = atan2(x+0.1,y+0.1);

        rx0 = 0;
        rx1 = 1;
        ry0 = 0;
        ry1 = 1;

        // table size = 128*128 = 16384
        tabcub(x,y) = tabulateNd(1, fxy, (128,128, rx0,ry0, rx1,ry1, x,y)).cub;

        // table size = 32*32*6 = 6144
        taylor = tl22(${atan2(x+0.1,y+0.1)}, 32,32, rx0,ry0, rx1,ry1);

        N = 100000;

        maxerr = abs : max ~ _;

        process = (ba.time%N)/N
                 : /(2) + .1                    // stay away from r0/r1
                <: fxy - tabcub, fxy - taylor
                 : par(i,2, maxerr);

in this case taylor() still wins.

But. It is not that I think that taylor() makes any real sense. Just I was
curious about what else can we do for the multivariate case, and nothing
else came to my mind. Sorry if it was not clear.

And. In any case, apart from "near the edges" problem, bicubic works much
better than I expected ;) My intuition fooled me, but I am not surprised.

> Is this what you mean?
> https://brilliant.org/wiki/taylor-series-approximation/

Yes, but please forget. I don't think it is useful "in practice".
I just wanted to compare your implementation with alternatives.

> Speaking of understanding: is there anything I can do to help you understand
> tabulateNd?

No, no, thank you ;) I will never understand it in details, but at least
I think I understand the basics of this code.

> would you like to chat on a medium of your
> choice? (right here, irc, telephone, whatever)

Well, if you ask me I'd certainly prefer "right here". I am an old
fart, for me emails and mailing lists work better than anything else.

Thanks,

Oleg.



_______________________________________________
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to