Type : Bit-level noise-generating effectReferences : Posted by Jon WatteNotes :This function, run on each sample, will emulate half the effect of running your signal through a Speak-N-Spell or similar low-bit-depth circuitry.

The other half would come from downsampling with no aliasing control, i e replicating every N-th sample N times in the output signal.Code :short keep_bits_from_16( short input, int keepBits ) {
return (input & (-1 << (16-keepBits)));
}