[Experiment] Designing a "Digital Noise Source" in Gen

    Sep 16 2013 | 6:29 am
    Caveat: Digital noise is flawed. Having said that, how 'less flawed' can we make it? Specifically with gen objects. (apologies to Mr. Castine)
    Most digital noise circuits involve a linear feedback shift register's output of 0s and 1s being smoothed / filtered into various noise types. The most known source is the MM5837 (Buchla's Source of Uncertainty) which features a 17-bit LFSR. Unfortunately it's almost a joke to consider this chip pseudo-random, as you can hear it repeating after only a few seconds. But it does make for a decent jumping off point.
    I've emulated the MM5837 within Gen along with a typical filtering 'circuit' for outputting white noise. The result is definitely not white noise. The LFSR section is easily improved (experiment with length and taps), but it's the filtering section that could be the downfall. I included some comments explaining what's going on in the Gen subpatch in case anyone has any improvement ideas.
    Anyone else messing around with similar ideas in Gen or does [noise] suit your tastes for the most part?

    • Sep 16 2013 | 12:44 pm
      I actually wrote a small bachelour paper about this. I might upload it somewhere or of you're really interested I can send it to you. cheers
    • Sep 16 2013 | 1:00 pm
      Digital noise is flawed
      ? Why? Because it is not random but pseudo random? Old discussion.. But you might also beinterested in knuth's "The Art of Computer Programming" There is a great section on pseudo random algorithms and of course it shows algorithms capable of generating random numbers with periods that are so long and so "random" that they are apropriate for statistical problems that require much more quality than the human ear :)
    • Sep 16 2013 | 2:34 pm
      I placed that there to address the debate and move past it. I meant in theory. The point is to generate and celebrate pseudo random noise. Both have their uses and faults depending on context. As a comparator noise seed or weird sound source it works great. I apologize for the confusion.
      Here's a new test patch I came up with while experimenting with different filter methods. After reading http://goo.gl/gYYhHi I tried to copy the 16-bit LFSR he starts with using a reworking of JVKR's rungler register. I generate two noise sources from this crossfaded with the left dial. One straight from the last bit and then one that's been put through an 8-bit "DAC". As expected the only difference is volume. Then I tried two different filtering methods. One using my weird op-amp sim that is probably incredibly flawed, and another that uses math to move the range down '-1 to 1' from '0 to 1'. This difference is selectable with the right dial. Op-Amp is noisy but squelchy(?). You can hear the pulse train in both but Math is "cleaner". Both go to through the same gen onepole sub patch set to a cutoff of F/20 of the internal clock which is adjustable. When F is set to values at 44100 * 10^n weird behavior due to the sampling rate is observed. Notes are included.
      Play around, have fun, share discoveries. 'Choo Choo' goes the pulse train!
      (ignore patch name, it's based on the inspiration paper. the results are definitely NOT white or pink noise.)
    • Sep 16 2013 | 2:36 pm
      didn't mean to hijack the thread.
    • Sep 17 2013 | 6:53 pm
      great idea! will give it a go in gen~ soon.
      but in the meantime, since you seem to also be asking about digital noise generation in general, thought you might be interested in this: https://cycling74.com/forums/sc-max-supercollider-library/
      supercollider has great noise generators, i remember trying those max ports out early in max5 and being impressed... not sure if they still work in max6 but you could clone the git to look at the source code there if not.
      "Anyone else messing around with similar ideas in Gen or does [noise] suit your tastes for the most part?"
      noise~ seems great for full-spectrum white noise, but pink~ is interesting too.
    • Sep 18 2013 | 3:26 am
      Awhile back I made an automatic sah in gen~. It samples when the input changes enough; it's also a way of removing low-level jitter from a signal, making it really useful in CV feedback loops. It could be interesting with these noise algorithms.
      I've also been working on a gen-based Gaussian distribution with skew and scale in the vein of the Source of Uncertainty. (a biased skew rather than the normal statistical skew)
    • Nov 01 2013 | 10:53 pm
      I'm currently building a Turing Machine Eurorack module, which is influenced from similar bitshifting techniques used in the Wiard and Buchla mods. The project is well documented, and includes some interesting links to research here which may be of some use.
      @cudnylon I had to take a little peek into your patches and they're nicely done (thx for the share!)
      Personally, what drew me towards these modules was the "flawed" RNG aspect. I'm currently experimenting with scale quantization on the output, and trying to observe the effects it has on the RNG distribution as well as overall "musical usefulness". I'll post something when i get a bit of time to finish it. In any case, its made me appreciate max-msp as a prototyping tool - its a lot easier than electronics :P
      @Peter really cool work on the BEAP project. I haven't had time to look into it in detail, but it would be good to add something along these type of mods. The gaussian module is ok, but thats a bit too random for me (although useful as part of the distribution).
    • Nov 02 2013 | 3:50 pm
      @Justin, thanks. At some point I'd like to get the rest of the Source of Uncertainty implemented. Would be cool to get the Turing Machine integrated into BEAP.
      I have a stretch quantizer from my synth library that I need to port over; it works well with the gaussian stuff. (stretch as in it maps the specified values over the range evenly, so sending a triangle wave LFO through will get you a nice even scale/arpeggio)
      For rhythmic stuff, there's also a new clock divider in BEAP based off of 4MS' Rotating Clock Divider. (but with some extra fun stuff, like changing the step increment (e.g. 0.5 instead of 1 will double up))
    • Nov 02 2013 | 6:39 pm
      We have an implementation of turing machine-style bit munging implemented as a full instrument in our group - It's relatively simple, it all boils down to UI, really. I'll ask if the maker has any insights.
      @peter that quantizer sounds like fun! (I've been thinking a lot about how in synth circles, quantisation clearly means "of pitch", while for a computer producer it invariably means "of time")
    • Nov 05 2013 | 12:54 am
      The Quantized Random Voltages section of the Source of Uncertainty is now in BEAP (the N+1 and 2^n sections).
      It has a couple of tweaks on the original (the 266, not the 266e). There's variable time correlation; with 100%, it uses an analog shift register of n sections, so the values are globally random, but locally correlated. At 0%, each stage uses it's own random comparator. You can also choose whether the 2^n section is MSB or LSB, which is fun with time changing values of n.
      There's also a skew parameter which is CV adjustable. It basically adjusts the threshold for the comparators, but it works pretty well--I get the sense that may be what's going on in the Stored Random Voltages section...