c=pghi(s,gamma,a,M); c=pghi(c,gamma,a,M,mask); c=pghi(c,gamma,a,M,mask,usephase); [c,newphase,usedmask,tgrad,fgrad] = pghi(...);
| s | Initial coefficients. |
| gamma | Window "width" factor. |
| a | Hop factor. |
| M | Number of channels. |
| mask | Mask for selecting known phase. |
| usephase | Explicit known phase. |
| c | Coefficients with the constructed phase. |
| newphase | Just the (unwrapped) phase. |
| usedmask | Mask used for selecting coefficients with the new phase. |
| tgrad | Relative time phase derivative. |
| fgrad | Relative frequency phase derivative. |
pghi(s,gamma,a,M) creates complex DGT coefficients from their absolute values s using the Phase Gradient Heap Integration algorithm. s must have been obtained as:
c = dgtreal(f,g,a,M,'timeinv'); s = abs(c);
and the algorithm attempts to recover c. Parameter gamma is window g specific and it can be computed using pghi_findgamma.
pghi(c,gamma,a,M,mask) does the same as above except it reuses phase of coefficients c for which the corresponding element from mask is nonzero.
pghi(c,gamma,a,M,mask,usephase) does the same as above but the known phase usephase is passed explicitly.
This is just a wrapper around constructphasereal from LTFAT. Please see its help for more details.
Z. Průša, P. Balazs, and P. L. Søndergaard. A Noniterative Method for Reconstruction of Phase from STFT Magnitude. IEEE/ACM Trans. on Audio, Speech, and Lang. Process., 25(5), May 2017. [ DOI ]
Z. Průša and P. L. Søndergaard. Real-Time Spectrogram Inversion Using Phase Gradient Heap Integration. In Proc. Int. Conf. Digital Audio Effects (DAFx-16), Sep 2016.