Author |
Message |
Modularmind
Joined: May 06, 2009 Posts: 17 Location: Sweden
G2 patch files: 3
|
Posted: Mon Aug 22, 2011 4:46 am Post subject:
Bitmask or dithering in a patch? Subject description: Trying to replicate the WMD Geiger Counter |
|
|
I've spent some time the last couple of weeks trying to create replicas of two amazing "bitcrushers" - OTO Biscuit and WMD Geiger Counter. I'm almost finished with the Biscuit patch, but I'm stuck on the Geiger Counter. It has a "mask" mode, which is described like this in the manual:
"Bits/Mask. This switch controls how the Bit Depth knob works. In Bits
mode, the Bit Depth knob reduces the resolution of the signal. In Mask
mode, the signal is filtered through a number (0 to 255). This mode can be
used to reduce noise and add gain. In pre wave table mode, it can turn off
small ranges of the wave table, creating altered harmonic content from the
tables."
I don't know much about bitmasking. Is it a sort of dithering, and is that what is being described here? I'm using the ADC and DAC modules to convert the signal to 8-bits. Is there a way to "filter the signal through a number (0 to 255)" with the modules in the G2? What does "filter the signal thru a number" actually mean?
I'm really out of my depth here, since I know so little about these things. But I want to learn from someone who knows more, and I think it can make for a very nice distortion patch. Just running the signal thru a custom wavetable is nice in it's own right.
Any thoughts?
/Mm |
|
Back to top
|
|
|
speak_onion
Joined: Oct 19, 2009 Posts: 57 Location: Queens, NY
G2 patch files: 3
|
Posted: Wed Aug 24, 2011 11:48 am Post subject:
|
|
|
I'm not sure, and that text doesn't specify exactly what's going on, but I think what the masking does is to force one or more bits to be either 0 or 1 (low or high), regardless of the input signal. |
|
Back to top
|
|
|
ian-s
Joined: Apr 01, 2004 Posts: 2672 Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 626
|
Posted: Wed Aug 24, 2011 12:48 pm Post subject:
|
|
|
speak_onion is correct.
bit masking involves a logical AND operation. So if you mask an eight bit value with 0xF0, you will only get the most significant 4 bits (the lsbits will be zero). 0xFE would zero only the lsb.
You could patch it with a constant + ADC and 4 dual AND gates I think.
The term is common in assembly language programming. |
|
Back to top
|
|
|
Roland Kuit
Joined: Sep 29, 2003 Posts: 1090 Location: The Netherlands/Sweden
Audio files: 8
G2 patch files: 127
|
Posted: Wed Aug 24, 2011 2:01 pm Post subject:
|
|
|
Funny, today I was toying with an osc and came up with this. The other patches where the result.
Description: |
|
Filesize: |
82.45 KB |
Viewed: |
19364 Time(s) |
|
Description: |
|
Download (listen) |
Filename: |
Muxolator.pch2 |
Filesize: |
1.2 KB |
Downloaded: |
4099 Time(s) |
Last edited by Roland Kuit on Wed Aug 24, 2011 2:32 pm; edited 1 time in total |
|
Back to top
|
|
|
Roland Kuit
Joined: Sep 29, 2003 Posts: 1090 Location: The Netherlands/Sweden
Audio files: 8
G2 patch files: 127
|
Posted: Wed Aug 24, 2011 2:02 pm Post subject:
|
|
|
audio result:
Description: |
|
Filesize: |
166.77 KB |
Viewed: |
19362 Time(s) |
|
Description: |
|
Download (listen) |
Filename: |
Audio yo bit.pch2 |
Filesize: |
2.18 KB |
Downloaded: |
4142 Time(s) |
|
|
Back to top
|
|
|
Roland Kuit
Joined: Sep 29, 2003 Posts: 1090 Location: The Netherlands/Sweden
Audio files: 8
G2 patch files: 127
|
Posted: Wed Aug 24, 2011 2:10 pm Post subject:
|
|
|
and with sequencer, pattern gen:
Description: |
|
Filesize: |
155.44 KB |
Viewed: |
19359 Time(s) |
|
Description: |
|
Filesize: |
142.6 KB |
Viewed: |
19320 Time(s) |
|
Description: |
|
Download (listen) |
Filename: |
Audio-wavetable.pch2 |
Filesize: |
2.1 KB |
Downloaded: |
4166 Time(s) |
Description: |
|
Download (listen) |
Filename: |
Audio-wavetable II.pch2 |
Filesize: |
2.22 KB |
Downloaded: |
4233 Time(s) |
|
|
Back to top
|
|
|
Modularmind
Joined: May 06, 2009 Posts: 17 Location: Sweden
G2 patch files: 3
|
Posted: Fri Aug 26, 2011 2:06 am Post subject:
|
|
|
@Roland: That last audio-wavetable patch looks similar to the one I use in my geiger counter patch. I've copied and modified a waveshaper patch by Fozzie (user here) where the signal is split into positive and negative parts and each part is treated by a dedicated wavetable. I haven't tried to see how much difference that makes.
@Ian: In my Biscuit patch you can turn off the bits one by one. If you turn them off from least significant to most significant it sounds like regular bit reduction (like with the digitizer module). If I understand you and speak_onion correctly instead of just turning them off I replace them with a constant value high or low, and that then is essentially bitmasking? So for instance if I want 7 bits, not regularly reduced but masked, I should replace the least significant bit with a constant value? How do I know if it should be high or low? Or have I got it all wrong?
I’m at work at the moment. I’ll try to post some pictures of example patches once I’m back home.
Thanks so much for every ones input!
/Mm |
|
Back to top
|
|
|
Roland Kuit
Joined: Sep 29, 2003 Posts: 1090 Location: The Netherlands/Sweden
Audio files: 8
G2 patch files: 127
|
Posted: Fri Aug 26, 2011 2:47 pm Post subject:
|
|
|
@Modularmind, I ill look into it. The pat. gen. can be used as a kind of formant osc too. |
|
Back to top
|
|
|
Modularmind
Joined: May 06, 2009 Posts: 17 Location: Sweden
G2 patch files: 3
|
Posted: Mon Aug 29, 2011 1:53 pm Post subject:
|
|
|
Ok, so this is a test patch where I've tried (without really knowing what I'm doing) to use the advice from Ian and speak_onion. Anyway, I've put a logic gate between all the bits from the ADC module and the DAC module. All gates are set to AND except for D7 which has it's gate set to OR (it could just as well have been bypassed I guess...). A constant module converted to binary through a ADC module is feeding the first input of every gate. The other input is fed by the sound input (converted to binary with an ADC). Reducing the value of the constant module reduces the bit resolution. It's sounds like the Digitizer but with more room for fine adjustment of the bit reduction. So if I've done this right bit masking is just one way of approaching bit reduction. How does that compare then to "regular" bit reduction (if there is such a thing)? Does bit masking turn off the bits following a pattern, rather than turning them off from low to high (D0, then D1, then D2...)? This is a mystery to me...
A strange thing I found when I compared this way of masking the bits with the bit reduction of the Digitizer module is that the ADC to DAC modules with all bits going through sounds just like the Digitizer module when it's set to Bits: 10 (not 8 as I would've expected). The Digitizer is much noisier at 8 bits. Another thing is that the headroom seems higher in the Digitizer module. The ADC to DAC clips earlier with the same input volume. Wonder what this all means??
This feels like being on an adventure....
Input, please!!
/Mm
Description: |
|
Filesize: |
56.52 KB |
Viewed: |
499 Time(s) |
This image has been reduced to fit the page. Click on it to enlarge. |
|
Description: |
|
Download (listen) |
Filename: |
Bitmask vs Digitzer.pch2 |
Filesize: |
1.39 KB |
Downloaded: |
3900 Time(s) |
|
|
Back to top
|
|
|
speak_onion
Joined: Oct 19, 2009 Posts: 57 Location: Queens, NY
G2 patch files: 3
|
Posted: Tue Aug 30, 2011 1:00 pm Post subject:
|
|
|
Doesn't the biscuit offer a dedicated button for each bit, when doing the bit masking? That might be a more flexible way to implement the masking than a knob. That way, you could turn off a more significant bit, while allowing a less significant bit to continue operating normally. |
|
Back to top
|
|
|
grimley
Joined: Jul 07, 2004 Posts: 168 Location: Seattle
G2 patch files: 9
|
Posted: Tue Aug 30, 2011 6:11 pm Post subject:
|
|
|
speak_onion wrote: | Doesn't the biscuit offer a dedicated button for each bit, when doing the bit masking? That might be a more flexible way to implement the masking than a knob. That way, you could turn off a more significant bit, while allowing a less significant bit to continue operating normally. |
That was the approach I took with this old (convoluted) patch:
http://electro-music.com/forum/viewtopic.php?highlight=biscuit&t=40428 _________________ Sleep Distillery
Apeirophobe |
|
Back to top
|
|
|
Modularmind
Joined: May 06, 2009 Posts: 17 Location: Sweden
G2 patch files: 3
|
Posted: Wed Aug 31, 2011 12:53 am Post subject:
|
|
|
grimley wrote: | speak_onion wrote: | Doesn't the biscuit offer a dedicated button for each bit, when doing the bit masking? That might be a more flexible way to implement the masking than a knob. That way, you could turn off a more significant bit, while allowing a less significant bit to continue operating normally. |
That was the approach I took with this old (convoluted) patch:
http://electro-music.com/forum/viewtopic.php?highlight=biscuit&t=40428 |
Yes, and that's what I've done in my Biscuit patch as well. The test-patch "Bitmask vs Digitizer" was more aimed for my replica of the Geiger counter, where the bit reduction is controlled with only one knob. What confused me though (and still do) about the Geiger counter is the two modes - Bitmask vs Bitreduction. I'm still unsure if I understand the difference correctly. Correct me if I'm wrong, but "regular" bit reduction means you turn of the bits starting with the 1st, moving on to the second and so on, where as with bitmasking the bits in the byte are turned off according to a number that represent a certain state of the bits (a number between 0 and 255). Can someone please confirm if I've understood this right? That's what I've tried to achieve with my test-patch following Ian's advice.
@Grimley: You beat me to it... But maybe my patch is implemented a bit differently. I will post my patch soon (it's almost ready) and I will check yours as well. In my version you can turn off or invert the bits with the buttons (and/or knobs) but the state is not reflected by the leds only the text on the lcd. My aim has also been to create controll over the patch that is as "ergonomical" as possible and true to the original. I've left out the delay to save patch memory.
/Mm |
|
Back to top
|
|
|
Modularmind
Joined: May 06, 2009 Posts: 17 Location: Sweden
G2 patch files: 3
|
Posted: Fri Nov 11, 2011 3:19 am Post subject:
|
|
|
My quest to understand bit masking and how that relates to "regular" bit reduction (like with the digitizer module) and also the concept of dithering is not completed. But some of it has become a bit(!) clearer. First of all I have realized that dithering is a concept very different from bit masking and bit reduction. From what I've gathered (I found a really good PDF from Ozone on this topic on the net) dithering is used as a technique to hide or mask quantizations noise/errors that occurs when reducing bit resolution. Bit masking on the other hand seems to be a way of reducing the resolution in finer increments than with regular bit truncation/redcution. The result is a smoother bit reduction.
I tried my best to replicate the Geiger Counter, but haven't been pleased with the result. I'm not pleased with the Bicuit patch either. But when I took the best of both patches and put them together and made some adjustments, the result was much more satisfying. I've posted the patch here: http://electro-music.com/forum/post-344557.html#344557
I want to say thank you to everyone that helped out with this!
/Mm |
|
Back to top
|
|
|
|