CMOS logic
  • I would like to see Audulus support a new class of operators - bitwise logic operators along the lines of the "lunetta" devices to be found on the forum of that name on electro-music.com which repurpose CMOS logic chips to process an audio channel that is single bit binary in amplitude but analogue time-wise.

    I know that this can be achieved with the existing maths operators, but it occurs to me that a set of operators that do true bit-wise operations could process say 8 bit-channels concurrently with no performance hit. And with 4 poly-channels on an iPad that would multiply up to 32 blindingly fast channels. (I suggest 8 bit-channels to keep the necessary convert-to-bit-stream and convert-from-bit-stream nodes to a manageable size.)

    The minimal set of new nodes required would be three: convert-to-bit-stream, convert-from-bit-stream and one of the universal operators, say NAND.

    In the meantime I plan to start constructing a set of single bit-stream logic sub-patches, starting with NAND and building up towards heady stuff like PLLs (phase-locked loops).
  • Hey Gordon, that's quite fascinating. Do these devices use feedback loops or some sort of memory?

    cheers
    - Taylor
  • Funny you should ask - I've just built an SR Latch (aka flip-flop) which uses feedback loops to make a basic memory element.

    I have attached the patches I have made so far. The file includes a couple of test harnesses. The upper one illustrates the use of the Latch as a two-button on/off switch.

    The lower harness illustrates the use of an XOR gate as a sort of ring-mod-esque effect, as well as a slight glitch I have encountered. Reset it by hitting the sync button to bring the two oscillators together. Those momentary spikes in the output should not be present. They are glitches. If you leave it running for a while you will see the glitches get larger as time passes and the oscillators get more out of sync. If you replace the XOR with a single NAND the glitch disappears (but may reappear if left to run long enough - I haven't tried that yet.) Hook up the constants for audio frequencies.

    I know that at least part of the problem is because of my crude implementation of a NAND gate (typically these things are clocked to avoid anomalies during transitional states - square waves cannot jump from 0 to 1 instantaneously in the real world but in the world of lunettas CMOS logic is free-running so that the audio signal can be fed into the clock pin of a chip.) Turning NAND into a primitive would largely overcome this by making these glitches short enough to filter out, or by tying it to the system clock somehow. I'm a bit fuzzy on details. Sorry.

    I'm not terribly bothered, because lunettas and glitches go hand-in-hand, but the purist in me would like to see it de-glitched nonetheless.

    Gordon
    logic.audulus
    1M
  • Screen shot 2013-02-11 at 18.41.13.png
    851 x 206 - 43K
    Screen shot 2013-02-11 at 18.48.29.png
    951 x 252 - 58K
    afta8.LogicGates.audulus
    225K
    afta8.Sample_Rate_Redux.audulus
    35K
  • Thank you, @afta8 :-) Those will be useful. Stage 2 of development will be to optimise the patches. But first I'll get it all working using NANDs so that I can just copy them from circuit diagrams on the 'net. That way I can drop optimised patches into larger patches that I know work for testing.

    Yup, lunettas are a load of fun. I made a couple and started prototyping a third - one to multiply and divide frequencies by small integer values to pitch shift square waves by "Perfect" intervals - before I realised that I really wasn't enjoying working in hardware. So I'm porting it over to Audulus, to see if it will work on this platform.

    My favourite lunetta device is very simple. The Cacophonator is six independent oscillators constructed from inverters (NOTs) feeding back into themselves via a capacitor to provide a delay and a potentiometer to vary the length off the delay. The clever bit is the "power starve" potentiometer that restricts the output from the battery so that all six oscillators are competing for a scarce resource and start glitching like mad. I have no idea how to emulate power starving in Audulus. {shrug}

    (The final pot is a volume control, and the off switch has a massive capacitor in parallel to it so that the device runs down rather than stopping dead. You'll hear that at the end of the clip.)

    Warning - LOUD!


  • Coooool :) Where do you get circuit diagrams for these from? Sounds like a fun thing to try! How would you simulate a capacitor?

    I was wondering, do you have any thoughts on how you could make a delay unit? I was trying to build a bucket brigade delay but got stuck.
  • I don't think these circuits would apply to a BBD that rather relies on the analog properties of transistors, rather than their digital use as switches. To make a square wave oscillator, I'd use a delay with 100% wet mix and zero feedback. To turn square waves into something with a slope on the rising and falling edges, I'd use a low pass filter - in analog effects a low pass basically is a capacitor.

    There are hundreds of introductions to digital logic on the web. Wikipedia is pretty good. Try keywords like NAND logic, CMOS logic, Flip-flop.