sending timed bangs, times of which are based on a list of numbers

youcloudsofdoom's icon

Hi folks,

I have a patch which generates different lists of ascending numbers e.g. [3 16 28 30 35 58], and I'd like to use these lists as timer information for a series of bangs. Taking the above list as an example, I want to send a bang at 3 seconds, 16 seconds, 28 seconds and so on. Does anybody have a solution as to how this could be achieved?

Many thanks!

Jeremy's icon
Max Patch
Copy patch and select New From Clipboard in Max.

This would be one classic way of doing this:

broc's icon

Hi Jeremy,
I'm using a similar method to play midi notes from coll.
Just wondering if there is a limit to the number of messages that pipe can hold at the same time?

Jeremy's icon

Glancing quickly at the code, there's no obvious hard limit beyond available RAM.

jb

broc's icon

Nice, thank you!

leafcutter's icon
Max Patch
Copy patch and select New From Clipboard in Max.

If you want to go fast you can use something like this:
`

youcloudsofdoom's icon

Many thanks guys - both LCJ and Jeremy's approaches worked a treat (and hey John, keep up the good work out there will you?).

youcloudsofdoom's icon

I have an issue that's come up - when using Jeremy's solution and having duplicates of it running at once, they seem to go out of sync with each other very quickly - how can I get around this?

Wetterberg's icon

... by not using duplicates? Try send/receive pairs instead, so that they're actually getting the same clock.

For what it's worth I've been working with similar systems that were built without using delays to drive things, it makes it easier to sync things up, too.

youcloudsofdoom's icon

Yeah, the issue is that it's duplicates of the same patch but processing slightly different lists - one will be sent (1 3 5 7 9) and the other (2 4 6 8 10) for example. This should create even sets of bangs, but after the first number they start going well out of rhythm with each other. I've looked into global syncing, but I'm not sure how it can be done in this particular instance.

sfogar's icon

You could consider qlist.

Old school but still useful...

Wetterberg's icon

you can't have delays sync up, no. You should probably have asked for something that synced before, then ;)

But seriously, the issue at hand is probably the use of "bangs", since they're incredibly difficult to sync at all. A solid timing system will only convert to a bang at the very end where you trigger things.

youcloudsofdoom's icon

Yes, point taken - the duplicate aspect is actually for a different project I'm working on concurrently, hence the new questions. I'll persevere and experiment with some approaches that perhaps don't use bangs - thanks for the advice!