How do you detect the polarity of a pulse?

Francois Weber's icon

Hi all,

I need to know the polarity of an impulse train, positive or negative. It would be convenient to have a value of 1 if it's positive, and 0 or -1 if the pulses are negative. What objects can be used to do this ?

Thank you in advance for your advice!

Source Audio's icon

>~ 0.5 and < -0.5 to edge or whatever

Francois Weber's icon

Nice, it's working

thx