[Csnd] pvsftr with AMP_PHASE

I was curious to see if pvsftw and pvsftr worked with AMP_PHASE analysis from pvsifd.

pvsftw seems to work without complaining, but then pvsftr fails with "pvsftr: signal format must be amp-phase or amp-freq." - which in a way is promising as it is saying that it does support AMP_PHASE

However looking at the fsig going into pvsftr, pvsinfo says it is format=1 , which I understand to be AMP_PHASE.

Does anyone know if this would/should work? pvsftw and pvsftr don't specifically mention it, but what I'd imagine is that the frequency ftable given to pvsftw would actually be written/read as phase instead of freq.

I will take a look at the source code at some point if no-one knows. Below is what I've tested with:

instr test
  ifts = 2048
  ibins = ifts / 2
  f_, fampphs pvsifd oscil(1, 440), ifts, ifts / 4, 1
  ifnamp ftgen 0, 0, ibins, 2, 0
  ifnphase ftgen 0, 0, ibins, 2, 0
  kready pvsftw fampphs, ifnamp, ifnphase
  i_, i_, i_, iformat pvsinfo fampphs
  prints sprintf("pvsinfo format %d\n", iformat) ; shows 1, which is amp_phase
  if (kready == 1) then
    pvsftr fampphs, ifnamp, ifnphase
  endif
endin

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        GitHub · Where software is built
Discussions of bugs and features can be posted here

It was a plain old bug, the check was not correct (bad parenthesis balancing).
PR submitted Fixed parenthesis in pvsftr and pvsmaska check by vlazzarini · Pull Request #2104 · csound/csound · GitHub

Oh wow, thank you, that's great!
Glad to see it was an easy fix & looking forward to having a play with the phase values.