Schmitt trigger module
  • I'm trying to adapt AC coupled inputs into something that I can use for reliable and versatile triggers, and a schmitt trigger seems like the right concept to adapt. My first approach did not use cascaded expressions, and I'm thinking that might be the right approach, but I'm sure somebody else has thought about this more than me. Does anybody else have recommendations for adding hysteresis to an input? In addition to versatility, I'm also interested in low-processing hit, since I'm essentially trying to take a 44.1khz input and turning it into something that would just be 1 and 0 after the module. I would hope to minimize the number of sample rate frequency calculations. Is there any way to consciously optimize for that in Audulus or is that premature optimization?

    yOh, I think I've got it. Well, I'm close. Basically I'm too tired tonight to connect the dots all the w, but my thought is:

    A - expression that evaluates (is signal greater than 0.5)
    B - expression that evaluates (is signal less than -0.5)

    A B
    1 0
    0 0
    0 1

    Now, how best to take those two states and turn them into a single output?

    I guess my useful states are:
    10 - Pos state
    01 - Neg state

    My binary logic is rusty enough that I'm forgetting if there is a simple operation that would ignore the 00 state.

    Oh, I could add another state, C - (is value greater than zero)
    so now I would have:

    A B C
    1 0 1
    0 0 x
    0 1 0

    So the and of A and C == Pos State
    and the or of AB with the and of the inverse of C == Neg state.

    I think.

    Okay, heading to sleep, but I'll look at this again tomorrow with a clearer mind, but I won't be able to look at it until after work. Would welcome any suggestions, arguments, disagreements, or insights in the meantime!

  • This is a clock going out of Audulus into ES-8 output 8, looped back to input 4, and through an "A is greater than 0.5" expression.


    Tracks nicely - there's a little delay from the round trip latency that you can see in the phase differential, but otherwise works perfectly.

    But the ES-8 has DC-coupled outputs and inputs - here's what it looks like when I go out of ES-8 output 8, into my Apollo, back out of the Apollo monitor output, and back into input 4 and into Audulus (I didn't have a proper adapter/long enough cable so I had to hold these two together).


    I can't tell if it's a graphical glitch or if that rise as it's coming back in is really triggering a bunch before settling at high, but if it was, the solution is easy - use the Gate Smear module. This will debounce transitions, keeping a signal high as long as the depth control is set to. Just adjust the depth control until the gates match close enough.
    979 x 734 - 223K
    Gate Smear.audulus
    960 x 540 - 153K
  • Thanks Mark, I think this would work excellently until you get below the frequency where the DC blocking on the input gets in the way. But, the cool thing is, you get a nice positive or negative derivative on the input event from an LFO squarewave. I think I'm going to try it tonight with that logic approach I was ruminating on last night. If it works I'll post some screenshots and the patch.

    How do you get inline images like that, do you just drag and drop them into the post?
  • I've got something that seems to be working well, I'll clean it up on my flight tomorrow, and will upload soon.

    Screen Shot 2017-05-04 at 12.41.10 AM.png
    2370 x 1648 - 310K
    Screen Shot 2017-05-04 at 12.45.02 AM.png
    3250 x 1632 - 398K
  • I'm realizing now that because I decided to add the feedback node, I can get rid of my third bit of knowledge and can simplify this to just three conditionals, I think.

    The basic truth table of the final module should be:
    if A: 1
    if B: -1
    else: last value
  • Well that looks super handy :)
  • Man, Audulus is super awesome for airplanes! I can't remember a flight in a while where I've felt this engaged and productive :) I had to buy wireless access to be able to check the online docs for a few things, so I figure I might as well see if I can upload my results from the air as well.

    I'm pretty pleased with these, although I don't have a good feel for whether I could have achieved improved efficiencies with different methods. I also noticed that with one of my test signals, the Feedback Delay node wasn't sufficient and I had to use the Unit Delay. I think I mostly understand why that is, but I wonder if there's a way to get the Feedback Delay to do the job.

    My first ideas were overly complicated because I was afraid of trying to figure out how to use feedback in the patch. But once I broke the feedback seal, things got a lot simpler.

    Let me know if anybody has any questions or suggestions, and feel free to use and modify this however you want.

    Oh, I broke out the top and bottom thresholds, even though it adds complexity for the user, I noticed some of my ac coupled clock signals had uneven up/down spikes, so I figured being able to dial in a setting for a particular signal could be useful. Plus you can kind of modulate it and 'break' the schmitt trigger, which could be cool in the right circumstance.

    I'm still trying to figure out how to embed images in a post nicely, I would also welcome any pointers on that :)
    2980 x 1588 - 508K
    3136 x 1592 - 484K
  • I came to much the same conclusion about audulus and air travel last month. I have gotta say there was rarely a wasted moment.

    BTW, those are some fantastically internally well labeled modules.
  • Thanks Robert, I appreciate that!
  • Updated versions of my Schmitt trigger, with and without built-in display, and now knobs for the low/high hysteresis threshold.
    Screen Shot 2017-05-12 at 6.38.52 PM.png
    1924 x 1132 - 197K