electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » Clavia Nord Modular » Nord Modular G2 Discussion
Bitmask or dithering in a patch?
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 1 of 1 [13 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Modularmind



Joined: May 06, 2009
Posts: 16
Location: Sweden
G2 patch files: 3

PostPosted: Mon Aug 22, 2011 4:46 am    Post subject: Bitmask or dithering in a patch?
Subject description: Trying to replicate the WMD Geiger Counter
Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
speak_onion



Joined: Oct 19, 2009
Posts: 55
Location: Queens, NY
G2 patch files: 1

PostPosted: Wed Aug 24, 2011 11:48 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
ian-s



Joined: Apr 01, 2004
Posts: 2575
Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 608

PostPosted: Wed Aug 24, 2011 12:48 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Roland Kuit



Joined: Sep 29, 2003
Posts: 1091
Location: The Netherlands/Sweden
Audio files: 8
G2 patch files: 127

PostPosted: Wed Aug 24, 2011 2:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

Funny, today I was toying with an osc and came up with this. The other patches where the result.


Roland Kuit Muxulator.jpg
 Description:
 Filesize:  82.45 KB
 Viewed:  5642 Time(s)

Roland Kuit Muxulator.jpg



Muxolator.pch2
 Description:

Download
 Filename:  Muxolator.pch2
 Filesize:  1.2 KB
 Downloaded:  367 Time(s)


_________________
Roland Kuit
----------------------------
composer|research|synthesis|sound design|lecturer
http://rolandkuit.com/

Last edited by Roland Kuit on Wed Aug 24, 2011 2:32 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Roland Kuit



Joined: Sep 29, 2003
Posts: 1091
Location: The Netherlands/Sweden
Audio files: 8
G2 patch files: 127

PostPosted: Wed Aug 24, 2011 2:02 pm    Post subject: Reply with quote  Mark this post and the followings unread

audio result:


Roland Kuit Audio yo bit.jpg
 Description:
 Filesize:  166.77 KB
 Viewed:  5639 Time(s)

Roland Kuit Audio yo bit.jpg



Audio yo bit.pch2
 Description:

Download
 Filename:  Audio yo bit.pch2
 Filesize:  2.18 KB
 Downloaded:  352 Time(s)


_________________
Roland Kuit
----------------------------
composer|research|synthesis|sound design|lecturer
http://rolandkuit.com/
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Roland Kuit



Joined: Sep 29, 2003
Posts: 1091
Location: The Netherlands/Sweden
Audio files: 8
G2 patch files: 127

PostPosted: Wed Aug 24, 2011 2:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

and with sequencer, pattern gen:


Roland Kuit Audio-wavetable II.jpg
 Description:
 Filesize:  155.44 KB
 Viewed:  5635 Time(s)

Roland Kuit Audio-wavetable II.jpg



Roland Kuit Audio-Wavetable.jpg
 Description:
 Filesize:  142.6 KB
 Viewed:  5597 Time(s)

Roland Kuit Audio-Wavetable.jpg



Audio-wavetable.pch2
 Description:

Download
 Filename:  Audio-wavetable.pch2
 Filesize:  2.1 KB
 Downloaded:  347 Time(s)


Audio-wavetable II.pch2
 Description:

Download
 Filename:  Audio-wavetable II.pch2
 Filesize:  2.22 KB
 Downloaded:  410 Time(s)


_________________
Roland Kuit
----------------------------
composer|research|synthesis|sound design|lecturer
http://rolandkuit.com/
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Modularmind



Joined: May 06, 2009
Posts: 16
Location: Sweden
G2 patch files: 3

PostPosted: Fri Aug 26, 2011 2:06 am    Post subject: Reply with quote  Mark this post and the followings unread

@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
View user's profile Send private message
Roland Kuit



Joined: Sep 29, 2003
Posts: 1091
Location: The Netherlands/Sweden
Audio files: 8
G2 patch files: 127

PostPosted: Fri Aug 26, 2011 2:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

@Modularmind, I ill look into it. The pat. gen. can be used as a kind of formant osc too.
_________________
Roland Kuit
----------------------------
composer|research|synthesis|sound design|lecturer
http://rolandkuit.com/
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Modularmind



Joined: May 06, 2009
Posts: 16
Location: Sweden
G2 patch files: 3

PostPosted: Mon Aug 29, 2011 1:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.... Cool

Input, please!!

/Mm


Bitmask vs Digitizer.jpg
 Description:
 Filesize:  56.52 KB
 Viewed:  141 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

Bitmask vs Digitizer.jpg



Bitmask vs Digitzer.pch2
 Description:

Download
 Filename:  Bitmask vs Digitzer.pch2
 Filesize:  1.39 KB
 Downloaded:  358 Time(s)

Back to top
View user's profile Send private message
speak_onion



Joined: Oct 19, 2009
Posts: 55
Location: Queens, NY
G2 patch files: 1

PostPosted: Tue Aug 30, 2011 1:00 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
grimley



Joined: Jul 07, 2004
Posts: 165
Location: Seattle
G2 patch files: 9

PostPosted: Tue Aug 30, 2011 6:11 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
Modularmind



Joined: May 06, 2009
Posts: 16
Location: Sweden
G2 patch files: 3

PostPosted: Wed Aug 31, 2011 12:53 am    Post subject: Reply with quote  Mark this post and the followings unread

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... Smile 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
View user's profile Send private message
Modularmind



Joined: May 06, 2009
Posts: 16
Location: Sweden
G2 patch files: 3

PostPosted: Fri Nov 11, 2011 3:19 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 1 of 1 [13 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » Clavia Nord Modular » Nord Modular G2 Discussion
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use