A newer version of Max is available. Click here to access the latest version of the Max documentation

gatetotrig Reference

A gate to trigger operator.

gatetotrig

Examples

Arguments

val [number]

Optional

A bipolar input value or signal transitioning across zero can be used to trigger a single sample impulse. The @edge option sets the direction. Optionally, the initial value can be set as the argument.

Inlets

val [number]

A bipolar input value or signal transitioning across zero can be used to trigger a single sample impulse. The @edge option sets the direction. Optionally, the initial value can be set as the argument.

Outlets

trig [number]

Outputs a 1.0 as a float value only when a transition is detected, otherwise outputs a zero. By default, only triggers on a positive transition.

Fixed Attributes

These attributes must be set in the object box and determine the behavior of the object at runtime.

edge [enum] (default: pos)

The @edge attribute sets the trigger transition direction.

  • 0 = positive (default)
  • 1 = negative

Note: a negative edge trigger will be 1 sample late

Possible values:

0 = 'pos'
1 = 'neg'

hot [bool] (default: false)

Trigger computation on all inlets.

Dynamic Attributes

These attributes can be modified in the code during execution using the set object

reset [bang] (default: 0)

Banging this attribute will reset the object to its default state.

val [number]

A bipolar input value or signal transitioning across zero can be used to trigger a single sample impulse. The @edge option sets the direction. Optionally, the initial value can be set as the argument.

See Also

Name Description
delta~ The discrete derivative of the input
edge~ detect logical signal transitions
>=~ Is greater than or equal to, comparison of two signals