Accessing .poll values

Hey,

how can I store .poll values in a variable?
I would like to create a squarewave out of an input sound.

sig = SoundIn.ar(0).poll;    ( = ~variable)
if(~variable > 1, {sig = 1}, {sig = -1})   

the variable needs to be audio rate as well…

Any suggestions?
Thank you! :slight_smile:

https://supercollider.github.io/tutorials/If-statements-in-a-SynthDef.html

hjh