|
|||||||||
| 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.patches.LowpassColorSonificator
public class LowpassColorSonificator
Map HSB color to [pitch reson-width lowpass-cutoff] Represent a color (h,s,b) by a noise source of maximum freq~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. This is a patch using ColorSonificator (with b==1) and then filter through Butterworth filter. So brightness is mapped to surface roughness if we think of the sound as being scrpe sounds.
| Field Summary | |
|---|---|
protected Butter2LowFilter |
butter2LowFilter
|
protected FilterContainer |
filterContainer
|
protected float |
lowerFreq
|
protected float |
maxSlideVelocity
|
protected float |
minSlideVelocity
|
protected float |
srate
|
protected jass.patches.LowpassColorSonificator.HS1ColorSonificator |
theHS1ColorSonificator
|
protected float |
upperFreq
|
| Fields inherited from class jass.engine.InOut |
|---|
sourceContainer, sourcePassivity, srcBuffers |
| Fields inherited from class jass.engine.Out |
|---|
buf, bufferSize, bufOld, lock |
| Constructor Summary | |
|---|---|
LowpassColorSonificator(float srate,
int bufferSize)
Create and initialize. |
|
LowpassColorSonificator(int bufferSize)
Create. |
|
LowpassColorSonificator(int bufferSize,
float srate)
Create. |
|
| Method Summary | |
|---|---|
java.lang.Object |
addSource(Source s)
Add source to input of patch, the lowpass filter in this case. |
protected void |
computeBuffer()
Compute the next buffer and store in member float[] buf. |
protected void |
createPatch()
|
float |
getFudgePower(float p)
Get power in scaling law for gains a = a*d^fudgePower. |
float[] |
getLowpassFrequencyRange()
Get freq. |
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 |
setLowpassFrequencyRange(float lower,
float upper)
Set freq. |
void |
setSaturationLimits(float dmin,
float dmax)
Set damping range corresponding to saturation |
| 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 srate
protected float upperFreq
protected float lowerFreq
protected FilterContainer filterContainer
protected Butter2LowFilter butter2LowFilter
protected jass.patches.LowpassColorSonificator.HS1ColorSonificator theHS1ColorSonificator
protected float minSlideVelocity
protected float maxSlideVelocity
| Constructor Detail |
|---|
public LowpassColorSonificator(float srate,
int bufferSize)
srate - sampling rate in Hertz.bufferSize - Buffer size used for real-time rendering.public LowpassColorSonificator(int bufferSize)
bufferSize - Buffer size used for real-time rendering.
public LowpassColorSonificator(int bufferSize,
float srate)
bufferSize - Buffer size used for real-time rendering.srate - sampling rate in Hz| Method Detail |
|---|
public void setLowpassFrequencyRange(float lower,
float upper)
lower - freq for blackupper - freq. for whitepublic float[] getLowpassFrequencyRange()
public void setFudgePower(float p)
p - fudgePowerpublic float getFudgePower(float p)
public void setSaturationLimits(float dmin,
float dmax)
dmin - damping for saturated colordmax - damping for unsaturated colorprotected void createPatch()
public java.lang.Object addSource(Source s)
throws SinkIsFullException
addSource in interface SinkaddSource in class InOuts - Source to add.
SinkIsFullException
public void setHSB(float h,
float s,
float b)
h - hue in range 0-1s - saturation in range 0-1b - brightness in range 0-1
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-1protected void computeBuffer()
computeBuffer in class Out
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||