|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ddf.minim.ugens.UGen ddf.minim.ugens.BitCrush
public class BitCrush
BitCrush is an effect that reduces the fidelity of the incoming signal. This results in a sound that is "crunchier" sounding, or "distorted".
Audio is represented digitally (ultimately) as an integral value. If you have 16-bit audio, then you can represent a sample value with any number in the range -32,768 to +32,767. If you bit-crush this audio do be 8-bit, then you effectively reduce it representation to -128 to +127, even though you will still represent it with a 16-bit number. This reduction in the fidelity of the representation essentially squares off the waveform, which makes it sound "crunchy". Try bit crushing down to 1-bit and see what you get!
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ddf.minim.ugens.UGen |
---|
UGen.InputType, UGen.UGenInput |
Field Summary | |
---|---|
UGen.UGenInput |
audio
The audio input is where audio that gets bit-crushed should be patched. |
UGen.UGenInput |
bitRes
Control the bit resolution with another UGen by patching to bitRes. |
Constructor Summary | |
---|---|
BitCrush()
Construct a BitCrush with a bit resolution of 1. |
|
BitCrush(float localBitRes)
Construct a BitCrush with the specified bit resolution. |
Method Summary | |
---|---|
void |
setBitRes(float localBitRes)
Set the bit resolution directly. |
protected void |
uGenerate(float[] channels)
Implement this method when you extend UGen. |
Methods inherited from class ddf.minim.ugens.UGen |
---|
addInput, getLastValues, patch, patch, patch, printInputs, removeInput, sampleRate, sampleRateChanged, setSampleRate, tick, unpatch, unpatch |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public UGen.UGenInput audio
public UGen.UGenInput bitRes
Constructor Detail |
---|
public BitCrush()
public BitCrush(float localBitRes)
localBitRes
- typically you'll want this in the range [1,16]Method Detail |
---|
public void setBitRes(float localBitRes)
localBitRes
- typically you'll want this in the range [1,16]protected void uGenerate(float[] channels)
UGen
getLastValues
method of your audio UGenInput to retrieve the audio you want to modify,
which you will then modify however
you need to, assigning the result to the values in channels
.
uGenerate
in class UGen
channels
- an array representing one sample frame.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |