Sorry about my newbieness in Max/msp and my English.
I just want to get a bang when signal reaches zero or aproximately that.
I just want to count cycles.
Here is my patch.
----------begin_max5_patcher---------- 558.3ocyVssaiBCD8YpT+Grr1m1RivlaIUpOreGqpVY.mDuBLQAi1zVs8aeM CgjPaBwroP5KXowisOyYNyL75s2Xgix2vKvnGP+DYY8p1hEXqxhUiAKbFaSb Jq.bDK4+IO52X6s6o3aTf86dams44RkjkwA6+XsfktaKQBXTeC2OcmQYYlPl xUvCPO7VJDu.2BgNw4.uyKUMtSZLuhohWJjK90ZdrpNjnAg5igHdypVboS7s QTmINnmZNT8EoddEu9D3BwBoFtnm.G96s2TspWrMlelmlqQXO4hviyEj9wEz t3hvoUjP.7MD3kyPE5.gov1HbDSt3RXjSoX9deUL9CuhwyATLDuQTwveIgE+ 1wBX2yDvsCLmNBLhCEhHBTJ34278RRqkYQ708MGR+TxgcpzotPNbFoZYF8iR 8r7Ddqa4TIU6lpf8mUuCv0SbF2NDTuAuEgmS.vUTnGwL2wrGQToRkKOVfSnm IvMu510Ez8td6BsyFfCUuOwbz2lSPO9nVIgTK4RD7R8SSD7oHI5jwB.px0Ap kHTeCnrQe34vWYPlBZkZ4yWigmwOGmx6ayWxfO.kLE5gD5seLy+47y5ifSEx O7Gpv6Vsw6Hth7x0wM261ewDcvamvKTBISIzcZ16DssSKEIIbYq4oYhjU4Bo ZKN5JaZLzBMAZU3mL5Py2Tn8Ek07uJrFwTnM9rFsMgbhx.uqB1BLg1HWmZz2 SIGGbAWErYDzHWLzpLnW9GvlA435 -----------end_max5_patcher-----------
You can use the [round] object between your [float] and [if] objects (for example [round 0.1]) in order to round off the continuously changing float.
A signal is a continuous arrangement of data, so it will never be 0 for too long, and it will probably be 0 many times in one second.
It would be more helpful if you told us why you want to do this – what are you trying to do exactly? Are you trying to have a bang whenever a signal’s volume is zero? Or when there is no input signal? If you just want to count cycles, why are you messing with signals and not just the plain [cycle] object?
Rounding to 0.000001 accomplished this.
After I posted this, I thoung about rounding too. :p
I just wanted to use cycle~ because it automatically oscillates.
I am experimenting with groove~. And thought of using cycle~ to control the sample amount in the "Loop max" part of this to give that granular synthesis kind of sound. And thought of moving the "Loop min" of this every time cycle~ reaches 0 as with the way I showed in the patch I pasted in here (Multiplying by some value and then adding that in order that the lowest value is always 0.).