Clip object/separating positive and negative pulses from signal


#1

hi there,

i'm trying to separate positive and negative pulses from a signal and use them to trigger and reset an accumulator. see attached screenshot. how would i do that?

i searched for a clip object that would allow me to cut all the signal above or below a certain threshold, since i could then multiply the negative values by -1 and get separate pulse for rising and falling edge of the square.

or is there an "if signal == 1 then output 1sample" object? :slight_smile:
thanks for any help!


#2

Why don't you just split the output into two signals, invert one of the signals, that way when one signal is falling, the other is rising. You will always have a rising edge.
Is this what you are taking about, or is there a different kind of pulse you are looking for.


#3

sure, obvious. thanks! (i am still in the analog domain where i have to protect the inputs from negative voltage sometimes hehe)

but, this brings me to my next question. i would expect the accumulator to behave like a sawtooth wave when triggered and reset, since it accumulates a value, right? the i inlet should therefore set the speed at which the sawtooth rises. but all it seems to do is set the gain of the output. is this intentional or a bug? i realize that it will clip at a certain level, but it always looks more like a square regardless of the value of i.


#4

answering myself here... wrong expectation.

the signal only rises, when the trigger is above 0, and will stay the same otherwise...i will now change the object source to accomodate for my needs :slight_smile: