Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
Bit Reduction
No permission to create posts
August 25, 2016
5:06 am
Avatar
clyde
Member
Members
Forum Posts: 3
Member Since:
July 5, 2016
sp_UserOfflineSmall 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.

January 29, 2017
5:49 pm
Avatar
reasonuser
New Member
Members
Forum Posts: 2
Member Since:
January 29, 2017
sp_UserOfflineSmall 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 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: 36

Currently Online: W Pirkle
3 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 47

Derek: 41

Peter: 41

clau_ste: 39

Frodson: 38

Gwen: 32

EZB: 24

lppier: 23

Msaldaña: 18

Jorge: 17

Member Stats:

Guest Posters: 1

Members: 478

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 29

Topics: 479

Posts: 1870

Newest Members:

certvalue111, sobhana s, sam, annaharris, Marie Weaver, kev, Steven, Mr Anderson, mguy, omelc

Moderators: W Pirkle: 140

Administrators: Tom: 65, JD Young: 80, Will Pirkle: 0, W Pirkle: 140