Sending multiple bangs over a duration to trigger random notes in a scale
Hello you lovely beings,
So I'm doing a project that takes data from COVID numbers and representing them sonically/visually.
Right now I'm just trying to get the sonic part right. I'm using a coll to output the numbers per calendar day, and sending bangs to trigger cycle~ that hit specific frequencies (the scale of A major).
Ideally, I'd like the some sort of drunk style scaling across a set duration, (so if on one day there were 72 infections in a province, there would be 72 bangs which would then be sent simultaneously *and/or* sequentially to a polysynth).
However, it seems I'm only able to get a bang for each time the metro that is triggering my coll object bangs - not for the outputted number from the coll.
What would be the best way to go about doing this? Attached is my current patch.
Any insight would be much appreciated!
coll is empty, one can't see what is stored but
let's take that coll output is a single number and
you want that number to create as many bangs.
if you want them as fast as possible uze uzi.
don't use float for that, uzi needs integer input.
If you store that numbers as floats, insert int at coll output
or better store it as integer into coll.

If you need slower bangs, qmetro and counter would be a good choice.
Thanks for your reply!
So it seems like qmetro and counter don't transmit the coll data contents - only the bang from the metro.
Is there an object that stores the number from the coll contents, and then releases the contents as a bang?
So here's the coll data a .txt file. I'm still not sure how to embed data so that it remains in coll after I close the patch, sorry (it also needs to be validated first)!
So for example, the first line in the .txt file is 29. Therefore, I want 29 bangs released sequentially - not all at once rapid fire like the uzi does, but over a period of time.
Is there an attribture to qmetro or counter that allows me to do this, or another object that can do this? Ideally, it would be more aleatoric than just a constant interval, but at this point I'm willing to work with the easiest solution (which I'm assuming is a set interval release).
So yeah, tl;dr how to store an integer and release as many bangs at a set interval?
qmetro will trigger whatever you like, but it may be a bit late with it. :)
for a list of numbers only, which you want to call by index, [zl nth] is your alternative lookup table.
Well ok,
I used a brute force method and made a subpatch with 71 bangs (the highest number from my coll dataset). Each bang has a delay which randomly releases the bang command before a time limit.
This is SUPER CLUNKY and while it gets close to doing what I want it A) causes audio clipping and B) doesn't technically do polyphony since many notes get cut-off while the next bang overrides (causing a kind of burbly effect which is kiiinda cool but not what I want y'know?).
I have another dataset (not included in the pasted patch because I'm still waiting on a response from the BC Health Department to release COVID data from 2020 (they only have released since 2021)... who knew it'd be so hard to get public information *we should all have access to*. <--- this is why I've duplicated the same routing. You'll notice the duplicate is in the key of C#minor.
Perhaps this will give a closer idea of what I'm trying to accomplish, since I might not be explaining this so clearly, or at least FFT for anyone scouring the forums with a similar problem.
here is one example using qmetro, counter, coll with midi notes
and midi output, with randomised timer between notes.
if you want to use cycle~ or similar sound generator
in max and poly~ , just feed the notes into poly~ object
instead of midi output.
you can add as many colls with different keys and as many poly~
objects as you need.
----------
updated with velocity a bit randomised,
it sounds terrible otherwise :
this is simplified construction of what I understood you wanted to do from
looking at your last patch.
you could also try to use beat related random timer to have
notes tempo related, not simply 100 - nn ms long.
like switching between 8th, 16th, 1/4 or tuplets, tripplets, whatever
values in set tempo.
Ack, attempted to edit post and ended up deleting it.
Thanks Source Audio for this patch. This is excellent!
I've adjusted the settings so that it's more or less what I was hoping to achieve (yay!).
Still trying to figure out why my polysynth causes a "doubling" effect for the note outputs. Something to do with the 'prepend note' object I think, (but without it there's audio clipping).
Beauty!
You have to post poly subpatch, otherwise one can't see what is inside.
Double notes are because kslider sends note number on both note on and note off message,
that produces double notes.
you need to use midinote message which includes note on and note off
if you want to keep note lengths created by makenote object.

that will work ok if poly subpatch has adsr~ inside,
thispoly~ and all the rest that is needed to make it work properly.
you should activate voice stealing too.
read poly~ reference
-------
You changed min max values of number that sets qmetro timer and note duration
to min 600 and max 3000, but left random 500 and + 100 as is.
that produces random values between 100 and 600, but as number is set to min 600
there is NO random values at all, only 600 ms fixed.
I will post new patch as soon as I get some free time with poly example.
P.S.
more things to fix :
- if you create note list shorter than original A major - 23 notes,
then you need to update urn to reflect number of notes, otherwise it would create "empty" notes.
- to fix my mistake one needs to add bang to clear message to reset urn,
otherwise it would miss one note when reseted

Hey Source Audio,
Apologies for the delay, had to take a break from this project while attending to other life matters.
This is perfect, thank you! I'm currently working on implementing a small animation that will be triggered by each bang from this audio patch, and then my project will be complete!