|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjass.engine.Out
jass.engine.InOut
jass.generators.ModalObjectWithOneContact
jass.generators.ModalObjectWithOneContactInterpolated
jass.generators.ColorSonificator
public class ColorSonificator
Map HSB color to [pitch reson-width loudness] Represent a color (h,s,b) by a noise source of loudness b, filtered through a reson bank with Shepard frequencies (i.e. octaves apart covering the audible range) and some damping d = 1*freq/freq_lowest. The hue h [0 1] will be mapped to an octave range in freq. (Note the dampings are also scaled when freq. is scaled to preserve scale invariance of octaves.) The saturation s [0 1] will be mapped to the "material" (i.e., the width of the resonances will be multiplied by a factor depending on the saturation.
Field Summary |
---|
Fields inherited from class jass.generators.ModalObjectWithOneContactInterpolated |
---|
ampR_new, R2_new, 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 | |
---|---|
ColorSonificator(float srate,
int bufferSize)
Create and initialize. |
Method Summary | |
---|---|
protected void |
createModalModel()
|
static double |
decibel(double a)
Convert from level to decibel |
float |
getFudgePower()
Get power in scaling law for gains a = a*d^fudgePower. |
float |
getMaximumLevelDifference()
Get level difference between white and black |
float[] |
getSaturationLimits()
Get damping range corresponding to saturation |
void |
setFudgePower(float p)
Set power in scaling law for gains a = a*d^fudgePower. |
void |
setHSB_V(float h,
float s,
float b,
float v)
Set hue, saturation, brightness and slide velocity (1 = max) |
void |
setHSB(float h,
float s,
float b)
Set hue, saturation and brightness |
void |
setMaximumLevelDifference(float dbmax)
Set level difference between white and black |
void |
setSaturationLimits(float dmin,
float dmax)
Set damping range corresponding to saturation |
Methods inherited from class jass.generators.ModalObjectWithOneContactInterpolated |
---|
allocate_new, computeLocation, computeModalFilterBank, computeResonCoeff |
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 |
Constructor Detail |
---|
public ColorSonificator(float srate, int bufferSize)
srate
- sampling rate in Hertz.bufferSize
- Buffer size used for real-time rendering.Method Detail |
---|
public static double decibel(double a)
a
- level
public void setFudgePower(float p)
p
- fudgePowerpublic float getFudgePower()
protected void createModalModel()
public void setSaturationLimits(float dmin, float dmax)
dmin
- damping for saturated colordmax
- damping for unsaturated colorpublic void setMaximumLevelDifference(float dbmax)
dbmax
- maximum level difference between white and blackpublic float getMaximumLevelDifference()
public float[] getSaturationLimits()
public void setHSB_V(float h, float s, float b, float v)
h
- hue in range 0-1s
- saturation in range 0-1b
- brightness in range 0-1v
- velocity in range 0-1public void setHSB(float h, float s, float b)
h
- hue in range 0-1s
- saturation in range 0-1b
- brightness in range 0-1
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |