# Bit Reduction | Algorithm Design | Forum — Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters Home Forum Algorithm Design Bit Reduction Topic RSS Bit Reduction Member
Members
August 25, 2016 - 5:06 am
Member Since: July 5, 2016
Forum Posts: 3 Offline

Has anyone worked on a bit reduction plugin? I've been digging around and looking into bit reduction code, but I'm not sure how I'd go about it within rackafx. Thanks so much for your help. New Member
Members
January 29, 2017 - 5:49 pm
Member Since: January 29, 2017
Forum Posts: 2 Offline

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().

Forum Timezone: America/New_York

Most Users Ever Online: 152

Currently Online:
10 Guest(s)

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