Package net.oijon.algonquin.tts.trm
Class Tube
- java.lang.Object
-
- net.oijon.algonquin.tts.trm.Tube
-
public class Tube extends java.lang.Object- Author:
- N3ther
-
-
Constructor Summary
Constructors Constructor Description Tube(int length)Creates a tube based on it's length.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float[][]getDelayLine()Debug only, should not be used in production.intgetLength()Gets the length of the tube.doublegetLoss()Gets the current loss factor.intgetSampleRate()Gets the sample rate the delay line is operating at.float[]out()Gets the current output of the delay line.voidpush(float pushAmount)Creates and manages a delay line.voidsetLoss(double loss)Sets the loss factor.float[][]standardize()Converts to 44.1 kHz by adding new data to follow the slope.
-
-
-
Method Detail
-
push
public void push(float pushAmount)
Creates and manages a delay line. Needs work.- Parameters:
pushAmount- The input being added to the delay line.
-
standardize
public float[][] standardize()
Converts to 44.1 kHz by adding new data to follow the slope. Needs work. I could very well be misunderstanding something about this in the paper by Manzara. If so, this method will probably be replaced.- Returns:
- The standardized delay line, can be turned into a .wav file.
-
out
public float[] out()
Gets the current output of the delay line.- Returns:
-
getDelayLine
public float[][] getDelayLine()
Debug only, should not be used in production. Returns the full array.- Returns:
- The delay line.
-
getLength
public int getLength()
Gets the length of the tube.- Returns:
- The tube length in cm.
-
getSampleRate
public int getSampleRate()
Gets the sample rate the delay line is operating at.- Returns:
- The sample rate in Hz
-
getLoss
public double getLoss()
Gets the current loss factor. 1 == no loss, 0 == 100% loss per sample.- Returns:
- The loss factor.
-
setLoss
public void setLoss(double loss)
Sets the loss factor. Debug only.- Parameters:
loss- The loss factor. 1 == no loss, 0 == 100% loss per sample.
-
-