|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jass.engine.Out jass.contact.FilteredWavContactForce
public class FilteredWavContactForce
A force model with impact, slide, and slide modes based on looping wav files, fed through Reson. Roll force is fed through modal filter.
Field Summary | |
---|---|
protected BangForce |
bangForce
|
protected float |
physicalToAudioGainImpact
|
protected float |
physicalToAudioGainRoll
|
protected float |
physicalToAudioGainSlide
|
protected ResonFilter |
resonRollFilter
|
protected ResonFilter |
resonSlideFilter
|
protected float |
rollARa
|
protected float |
rollARd
|
protected float |
rollARf
|
protected ModalObjectWithOneContact |
rollForce
|
protected ConstantLoopBuffer |
rollForceRaw
|
protected float |
rollFreq0
|
protected float |
rollFreq1
|
protected float |
rollModalDamping
|
protected FilterContainer |
rollReson
|
protected float |
slideARa
|
protected float |
slideARd
|
protected float |
slideARf
|
protected FilterContainer |
slideForce
|
protected ConstantLoopBuffer |
slideForceRaw
|
protected float |
slideFreq0
|
protected float |
slideFreq1
|
protected float |
vroll0
|
protected float |
vroll1
|
protected float |
vslide0
|
protected float |
vslide1
|
Fields inherited from class jass.engine.Out |
---|
buf, bufferSize, bufOld, lock |
Constructor Summary | |
---|---|
|
FilteredWavContactForce(float srate,
int bufferSize,
java.lang.String fnImpact,
java.lang.String fnSlide,
java.lang.String fnRoll,
ModalModel mm)
Construct contact force from named files. |
protected |
FilteredWavContactForce(int bufferSize)
Constructor intended only for subclass constructors (super(bufferSize);) |
Method Summary | |
---|---|
void |
bang(float force,
float dur)
Generate impact force in physical units. |
void |
computeBuffer()
Compute the next buffer. |
void |
setRollFilterModalDamping(float val)
Set roll force modal filter properties: damping. |
void |
setRollModelDamping(float d)
Set roll model damping (usually static property) |
void |
setRollProperties(float force,
float speed)
Set roll speed and normal force in physical units. |
void |
setRollReson(float f,
float d,
float a)
Set roll reson at low lvel |
void |
setSlideModelDamping(float d)
Set slide model damping (usually static property) |
void |
setSlideProperties(float force,
float speed)
Set slide speed and normal force in physical units. |
void |
setSlideReson(float f,
float d,
float a)
Set slide reson at low lvel |
void |
setStaticContactModelParameters(float slideFreq0,
float slideFreq1,
float rollFreq0,
float rollFreq1,
float vslide0,
float vslide1,
float vroll0,
float vroll1,
float physicalToAudioGainSlide,
float physicalToAudioGainRoll,
float physicalToAudioGainImpact)
Set model parameters mapping physical units to audio units |
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 |
Field Detail |
---|
protected BangForce bangForce
protected ConstantLoopBuffer slideForceRaw
protected FilterContainer slideForce
protected ResonFilter resonSlideFilter
protected float slideARd
protected float slideARf
protected float slideARa
protected float slideFreq0
protected float slideFreq1
protected float vslide0
protected float vslide1
protected ConstantLoopBuffer rollForceRaw
protected FilterContainer rollReson
protected ResonFilter resonRollFilter
protected float rollARd
protected float rollARf
protected float rollARa
protected float rollFreq0
protected float rollFreq1
protected ModalObjectWithOneContact rollForce
protected float rollModalDamping
protected float vroll0
protected float vroll1
protected float physicalToAudioGainSlide
protected float physicalToAudioGainRoll
protected float physicalToAudioGainImpact
Constructor Detail |
---|
protected FilteredWavContactForce(int bufferSize)
public FilteredWavContactForce(float srate, int bufferSize, java.lang.String fnImpact, java.lang.String fnSlide, java.lang.String fnRoll, ModalModel mm)
srate
- sampling rate in Hertz.bufferSize
- bufferSize of this Out.fnImpact
- Audio file name for impact. (For example cos20ms.wav.)fnSlide
- Audio file name for slide. (For example grid.wav.)fnRoll
- Audio file name for slide. (For example roll.wav.)mm
- ModalModelMethod Detail |
---|
public void setStaticContactModelParameters(float slideFreq0, float slideFreq1, float rollFreq0, float rollFreq1, float vslide0, float vslide1, float vroll0, float vroll1, float physicalToAudioGainSlide, float physicalToAudioGainRoll, float physicalToAudioGainImpact)
slideFreq0
- minimum reson freq.slideFreq1
- maximum reson freq.rollFreq0
- minimum reson freq.rollFreq1
- maximum reson freq.vslide0
- minimum physical speed (lower than this is considered to be zero)vslide1
- maximum physical speed (higher than this is set to this value)vroll0
- minimum physical speed (lower than this is considered to be zero)vroll1
- maximum physical speed (higher than this is set to this value)physicalToAudioGainSlide
- multiplies normal force to get slide gainphysicalToAudioGainRoll
- multiplies normal force to get roll gainphysicalToAudioGainImpact
- multiplies impact force to get impact gainpublic void setSlideModelDamping(float d)
d
- dampingpublic void setSlideReson(float f, float d, float a)
public void setSlideProperties(float force, float speed)
force
- normal force.speed
- relative surface velocity.public void setRollModelDamping(float d)
d
- dampingpublic void setRollReson(float f, float d, float a)
public void setRollProperties(float force, float speed)
force
- normal force.speed
- roll velocity.public void setRollFilterModalDamping(float val)
public void bang(float force, float dur)
force
- magnitude.dur
- duration in seconds of impact.public void computeBuffer()
computeBuffer
in class Out
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |