5.11 PartialSet Processing at FrameSet Level
5.11.1 PmFadeHarmEnds
Synopsis int PmFadeHarmEnds (PmFrameSet aFS,
PmParamSetId aParamSetId, float tAttack, float tRelease, int input_flag)
Smooth trajectories of partials in ParamSet aParamSetId
of FrameSet aFS.
Amplitude fading is made at trajectory birth and death ends.
Frequency in the fading portion is kept constant at the corresponding
end value.
tAttack: fade in duration.
tRelease: fade out duration.
For amplitude fading to be performed, a partial must remain dead for
a time of at least (tRelease + tAttack). Otherwise amplitude and
frequency linear interpolation is done in between death and birth
ends.
It is assumed that a given index identifies always the same partial
trajectory all along FrameSet aFS.
This is always the case when partials are harmonic.
Instead, for inharmonic partials, a partial with index i which dies
at time t may have no relation at all with another partial with same
index i which is born at a future time t+dt. If dt < (tAttack +
tRelease), PmFadeHarmEnds will join the two independent partials by
interpolation in between death and birth ends.
Returns
A minimum duration of (tRelease + tAttack + tRelease) is required for
FrameSet aFS. As time step between frames may be variable, the number
of frames required to satisfy this condition may be variable too.
While FrameSet aFS is too short, PmFadeHarmEnds does nothing and
returns 0, waiting for a longer FrameSet.
If FrameSet aFS is long enough, PmFadeHarmEnds performs smoothing and
returns a positive integer, equal to the number of processed frames
that can be shifted out of FrameSet aFS using PmShiftFrameSet.
If input_flag is set to 0, PmFadeHarmEnds does not expect for new
frames to be added to FrameSet aFS and finishes smoothing regardless
of the FrameSet duration.
PmFadeHarmEnds returns -1 if aParamSetId does not correspond to a
ParamSet of type PM_PARTIAL or if there is no available memory to
perform the operation.
5.11.2 PmScaleFrameSetTime
Synopsis PmFrameSet PmScaleFrameSetTime (PmFrameSet aFS, PmBreakPoint aBP)
Scales time of FrameSet aFS according to a breakpoint
function aBP specifying output time versus input time.
Returns a new scaled FrameSet.
NULL if there is no available memory to perform the operation.
Formatted and maintained by Diemo Schwarz --- last change