Psudocode implementation of true envelope I am trying to implement the algorithm described in this paper, I'll quote the relevant portion: http://recherche.ircam.fr/equipes/analyse-synthese/roebel/paper/trueenv_dafx2005.pdf


  Let $V_i(k)$ be the cepstral representation of the spectral envelope at iteration $i$, that is the Fourier transform of the filtered cepstrum, and further initialize the iteration using $A_0(k) = \log(|X(k)|)$ and $V_0(k) = -\infty$. The algorithm then iteratively replaces the current target amplitude spectrum according to
  $$A_i(k) = \max(A_{i-1}(k), V_{i-1}(k))$$
  and iteratively applies the cepstral filter to the updated target spectrum $A_i$.


Could someone write a simple pseudocode version of this algorithm? 

I think I'm getting confused by exactly what things are named. If I understood correctly, the cepstrum is the inverse fourier transform of the logarithm of the magnitude of the fourier transform of a signal, and, again, if I understood correctly, I was able to implement a smoothed spectrum by zeroing out the samples to the right of the cepstrum, and then taking the fft and exponentiating. However, when I tried to implement this "true envelope" algorithm I was completely lost.

EDIT: as suggested, this is what I think I should do.

v = array of -9999999
a = log(mag(fft(x))
repeat a couple of times:
    for k from 0 to a.size():
        a[k] = max(a[k], v[k])

    //Maybe? Not really sure.
    v = ifft(log(mag(fft(a)))
    v[from 50 to v.size()] = 0
    v = fft(v)
    //Do I also have to do something to a?
As far as I can say, your interpretation is valid, but given the pseudo-code you provide, somehow, there seems to be some confusion with the definition of the quantities. 

In my understanding, the $A_i(k)$ are the (real-valued) $\log$-amplitudes. For this reason, you do not need to compute the $\log$ of these values.

Then, the $V(k)$ are actually also $\log$-amplitudes. While I can understand to some extend that you use the same name both for $V$ and its inverse Fourier transform, this may be confusing when trying to understand the algorithm (and debugging it...). In addition, this could be an issue, depending whether the result of the IFT is real or not - this, in turn, depends on whether you "hermitianize" your vector $A$ before the IFT.

A tentative correction for your pseudo-code would be:

v = array of -9999999
a = log(mag(fft(x))
repeat a couple of times:
    for k from 0 to a.size():
        a[k] = max(a[k], v[k])

    vc = ifft(a) // let's assume vc is complex Hermitian, so we just keep the first half of the vector 
    vc[from 50 to v.size()] = 0
    v = fft(vc) // here, be careful that the result is real 


I did not try to implement it. Nevertheless, it seems to make sense that way. Let me know if that solves your problem!