• ### Bit Crusher

Hey all,

Does anyone know if there was any abstraction that realizes the bit crusher effect on Pd?

Thanks

• Posts 14 | Views 17192
• So how do you think you would go about making one of these yourself? I bet you could program in a lot more options on your own.

• since a bit depth reduction is nothing else than quantizing the audio signal to specific value, this here should do the trick. at least i guess.

by the way, it seems there is an object, "quantize~", that should work like this.

http://www.pdpatchrepo.info/hurleur/bit.pd

• (by Maelstorm)

Just took a look at your patch, and you're actually creating a 4-bit signal. To get the correct range for bit depth, you need to raise two to the power of the bit depth. So 2^8=256, but since we use zero the range would be 0-255. And then quantize it with int(). I've always done it like this:

[expr~ \$v1*.5+.5] <-put the signal in 0-1 range
|
| [8\ <-bit-depth
| |
| [expr pow(2, \$f1)-1]
| |\
[expr~ int(\$v1*\$f2)] \
\ |
\ |
[expr~ \$v1/\$f2*2-1] <-bring it back to -1 - 1 range

I've never used [quantize~] before, but from looking at it's helpfile it would seem all of that can be done by sending it the [8bit( message, but that's not as fun .

• @ezequielabregu said:

[expr~ \$v1/\$f2*2-1]

What is \$f2 in this expression? The result of [expr pow(2, \$f1)-1]? I tried your implementation but it doesn't sound quite right so I think I am not interpreting your signal flow correctly. Can you clarify, @ezequielabregu ?

• @ricky I couldn't quite work it out at first but realised the diagonals are the connections from the right outlets. I couldn;t quite get the last expr~ to work but multiplying the output by 4 after that sorted it. Maybe someone can make this more elegant than me.bit_Crusher.pd

• @ricky I meant going to the right inlets of the objects below

• else/crusher~

• @toxonic said:

by the way, it seems there is an object, "quantize~", that should work like this.

else/quantizer~ is better for this

• @Element-S said:

Maybe someone can make this more elegant than me.bit_Crusher.pd

this example from my live electronics tutorial explains how to do this in a more elegant way with expr~

Posts 14 | Views 17192
Internal error.

Oops! Looks like something went wrong!