From: edu <moguillansky@gm...>  20070611 17:49:47

I am having trouble trying to calculate the envelope of the resynthesized spectrum out of the data in the partials. The objective is to know, at each time t which will the peak amplitude be of the resynthesized sound. Of course one could just resynthesize a small portion surrounding the time given and get the maximum, but that seems very inefficient. The formula I have found to come nearer to the result is: peak_amp_at_t = sqrt(sum(partial.sineampAt(t) ** 2 for partial in partial_list.partialsBetween(t0.1, t+0.1)) / average_abs_cos where average_abs_cos = 0.636619850991583913213389678276143968105316162109375 Is there a proper way to calculate it? The use of it is to be able to perform a spectral normalization, clipping filtering, etc. I'm using Loris 1.4 in python. cheers, Eduardo Moguillansky PS: If you are interested, I have implemented an optimization table for the PartialList in order to efficiently seek partials at a given time. Two new methods where implemented: partialsAt and partialsBetween. For that, quite a few new classes where implemented, a PartialPointerList (which is a std::list<Partial *>) in order to reference the original partials. And the optimization list is a std::vector< PartialPtrList >, so at each time one can access the partials present in a given time frame just by indexing the vector. Everything is also implemented in Python. 