/// <summary>
 /// Creates an object with raw parameters and velocity. Parameters are adjusted by velocity.
 /// </summary>
 /// <param name="OutputFile"></param>
 /// <param name="InputFile"></param>
 /// <param name="Length"></param>
 /// <param name="Tempo"></param>
 /// <param name="STP"></param>
 /// <param name="PreUtterance"></param>
 /// <param name="Overlap"></param>
 /// <param name="Envelope"></param>
 /// <param name="Velocity"></param>
 public WavtoolParameter(string OutputFile, string InputFile, double STP, double Length,
                         double Tempo, double PreUtterance, double Overlap, Envelope Envelope, double Velocity)
     : this(OutputFile, InputFile, STP *CommonReferences.GetEffectiveVelocityFactor(Velocity),
            Length, Tempo, PreUtterance *CommonReferences.GetEffectiveVelocityFactor(Velocity),
            Overlap *CommonReferences.GetEffectiveVelocityFactor(Velocity), Envelope)
 {
 }
Exemple #2
0
 public void TestVelocity()
 {
     Assert.AreEqual(CommonReferences.GetEffectiveVelocityFactor(0), 2);
     Assert.AreEqual(CommonReferences.GetEffectiveVelocityFactor(100), 1);
     Assert.AreEqual(CommonReferences.GetEffectiveVelocityFactor(200), 0.5);
     Assert.AreEqual(CommonReferences.GetVelocity(2), 0);
     Assert.AreEqual(CommonReferences.GetVelocity(1), 100);
     Assert.AreEqual(CommonReferences.GetVelocity(0.5), 200);
 }