Schmitt trigger

Leafcutter John's icon

Hello i'm trying to implement a Schmitt trigger (http://en.wikipedia.org/wiki/Schmitt_trigger) in the signal domain. It's quite easy to make with non signal objects but i'd like some help doing it with signals.

I know that the Schmitt trigger is implemented in the 2threshattack~ object but i'd like to know how to construct it with standard objects.

Thanks,

John.

Sebastian Lexer's icon

Hi John

To gate the amplitude envelop, I'd say a peakamp based solution works nicely, but that obviously is making this solution max based as well, so maybe it's not quite what your after.

Max Patch
Copy patch and select New From Clipboard in Max.

Peter McCulloch's icon

Hi John,

thresh~ will fit the bill, and comes with Max.

Peter McCulloch

Leafcutter John's icon

Thanks Peter,

I've been trying to brush up on my signal domain chops and had managed to completely overlook the thresh~ object.

Hi Sebastian,

Thanks for that but not really what i was after, hope things are good for you.

John.

Peter McCulloch's icon

Also, thresh~ can be pretty interesting for gated amp env. effects
when paired with slide~ or rampsmooth~.

Peter McCulloch

volker böhm's icon

On 11 Dec 2007, at 04:56, Leafcutter John wrote:

>
> Thanks Peter,
>
> I've been trying to brush up on my signal domain chops and had
> managed to completely overlook the thresh~ object.

hi john,

here is yet another solution using only standard objects.
i did this years ago for a project, before thresh~ came to live.
it's simplicity doesn't reflect the time it took me to come up with
this solution...

-volker.

Max Patch
Copy patch and select New From Clipboard in Max.

Leafcutter John's icon

That's a lovely elegant bit of patching volker and it's just the kind of thing i was hoping to see so thanks for sharing it.

There is a slight issue with it however. If the input changes abruptly from below to above the trigger say from 0-1 (as the output from phasor~ connected to >=~ object might) your abstraction will not trigger. I played about with introducing a one vector delay between the different sides of the signal input to the >=~ and =~ side to go from 0-1 and conversely having a delay in the

Best to all,

John.

ehdyn's icon

A co-worker inquired as to the meaning of serendipity this morning.

I come in here looking for info on Forester2, without finding it.
Then I clicked this post out of curiosity, and the CutterJohn hiself is behind the curtain.

Very glad to see it's being worked on.

volker böhm's icon

>
> There is a slight issue with it however. If the input changes
> abruptly from below to above the trigger say from 0-1 (as the
> output from phasor~ connected to >=~ object might) your abstraction
> will not trigger.

ah ja. you're right. [sah~] doesn't get retriggered.
originally this was intended for envelope-signals, i.e. heavily
lowpassed signals without sharp edges.
thats probably why the flaw never occred to me.
havn't used it since [thresh~] came along anyway.
so we might better let it rest in peace...
volker.

fabio's icon

Did you ever try to use Schmitt trigger (2threshattack~) and/or bonk~ in an envelope follower. Wouldn't they help in detecting noteOff in the case of reverberant sounds?
thanks,
Fabio