|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jass.engine.Out jass.engine.InOut jass.generators.ModalObjectWithOneContact jass.generators.ModalObjectWithOneContactInterpolated
public class ModalObjectWithOneContactInterpolated
Vibration model of object, capable of playing sound. Changes in freq damping and gains are linearly changed over one buffer rather than abruptly
Field Summary | |
---|---|
protected float[] |
ampR_new
Reson filter gain. |
protected float[] |
R2_new
The transfer function of a reson filter is H(z) = 1/(1-twoRCosTheta/z + R2/z*z). |
protected float[] |
twoRCosTheta_new
|
Fields inherited from class jass.generators.ModalObjectWithOneContact |
---|
ampR, b1, b2, b3, c_i, modalModel, p1, p2, p3, R2, rollGain, srate, tmpBuf, twoRCosTheta, yt_1, yt_2 |
Fields inherited from class jass.engine.InOut |
---|
sourceContainer, sourcePassivity, srcBuffers |
Fields inherited from class jass.engine.Out |
---|
buf, bufferSize, bufOld, lock |
Constructor Summary | |
---|---|
ModalObjectWithOneContactInterpolated(float srate,
int nf,
int np,
int bufferSize)
Create and initialize, but don't set any modal parameters. |
|
ModalObjectWithOneContactInterpolated(int bufferSize)
Constructor for derived classes to call super |
|
ModalObjectWithOneContactInterpolated(ModalModel m,
float srate,
int bufferSize)
Create and initialize with provided modal data. |
Method Summary | |
---|---|
protected void |
allocate_new(int nf,
int np)
Allocate data for new filter values |
protected void |
computeLocation()
Compute gains. |
protected void |
computeModalFilterBank(float[] output,
float[] force,
int nsamples)
Apply external force[] and compute response through bank of modal filters. |
void |
computeResonCoeff()
Compute the reson coefficients from the modal model parameters. |
Methods inherited from class jass.generators.ModalObjectWithOneContact |
---|
addSource, allocate, clearHistory, computeBuffer, computeFilter, setDamping, setFrequencyScale, setGain, setLocation, setNf |
Methods inherited from class jass.engine.InOut |
---|
addSource, getBuffer, getSources, removeSource, resetTime |
Methods inherited from class jass.engine.Out |
---|
clearBuffer, copyToOld, getBuffer, getBufferSize, getTime, peekAtBuffer, setBufferSize, setTime, setTimeAndNotify |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected float[] R2_new
protected float[] twoRCosTheta_new
protected float[] ampR_new
Constructor Detail |
---|
public ModalObjectWithOneContactInterpolated(int bufferSize)
bufferSize
- Buffer size used for real-time rendering.public ModalObjectWithOneContactInterpolated(float srate, int nf, int np, int bufferSize)
srate
- sampling rate in Hertz.nf
- number of modes.np
- number of locations.bufferSize
- Buffer size used for real-time rendering.public ModalObjectWithOneContactInterpolated(ModalModel m, float srate, int bufferSize)
m
- modal model to load.srate
- sampling rate in Hertz.bufferSize
- Buffer size used for real-time rendering.Method Detail |
---|
protected void allocate_new(int nf, int np)
nf
- number of modes.np
- number of locations.public void computeResonCoeff()
ModalObjectWithOneContact.setLocation(int, int, int, float, float, float)
.
computeResonCoeff
in class ModalObjectWithOneContact
protected void computeLocation()
computeLocation
in class ModalObjectWithOneContact
protected void computeModalFilterBank(float[] output, float[] force, int nsamples)
computeModalFilterBank
in class ModalObjectWithOneContact
output
- user provided output buffer.force
- input force.nsamples
- number of samples to compute.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |