Onebang DOES NOT WORK!

EarHax's icon

Okay, well, it sort of works. But apparently, in order for it to work I need to hit the right outlet first, which sort of defeats the purpose of using it. If I set it up so the first bang hits the right and left of the onebang, then every time a bang comes through, the onebang will get reset and let every bang through. If I need to use some other logic to trip the right inlet every time I want to open it, how is that any different than just using a switch?

So, is there some equivalent to a onebang that is primed when it is loaded to just let the *first* bang through, and every other one gets stopped? using more than one loadbang in my project is already causing problems, so hopefully that isn't the only solution to this.

I guess I just don't see the point of having a onebang when I could just use a switch/gswitch to trip its own inlet and cut off traffic until the left inlet gets hit again. It's like a onebang with a single feedback loop, but just as much work as needing to trip the right inlet of the onebang before it will let anything through again.

So, is there a *firstbang* object that doesn't require the extra setup to reset it first so it will just allow one bang through?

EarHax's icon

Really hoping I can get an answer to this one. My last several posts are nothing but cricket farms at this point. :(

Christopher Dobrian's icon

Sorry, but I just have to ask: Did you look in the help file or the reference manual?
(Spoiler:)

Arguments

initialization [int]

OPTIONAL

A non-zero argument sets onebang to permit a bang to be sent out the left outlet the first time a bang is received in the left inlet.

Roman Thilenius's icon

thats not true, in the reference it is written in a much, much smaller font.

EarHax's icon

Damn it [facepalm]! Cursed insomnia. I don't know how I overlooked that when I reviewed the help patcher for it. I guess 2+ days without sleep takes a real toll on alertness and attention to detail. Thank you!

While I have your attention, if either of you knows how to monitor either/both of the _rect attributes for a bpatcher that has an abstraction loaded in it, please let me know. I can't seem to get pattr to bind to bpatcher abstractions, and am not sure how else I can get the position or size of them.

Thanks again!