#include <Morpher.h>
Public Member Functions | |
| Morpher (const Envelope &f) | |
| Construct a new Morpher using the same morphing envelope for frequency, amplitude, and bandwidth (noisiness). | |
| Morpher (const Envelope &ff, const Envelope &af, const Envelope &bwf) | |
| Construct a new Morpher using the specified morphing envelopes for frequency, amplitude, and bandwidth (noisiness). | |
| Morpher (const Morpher &rhs) | |
| Construct a new Morpher that is a duplicate of rhs. | |
| ~Morpher (void) | |
| Destroy this Morpher. | |
| Morpher & | operator= (const Morpher &rhs) |
| Partial | morphPartial (const Partial &src, const Partial &tgt, int assignLabel) |
| Morph a pair of Partials to yield a new morphed Partial. | |
| void | morph (PartialList::const_iterator beginSrc, PartialList::const_iterator endSrc, PartialList::const_iterator beginTgt, PartialList::const_iterator endTgt) |
| Morph two sounds (collections of Partials labeled to indicate correspondences) into a single labeled collection of Partials. | |
| void | crossfade (PartialList::const_iterator beginSrc, PartialList::const_iterator endSrc, PartialList::const_iterator beginTgt, PartialList::const_iterator endTgt, Partial::label_type label=0) |
| Crossfade Partials with no correspondences. | |
| Breakpoint | morphBreakpoints (const Breakpoint &srcBkpt, const Breakpoint &tgtBkpt, double time) const |
| Compute morphed parameter values at the specified time, using the source and target Breakpoints (assumed to correspond exactly to the specified time). | |
| Breakpoint | morphSrcBreakpoint (const Breakpoint &bp, const Partial &tgtPartial, double time) const |
| Compute morphed parameter values at the specified time, using the source Breakpoint (assumed to correspond exactly to the specified time) and the target Partial (whose parameters are examined at the specified time). | |
| Breakpoint | morphTgtBreakpoint (const Breakpoint &bp, const Partial &srcPartial, double time) const |
| Compute morphed parameter values at the specified time, using the target Breakpoint (assumed to correspond exactly to the specified time) and the source Partial (whose parameters are examined at the specified time). | |
| Breakpoint | fadeSrcBreakpoint (Breakpoint bp, double time) const |
| Compute morphed parameter values at the specified time, using the source Breakpoint, assumed to correspond exactly to the specified time, and assuming that there is no corresponding target Partial, so the source Breakpoint should be simply faded. | |
| Breakpoint | fadeTgtBreakpoint (Breakpoint bp, double time) const |
| Compute morphed parameter values at the specified time, using the target Breakpoint, assumed to correspond exactly to the specified time, and assuming that there is not corresponding source Partial, so the target Breakpoint should be simply faded. | |
| void | setFrequencyFunction (const Envelope &f) |
| Assign a new frequency morphing envelope to this Morpher. | |
| void | setAmplitudeFunction (const Envelope &f) |
| Assign a new amplitude morphing envelope to this Morpher. | |
| void | setBandwidthFunction (const Envelope &f) |
| Assign a new bandwidth morphing envelope to this Morpher. | |
| const Envelope & | frequencyFunction (void) const |
| Return a reference to this Morpher's frequency morphing envelope. | |
| const Envelope & | amplitudeFunction (void) const |
| Return a reference to this Morpher's amplitude morphing envelope. | |
| const Envelope & | bandwidthFunction (void) const |
| Return a reference to this Morpher's bandwidth morphing envelope. | |
| double | amplitudeShape (void) const |
| Return the shaping parameter for the amplitude moprhing function (only used in new log-amplitude morphing). | |
| void | setAmplitudeShape (double x) |
| Set the shaping parameter for the amplitude moprhing function (only used in new log-amplitude morphing). | |
| double | minBreakpointGap (void) const |
| Return the minimum time gap (secs) between two Breakpoints in the morphed Partials. | |
| void | setMinBreakpointGap (double x) |
| Set the minimum time gap (secs) between two Breakpoints in the morphed Partials. | |
| Partial::label_type | sourceReferenceLabel (void) const |
| Return the label of the Partial to be used as a reference Partial for the source sequence in a morph of two Partial sequences. | |
| Partial::label_type | targetReferenceLabel (void) const |
| Return the label of the Partial to be used as a reference Partial for the target sequence in a morph of two Partial sequences. | |
| void | setSourceReferenceLabel (Partial::label_type l) |
| Set the label of the Partial to be used as a reference Partial for the source sequence in a morph of two Partial sequences. | |
| void | setTargetReferenceLabel (Partial::label_type l) |
| Set the label of the Partial to be used as a reference Partial for the target sequence in a morph of two Partial sequences. | |
| PartialList & | partials (void) |
| Return a reference to this Morpher's list of morphed Partials. | |
| const PartialList & | partials (void) const |
| Return a const reference to this Morpher's list of morphed Partials. | |
Sound morphing is achieved by interpolating the time-varying frequencies, amplitudes, and bandwidths of corresponding partials obtained from reassigned bandwidth-enhanced analysis of the source and target sounds. Partial correspondences may be established by labeling, using instances of the Channelizer and Distiller classes.
The Morpher collects morphed Partials in a PartialList, that is accessible to clients.
For more information about sound morphing using the Reassigned Bandwidth-Enhanced Additive Sound Model, refer to the Loris website: www.cerlsoundgroup.org/Loris/.
Morpher is a leaf class, do not subclass.
|
|
Construct a new Morpher using the same morphing envelope for frequency, amplitude, and bandwidth (noisiness).
|
|
||||||||||||||||
|
Construct a new Morpher using the specified morphing envelopes for frequency, amplitude, and bandwidth (noisiness).
|
|
|
Construct a new Morpher that is a duplicate of rhs.
|
|
|
Return the shaping parameter for the amplitude moprhing function (only used in new log-amplitude morphing). This shaping parameter controls the slope of the amplitude morphing function, for values greater than 1, this function gets nearly linear (like the old amplitude morphing function), for values much less than 1 (e.g. 1E-5) the slope is gently curved and sounds pretty "linear", for very small values (e.g. 1E-12) the curve is very steep and sounds un-natural because of the huge jump from zero amplitude to very small amplitude. |
|
||||||||||||||||||||||||
|
Crossfade Partials with no correspondences. Unlabeled Partials (having the specified label) are considered to have no correspondences, so they are just faded out, and not actually morphed. Consistent with the morphing behavior, crossfaded Partials are thinned, if necssary, so that no two Breakpoints are closer in time than the minBreakpointGap. The Partials in the first range are treated as components of the source sound, corresponding to a morph function value of 0, and those in the second are treated as components of the target sound, corresponding to a morph function value of 1. The crossfaded Partials are stored in the Morpher's PartialList.
|
|
||||||||||||
|
Compute morphed parameter values at the specified time, using the source Breakpoint, assumed to correspond exactly to the specified time, and assuming that there is no corresponding target Partial, so the source Breakpoint should be simply faded.
|
|
||||||||||||
|
Compute morphed parameter values at the specified time, using the target Breakpoint, assumed to correspond exactly to the specified time, and assuming that there is not corresponding source Partial, so the target Breakpoint should be simply faded.
|
|
|
Return the minimum time gap (secs) between two Breakpoints in the morphed Partials. Morphing two Partials can generate a third Partial having Breakpoints arbitrarily close together in time, and this makes morphs huge. Raising this threshold limits the Breakpoint density in the morphed Partials. Default is 1/10 ms. |
|
||||||||||||||||||||
|
Morph two sounds (collections of Partials labeled to indicate correspondences) into a single labeled collection of Partials. Unlabeled Partials (having label 0) are crossfaded. The morphed and crossfaded Partials are stored in the Morpher's PartialList. The Partials in the first range are treated as components of the source sound, corresponding to a morph function value of 0, and those in the second are treated as components of the target sound, corresponding to a morph function value of 1.
|
|
||||||||||||||||
|
Compute morphed parameter values at the specified time, using the source and target Breakpoints (assumed to correspond exactly to the specified time).
|
|
||||||||||||||||
|
Morph a pair of Partials to yield a new morphed Partial. Dummy Partials (having no Breakpoints) don't contribute to the morph, except to cause their opposite to fade out. Either (or neither) the source or target Partial may be a dummy Partial (no Breakpoints), but not both. The morphed Partial has Breakpoints at times corresponding to every Breakpoint in both source Partials, omitting Breakpoints that would be closer than the minBreakpointGap to their predecessor. The new morphed Partial is assigned the specified label and returned.
|
|
||||||||||||||||
|
Compute morphed parameter values at the specified time, using the source Breakpoint (assumed to correspond exactly to the specified time) and the target Partial (whose parameters are examined at the specified time).
|
|
||||||||||||||||
|
Compute morphed parameter values at the specified time, using the target Breakpoint (assumed to correspond exactly to the specified time) and the source Partial (whose parameters are examined at the specified time).
|
|
|
|
|
|
Set the shaping parameter for the amplitude moprhing function (only used in new log-amplitude morphing). This shaping parameter controls the slope of the amplitude morphing function, for values greater than 1, this function gets nearly linear (like the old amplitude morphing function), for values much less than 1 (e.g. 1E-5) the slope is gently curved and sounds pretty "linear", for very small values (e.g. 1E-12) the curve is very steep and sounds un-natural because of the huge jump from zero amplitude to very small amplitude.
|
|
|
Set the minimum time gap (secs) between two Breakpoints in the morphed Partials. Morphing two Partials can generate a third Partial having Breakpoints arbitrarily close together in time, and this makes morphs huge. Raising this threshold limits the Breakpoint density in the morphed Partials. Default is 1/10 ms.
|
|
|
Set the label of the Partial to be used as a reference Partial for the source sequence in a morph of two Partial sequences. The reference partial is used to compute frequencies for very low-amplitude Partials whose frequency estimates are not considered reliable. The reference Partial is considered to have good frequency estimates throughout. Setting the reference label to 0 indicates that no reference Partial should be used for the source sequence. |
|
|
Set the label of the Partial to be used as a reference Partial for the target sequence in a morph of two Partial sequences. The reference partial is used to compute frequencies for very low-amplitude Partials whose frequency estimates are not considered reliable. The reference Partial is considered to have good frequency estimates throughout. Setting the reference label to 0 indicates that no reference Partial should be used for the target sequence. |
|
|
Return the label of the Partial to be used as a reference Partial for the source sequence in a morph of two Partial sequences. The reference partial is used to compute frequencies for very low-amplitude Partials whose frequency estimates are not considered reliable. The reference Partial is considered to have good frequency estimates throughout. The default label of 0 indicates that no reference Partial should be used for the source sequence. |
|
|
Return the label of the Partial to be used as a reference Partial for the target sequence in a morph of two Partial sequences. The reference partial is used to compute frequencies for very low-amplitude Partials whose frequency estimates are not considered reliable. The reference Partial is considered to have good frequency estimates throughout. The default label of 0 indicates that no reference Partial should be used for the target sequence. |
1.3.4