Use sah~ to capture ("sample") and continually output ("hold") the value of an input signal whenever another "control" signal rises above a specified threshold value. The sampled value is "held" until the control signal drops below and then rises above the threshold value once more, at which point the input is sampled again. Generally this allows one signal to be synchronized to the behavior of another.
Initial trigger value
Common Box Attributes
Multichannel Group Attributes
In right inlet: The control signal. In order to cause a change in the output of sah~, the control signal must go from being at or below the trigger value to above the trigger value. When this transition occurs, the signal in the left inlet is sampled and becomes the new output signal value.
Multichannel Group Messages
When the control signal received in the right inlet goes from being at or below the trigger value to being above the trigger value, the output signal changes to the current value of the signal received in the left inlet. This signal value is sent out until the next time the trigger value is exceeded by the control signal.