|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jass.engine.Out jass.contact.ContactForceN
public class ContactForceN
A force model with impact, slide, and slide modes based on looping wav files. Roll force is fed through lowpass filter. It allows for N scraping textures, represented by N wav files. You can set which wav file you want to use for scraping, or any linear superposition of the N wav files. Since rolling still has only one wav file this generator is really useful only for scraping at present.
Field Summary | |
---|---|
protected BangForce |
bangForce
|
protected float |
dryRollGain
|
protected float |
fLowPass
|
protected Butter2LowFilter |
lowPassFilter
|
protected int |
nSlideForces
|
protected float |
physicalToAudioGainImpact
|
protected float |
physicalToAudioGainRoll
|
protected float |
physicalToAudioGainSlide
|
protected FilterContainer |
rollForce
|
protected LoopBuffer |
rollForceRaw
|
protected float |
rollSpeed1
|
protected float[] |
slideBalance
|
protected LoopNBuffers |
slideForce
|
protected float |
slideSpeed1
|
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 | |
---|---|
|
ContactForceN(float srate,
int bufferSize,
java.lang.String fnImpact,
java.lang.String[] fnSlide,
java.lang.String fnRoll)
Construct contact force from named files. |
protected |
ContactForceN(int bufferSize)
Contructor 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. |
float[] |
getSlideBalance()
get balance |
void |
setRollFilter(float fLowPass,
float dryRollGain)
Set roll force filter properties: cutoff and drygain. |
void |
setRollProperties(float force,
float speed)
Set roll speed and normal force in physical units. |
void |
setSlideBalance(float[] bal)
Set balance verctor for slide force components |
void |
setSlideProperties(float force,
float speed)
Set slide speed and normal force in physical units. |
void |
setStaticContactModelParameters(float slideSpeed1,
float rollSpeed1,
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 LoopNBuffers slideForce
protected int nSlideForces
protected LoopBuffer rollForceRaw
protected FilterContainer rollForce
protected Butter2LowFilter lowPassFilter
protected float fLowPass
protected float dryRollGain
protected float slideSpeed1
protected float rollSpeed1
protected float vslide0
protected float vslide1
protected float vroll0
protected float vroll1
protected float[] slideBalance
protected float physicalToAudioGainSlide
protected float physicalToAudioGainRoll
protected float physicalToAudioGainImpact
Constructor Detail |
---|
protected ContactForceN(int bufferSize)
public ContactForceN(float srate, int bufferSize, java.lang.String fnImpact, java.lang.String[] fnSlide, java.lang.String fnRoll)
srate
- sampling rate in Hertz.bufferSize
- bufferSize of this Out.fnImpact
- Audio file name for impact. (For example cos20ms.wav.)fnSlide
- Audio file names for slide. (For example grid.wav.)fnRoll
- Audio file name for slide. (For example roll.wav.)Method Detail |
---|
public void setStaticContactModelParameters(float slideSpeed1, float rollSpeed1, float vslide0, float vslide1, float vroll0, float vroll1, float physicalToAudioGainSlide, float physicalToAudioGainRoll, float physicalToAudioGainImpact)
slideSpeed1
- maximum audio loop speed (1 = original recording)rollSpeed1
- maximum audio loop speed (1 = original recording)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 setSlideBalance(float[] bal)
bal
- vector of balancespublic float[] getSlideBalance()
public void bang(float force, float dur)
force
- magnitude.dur
- duration in seconds of impact.public void setSlideProperties(float force, float speed)
force
- normal force.speed
- relative surface velocity.public void setRollProperties(float force, float speed)
force
- normal force.speed
- roll velocity.public void setRollFilter(float fLowPass, float dryRollGain)
public void computeBuffer()
computeBuffer
in class Out
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |