



I hope somebody will still find my answer to be helpful, let's go.
Reducing the bit-depth means reducing the number of quantization levels in the digital signal. In extreme cases you will start to see steps in the amplitude since there are too few values to represent the level of the signal. This adds quantization noise which is just the difference between the original and the digital (quantized) signal.
If you want to implement a simple bit crusher in RaxkAFX, you need to specify a number of levels (the bit-depth) and recalculate each incoming sample so it will be shifted to the nearest level you specified beforehand.
Â
The math behind it is quite easy. For a desired bit-depth b the formula might look like this:
y(n) = floor( x(n) * 2^(b-1) ) / (2^(b-1))
Â
An example with 4 bits:
The input sample has a value of 0.4.Â
y(n) = floor( 0.4 * 2^3 ) / 2^3 = floor( 0.4 * 8 ) / 8 = floor( 3.2 ) / 8 = 3 / 8 = 0.375
The positive values will be mapped to 1 of 8 values like the negative values. This makes 16 levels.
Â
Another example with x(n) = -1.0 and 6 bits:
y(n) = floor( -1.0 * 2^5 ) / 2^5 =Â floor( -1.0 * 32 ) / 32 = floor( -32 ) / 32 = -1
Â
One might use the ceiling or rounding function instead of floor().
Most Users Ever Online: 152
Currently Online:
10 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Chaes: 56
Skyler: 48
StevieD: 46
Derek: 46
Frodson: 45
Peter: 43
TheSmile: 43
Nickolai: 43
clau_ste: 39
jeanlecode: 37
Member Stats:
Guest Posters: 1
Members: 768
Moderators: 1
Admins: 6
Forum Stats:
Groups: 13
Forums: 42
Topics: 842
Posts: 3347
Moderators: W Pirkle: 689