|
-
Dec 22nd, 2008, 02:40 AM
#11
New Member
Re: Sugestions or Comments about my Sound Tutorial
CVMichael,
Looked in the Tute for anything on bit-depth reduction. Of course, found the 16 bit to 8 bit converter, but was wondering whether you'd be able to advise steps to fulfil the following requirement:
'Allow user to reduce the bit depth of the sound from the bit depth of the loaded wav file, to whatever the user sets - in steps of 1 bit, and down to 1 bit'
Looked around for some guidance on the 'net, and found this in the write-up for 'CMT Bitcrusher - a free VST plug-in for PC':
'You can reduce the bit-depth all the way to 1-bit if you like. The bit-reduction is done by scaling and rounding the input signal to the target bit-depth in integers and then back to floats. For example in four bits, you have to multiply the input signal by eight (2^bits-1) to floats between [-8.0, 8.0]. The actual bit-reduction (or bitcrushing) is done when the floats are rounded to integers and scaled back to [-1.0, 1.0]. This process reduces the resolution of the floats and produces audible bitcrushing-effect'.
So, would the idea be:
1. Scale Wavedata() to between -1 and 1
2. Multiply each sample by 2^(UserBits-1) where UserBits < BitsPerSample of Wavedata
3. Round each sample to Integers
4. Scale each sample back to between -1 and 1
5. Convert back to Bytes and load back in Wavedata()
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|