- Author:
- Kees van den Doel (kvdoel@cs.ubc.ca)
Field Summary |
protected float |
aLeft
|
protected int |
dixLeft
Current integer f of pointer in buffer per sample. |
protected int |
dixRight
Current integer f of pointer in buffer per sample. |
protected float |
dxLeft
Current fractional f [0 1] of pointer in buffer per sample. |
protected float |
dxRight
Current fractional f [0 1] of pointer in buffer per sample. |
protected float |
f
Loop f (frequency) through buffer. |
protected float[] |
fb
Natural loop frequencies of buffers |
protected float[] |
gainCorrection
fGAin corrections (1 if audio files are ok) |
protected int |
iLeft
|
protected int |
ixLeft
Current integer position of pointer in buffer. |
protected int |
ixRight
Current integer position of pointer in buffer. |
protected float |
levelCorrection
|
protected float[][] |
loopBuffer
Array of buffers to loop |
protected int[] |
loopBufferLength
Buffer lengths |
protected int |
nChannels
|
protected float |
oldF
|
protected float[] |
qFactor
|
float |
srate
Sampling rate in Hertz of Out. |
float |
srateLoopBuffer
Sampling rate in Hertz of loaded buffers (must all be the same). |
protected float |
volume
Playback volume. |
protected float |
xLeft
Current fractional position [0 1] of pointer in buffer. |
protected float |
xRight
Current fractional position [0 1] of pointer in buffer. |
Constructor Summary |
CrossfadeLoopBuffer(float srate,
int bufferSize,
java.lang.String[] fn,
float[] fb)
Construct buffers from named files. |
CrossfadeLoopBuffer(int bufferSize)
For derived classes |
Methods inherited from class jass.engine.Out |
clearBuffer, copyToOld, getBuffer, getBuffer, getBufferSize, getTime, peekAtBuffer, resetTime, setBufferSize, setTime, setTimeAndNotify |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
loopBuffer
protected float[][] loopBuffer
- Array of buffers to loop
loopBufferLength
protected int[] loopBufferLength
- Buffer lengths
gainCorrection
protected float[] gainCorrection
- fGAin corrections (1 if audio files are ok)
volume
protected float volume
- Playback volume.
f
protected float f
- Loop f (frequency) through buffer.
oldF
protected float oldF
fb
protected float[] fb
- Natural loop frequencies of buffers
xLeft
protected float xLeft
- Current fractional position [0 1] of pointer in buffer.
xRight
protected float xRight
- Current fractional position [0 1] of pointer in buffer.
ixLeft
protected int ixLeft
- Current integer position of pointer in buffer.
ixRight
protected int ixRight
- Current integer position of pointer in buffer.
dxLeft
protected float dxLeft
- Current fractional f [0 1] of pointer in buffer per sample.
dxRight
protected float dxRight
- Current fractional f [0 1] of pointer in buffer per sample.
dixLeft
protected int dixLeft
- Current integer f of pointer in buffer per sample.
dixRight
protected int dixRight
- Current integer f of pointer in buffer per sample.
aLeft
protected float aLeft
levelCorrection
protected float levelCorrection
qFactor
protected float[] qFactor
iLeft
protected int iLeft
srate
public float srate
- Sampling rate in Hertz of Out.
srateLoopBuffer
public float srateLoopBuffer
- Sampling rate in Hertz of loaded buffers (must all be the same).
nChannels
protected int nChannels
CrossfadeLoopBuffer
public CrossfadeLoopBuffer(int bufferSize)
- For derived classes
- Parameters:
bufferSize
- biffer size
CrossfadeLoopBuffer
public CrossfadeLoopBuffer(float srate,
int bufferSize,
java.lang.String[] fn,
float[] fb)
- Construct buffers from named files.
- Parameters:
srate
- sampling rate in Hertz.bufferSize
- bufferSize of this Outfn
- Audio files names.natural
- frequencies of the audio files.
getQ
public float getQ(int k)
setQ
public void setQ(int k,
float val)
getNChannels
public int getNChannels()
setVolume
public void setVolume(float val)
- Set force magnitude.
- Parameters:
val
- Volume.
setF
public void setF(float f)
- Set loopspeed.
- Parameters:
f
- Loop freq.
calcRates
protected void calcRates(float f)
getNextSampleStereo
protected float getNextSampleStereo(int k,
int bufsz)
getNextSample
protected float getNextSample(int k,
int bufsz)
- Get next sample value, interpolating in between sample points.
computeBuffer
public void computeBuffer()
- Compute the next buffer.
- Specified by:
computeBuffer
in class Out
getEditorPanel
public ControllerPanel getEditorPanel(java.lang.String name)
getControlPanel
public ControllerPanel getControlPanel()
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception