[Clam-devel] improving SMSHarmonizer and another issue's
Xavier Amatriain
xavier at create.ucsb.edu
Tue Jul 3 01:10:44 PDT 2007
Hernan, have you looked at the ControlArray class in CLAM?
http://www.clam.iua.upf.edu/doc/CLAM-devel-doxygen/classCLAM_1_1ControlArray.html
And about the other issue:
Hernán Ordiales wrote:
>
> another issue, what do you think is the best approach to add peaks and
> spectrum for each voice? i mean after pitchshifting them with an
> embedded SMSPitchShift transformation with something like:
>
> TData amount = mVoice1Factor.GetLastValue();
> TData gain = mVoice1Gain.GetLastValue();
> mPitchShift.GetInControl("PitchSteps").DoControl(amount);
> mPitchShift.Do( inPeaks,
> inFund,
> inSpectrum,
> mtmpSpectralPeaks,
> mtmpFundamental,
> mtmpSpectrum);
>
> put all it in a temporary frame?
Temporary frames are evil. This is a very complex data structure and you
should avoid using temporaries
if you want to get some performance. If you need temporaries I would
advice to use as low level data structures
as possible (like an std::vector). And remember to avoid
allocations/deletions in the Do.
Also one of the tricky things about this effect is that it breaks the
"model". I mean if you have a monophonic
sound with a pitch and you harmonize it, the peaks are no longer in
relation to each other and the sound does
not have a single pitch but however many you added. This is tricky and
not addressed in the current implementation.
Xavier
More information about the clam-devel
mailing list