Csound Csound-dev Csound-tekno Search About

[Csnd-dev] hvs opcodes

Date2016-01-03 17:37
Fromjpff
Subject[Csnd-dev] hvs opcodes
Does anyone have experience with these?  Just reading the code make me
think that it is deeply flawed.  In initialisation I see

if ((ftp = csound->FTnp2Find(csound, p->iOutTab)) != NULL)
      p->outTable = ftp->ftable;

so if the table-lookup fails it does nothing in particular, or picks
up a random pointer from an earlier call.  Then in perf I read

    int ndx1 = (int) p->posTable[posX];
    int ndx2 = (int) p->posTable[posX+1];

an possible reading a NULL pointer.

Is this analysis correct?  The manual page looks frightening

Date2016-01-03 20:05
FromOeyvind Brandtsegg
SubjectRe: [Csnd-dev] hvs opcodes
I used hvs2 in the Hadron orchestra, to interpolate between tables
containing presets of parameter values.
I remember fiddling about quite a bit before managing to make it work,
but haven't touched the code since I finished it. It does work ok. I
haven't looked at the internals, so have no idea of how flaky it is,
but I may help with testing if you want to make changes to the source.

2016-01-03 18:37 GMT+01:00 jpff :
> Does anyone have experience with these?  Just reading the code make me
> think that it is deeply flawed.  In initialisation I see
>
> if ((ftp = csound->FTnp2Find(csound, p->iOutTab)) != NULL)
>       p->outTable = ftp->ftable;
>
> so if the table-lookup fails it does nothing in particular, or picks
> up a random pointer from an earlier call.  Then in perf I read
>
>     int ndx1 = (int) p->posTable[posX];
>     int ndx2 = (int) p->posTable[posX+1];
>
> an possible reading a NULL pointer.
>
> Is this analysis correct?  The manual page looks frightening
>
> ==John ffitch



-- 

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://flyndresang.no/