## on "bangs"

Jun 16, 2009 at 4:35pm

# on "bangs"

hey folks.
i have a bang that has a pulse of 16. is there a way to get the bang to hit on every second beat, for a total of 8 hits? i know this may be an easy question, but i have spent hours on it without a solution other than using a tempo object, and making complex wirings. is there a better solution?

#44394
Jun 16, 2009 at 4:39pm

You may use a counter and test if its value is even with a modulo operator and select.

_
johan

#159701
Jun 16, 2009 at 5:06pm

i am not on my computer, so i will try what you suggested tomorrow. thank you. Is this the best solution for the problem, or are there alternate methods?
think of it like “muting” the odd numbered bangs. an idea flashed of using matrixctrl, but i would have to try it out to see if it’s viable. any alternative solutions?

#159702
Jun 16, 2009 at 5:28pm

maybe can be useful.

#159703
Jun 17, 2009 at 8:27pm

unfortunetally, neither suggestion has worked for me.
any other suggestions?

#159704
Jun 17, 2009 at 8:56pm

found a solution. use select object, and type in numbers that you want banged. bingo!

#159705
Jun 17, 2009 at 10:32pm

for repeating patterns, like every 2, every 4, etc., the counter–>modulus–>select 0 is probably the best way, just use the fastest pulse in (like a “16th-note”) and this can divide it into longer notes (technically they’re still “short” but with silence after them, but that depends on what you do with them).

For non-repeating patterns, your select method is fine, though you could look into matrixctrl: each row has a pattern of cells you want banged, then with each pulse you do a getrow, then [zl nth] with the current count to grab the cell’s contents in succession. You could have multiple rows for multiple sequencers going at once, or choose which row to use on-the-fly. [preset] the whole matrixctrl for easy recall of complete sets. Lots more flexible than just [select] and it’s more fun too.

#159706
Jun 18, 2009 at 3:34am

thanks for the insight. what if i want to double up the bang?
ex.- i want it to bang 2x for every one bang.
would modulus work for this as well?

#159707
Jun 18, 2009 at 3:37am

is modulus a message?

#159708
Jun 18, 2009 at 6:03pm
 Quote: what if i want to double up the bang? ex.- i want it to bang 2x for every one bang. would modulus work for this as well?

try [bangbang] or [b 2] or [trigger b b]

 Quote: is modulus a message?

look at [%] object

#159709
Jun 18, 2009 at 7:24pm

bangbang would not work for me. I’m not exactly sure how i would use it in this situation.

#159710
Jun 18, 2009 at 7:38pm

the % (an object) would only allow you to stretch the tempo, not contract it. So if it’s % 1 –> sel 0, it will bang each time, if it’s % 2 –> sel 0, it bangs every other time, etc. Watch the number output to see what’s happening.

For doubling up you’d need to do something else, which implies a faster original metro/clock. (bangbang will send them right after each other rather than in tempo.) You can also look into [transport] which can be sent messages to change the rate and timing divisions of bangs, or have a set of divisors/multipliers for the rate of a main metro.

#159711
Jun 18, 2009 at 8:48pm

i found a solution for the problem, although i will look into your solution.
I wrote an expr object and split into two floating numbers (so it would count to 32 twice as fast) and used a pipe object to delay one of the floating numbers.
thanks for all of the input!

– Pasted Max Patch, click to expand. –
#159712
Jun 19, 2009 at 3:19am

what’s your main goal ? to output certain numbers periodically, or do you just need bangs in certain tempo divisions ?

Using pipe and expr seems a little bit inflexible to me, but there are lots of solutions.

You could use two tempo objects, one that provides the original number sequence (such as 0…15), and a second tempo which fires double as fast (0.5), with the same speed (1) or only every other beat (2). But as I said, not sure what you want to accomplish as your final goal….

– Pasted Max Patch, click to expand. –
#159713
Jun 19, 2009 at 5:58pm

at this point, it is too complicated for me articulate what i want to accomplish without writing an essay. my little expr and pipe trick seems to be working well for me, althoug i have not fully tested the results. i will keep the 2 tempo object stategy into consideration if my system fails. as always, all strategies are appreciated. thanks.,

#159714

You must be logged in to reply to this topic.