be.hogent.tarsos.dsp
Class WaveformSimilarityBasedOverlapAdd.Parameters

java.lang.Object
  extended by be.hogent.tarsos.dsp.WaveformSimilarityBasedOverlapAdd.Parameters
Enclosing class:
WaveformSimilarityBasedOverlapAdd

public static class WaveformSimilarityBasedOverlapAdd.Parameters
extends java.lang.Object

An object to encapsulate some of the parameters for WSOLA, together with a couple of practical helper functions.

Author:
Joren Six

Constructor Summary
WaveformSimilarityBasedOverlapAdd.Parameters(double tempo, double sampleRate, int newSequenceMs, int newSeekWindowMs, int newOverlapMs)
           
 
Method Summary
static WaveformSimilarityBasedOverlapAdd.Parameters automaticDefaults(double tempo, double sampleRate)
           
 double getOverlapMs()
           
 double getSampleRate()
           
 double getSeekWindowMs()
           
 double getSequenceMs()
           
 double getTempo()
           
static WaveformSimilarityBasedOverlapAdd.Parameters musicDefaults(double tempo, double sampleRate)
           
static WaveformSimilarityBasedOverlapAdd.Parameters slowdownDefaults(double tempo, double sampleRate)
           
static WaveformSimilarityBasedOverlapAdd.Parameters speechDefaults(double tempo, double sampleRate)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WaveformSimilarityBasedOverlapAdd.Parameters

public WaveformSimilarityBasedOverlapAdd.Parameters(double tempo,
                                                    double sampleRate,
                                                    int newSequenceMs,
                                                    int newSeekWindowMs,
                                                    int newOverlapMs)
Parameters:
tempo - The tempo change 1.0 means unchanged, 2.0 is + 100% , 0.5 is half of the speed.
sampleRate - The sample rate of the audio 44.1kHz is common.
newSequenceMs - Length of a single processing sequence, in milliseconds. This determines to how long sequences the original sound is chopped in the time-stretch algorithm. The larger this value is, the lesser sequences are used in processing. In principle a bigger value sounds better when slowing down tempo, but worse when increasing tempo and vice versa. Increasing this value reduces computational burden & vice versa.
newSeekWindowMs - Seeking window length in milliseconds for algorithm that finds the best possible overlapping location. This determines from how wide window the algorithm may look for an optimal joining location when mixing the sound sequences back together. The bigger this window setting is, the higher the possibility to find a better mixing position will become, but at the same time large values may cause a "drifting" artifact because consequent sequences will be taken at more uneven intervals. If there's a disturbing artifact that sounds as if a constant frequency was drifting around, try reducing this setting. Increasing this value increases computational burden & vice versa.
newOverlapMs - Overlap length in milliseconds. When the chopped sound sequences are mixed back together, to form a continuous sound stream, this parameter defines over how long period the two consecutive sequences are let to overlap each other. This shouldn't be that critical parameter. If you reduce the DEFAULT_SEQUENCE_MS setting by a large amount, you might wish to try a smaller value on this. Increasing this value increases computational burden & vice versa.
Method Detail

speechDefaults

public static WaveformSimilarityBasedOverlapAdd.Parameters speechDefaults(double tempo,
                                                                          double sampleRate)

musicDefaults

public static WaveformSimilarityBasedOverlapAdd.Parameters musicDefaults(double tempo,
                                                                         double sampleRate)

slowdownDefaults

public static WaveformSimilarityBasedOverlapAdd.Parameters slowdownDefaults(double tempo,
                                                                            double sampleRate)

automaticDefaults

public static WaveformSimilarityBasedOverlapAdd.Parameters automaticDefaults(double tempo,
                                                                             double sampleRate)

getOverlapMs

public double getOverlapMs()

getSequenceMs

public double getSequenceMs()

getSeekWindowMs

public double getSeekWindowMs()

getSampleRate

public double getSampleRate()

getTempo

public double getTempo()