• 8 bit sound in pd?

hey

been working on a toolbox and want to make also an 8bit sound effect. is there any easy way to do this stuff?
256 [vcf~] objects are really a lot and i hope there is a much more comfortable way to realize an 8 bit sound. The best way would be also to manipulate the frequence and the bitrate.

thanks a lot

addisaden

@addisaden

• Posts 10 | Views 11834
• To change the sample rate of audio paths, use sample and hold. As far as changing bit rate, the best solution I've come up is to use expr~. Come up with an expression that restricts the possible values to those that can be represented by the number of bits you've chosen.

These techniques aren't unique to pd, the SH process is used a lot in modular synths.

• Take a 16-bit signal, divide by 512, multiply by 512 -> only 8 bits of resolution preserved, right? (analogously to shrinking and re-enlarging a pixel image)

• That sounds good. i will try it out & give you an update

thanks a lot

@addisaden

• Oops, miscalculation. Divide and multiply by 256, not 512. 512 would give you 7 bits of resolution.

• Do you mean classic 8-bit video game sound or bit crusher?

• a bit crusher

@addisaden

• @Busnoise said:

Take a 16-bit signal, divide by 512, multiply by 512 -> only 8 bits of resolution preserved, right? (analogously to shrinking and re-enlarging a pixel image)

This won't work as pd's floating point magic will leave the signal (almost) unchanged.
(also in the image analogy, shrinking would be more like downsampling, and 8bit-sound would compare to reduced color depth)
you'll need something like this to actually "clip the bits"

[*~ BD]
| \
| [wrap~]
| |
[-~]
|
[/~ BD]

from discussion here
http://lists.puredata.info/pipermail/pd-list/2008-12/066923.html

searching for bitcrusher here and on the list will give you lots of options

• thanks a lot. that works really good.

@addisaden

• This won't work as pd's floating point magic will leave the signal (almost) unchanged.
(also in the image analogy, shrinking would be more like downsampling, and 8bit-sound would compare to reduced color depth)
you'll need something like this to actually "clip the bits"

[*~ BD]
| \
| [wrap~]
| |
[-~]
|
[/~ BD]

from discussion here
http://lists.puredata.info/pipermail/pd &#8230; 66923.html

Using expr~, you just convert to in after you've multiplied your signal. Then divide that int by the original multiplier to get back between -1 and 1, with the bit depth you desire.

Edit, added a demonstration patch to this reply.

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

Posts 10 | Views 11834
Internal error.

Oops! Looks like something went wrong!