genrate lists simultaneously

Luca Schwarz's icon

​i am having a problem figuring out how to work with lists on many objects simultaneously.

a short example. as seen in the patch i have created a random sequence, that generates a couple of 0 & 1s which serves as the list triggering events in this patch. Is it possible to, lets say, create another list by pressing the same bang which will modulate the volume for those triggers? Or am I thinking the wrong way? I tried saving different numbers for a * multplication in a coll (1, 0.8; 2, 0.2; 3, 0.2; .....). so i tried to achieve somethinhg similar to accents with this where every first trigger in a sequence is accented... but this wasnt really sucesfull as i had to edge detect the subdiv

Max Patch
Copy patch and select New From Clipboard in Max.

Roman Thilenius's icon

in this case you would just use a [t b b] before the 2 copies of [uzi], to control the order in which the two lists appear at their final destination.

(and if you are paranoid, you can also put a [del 0] after the graphic button)

Luca Schwarz's icon

yeah but how would you do this? is there like a multiplication object that accepts lists (for the volume modulation)? and if this would be the case: would the indexes of the two lists be linked to each other?

Luca Schwarz's icon

i mean i know that there are ways to send a list in an adsr object, to modulate the volume this way, but would it be possible to link the list that i used to drive the triggers of the subdiv with for genrating a dedicated adsr triggers?

Source Audio's icon

vexpr with scalarmode set can multiply lists, or do other maths

but I don't understand what should that 2nd list do ?

Luca Schwarz's icon

the second list should modulate the volume, whereas the first list should generate the triggers. does this even make sense to think of it this way?

Source Audio's icon

No it does not, because random list could have 12 zeros, followed by ...

how do you modulate that ?

with what rules ?

Luca Schwarz's icon

mh so how would you for example change the volume for each trigger on a stepped basis? would it be possible to do this also with a list, where you send a list with lets say 8 different values to an object and this object will than counts in its "internal memory" through those 8 different values (like subdiv when sending the prob message with appended values between 0 &1)?

Source Audio's icon

here is one option, generate 2 lists

first one with triggers, second one having random volumes for

trigger steps.

Output can be selectable, depending if you need zero volume for

non trigger steps, or maybe at the end if volumes are enough

to do triggering and volumes.

Max Patch
Copy patch and select New From Clipboard in Max.

P.S. I removed all phasor, transport, subdivs and the rest.

metro - counter is easier to show what I mean.

Luca Schwarz's icon

thx mate for your work, but i am just curious how this would work with my previous patch, because counting and recalling the different volumes from the coll will cause some timing issues. i guess the reason for this is thats this is not as fast as the MSP based triggers that come from the phasor / subdiv. right? thats why i was wondering if there might be an option to this without the need of counting through something like a coll, and i thought there might be an object that works kind of the same way as subdiv.

Source Audio's icon

you can store your numbers into whatever you want.

Recalling stuff from coll should make no timing problems.

I don't see any creation or storage of that 2nd list in your patch ?

where would you want to store/recall it to?

live.step ? would that be more efficient than coll ?

You can even plaster that list into audio buffer and read that 16 samples

using peek~

Luca Schwarz's icon

hi mate! i am a beginner so dont blame me for this but yeah this is what i come up with when trying to combine it, and it is very clicky:

Max Patch
Copy patch and select New From Clipboard in Max.

the thing with the buffer is something i will try out for sure. idk i am kind of confused with getting to know wheather i should try to avoid controle rate in timing releavant situations with patches or not. of course this would all be much more easier to realise without working with MSP signals, but as a beginner i just thought it might be a good idea to try to do all this with MSP.

Source Audio's icon

if you want to go that way, you must smooth coll output instead of hard switching

but I don't see where you reset 4 values to have some kind

of relation to triggers.

ShelLuser's icon

Just my 2 (intoxicated) cents here: why coll vs. dict?

Dict allows you to cold collect and trigger output when you need it.

Luca Schwarz's icon

source audio, thx! i think it works how i wanted it to work!

Max Patch
Copy patch and select New From Clipboard in Max.

any feedback on this? is there a more elegant solution to this? or would you consider this as a good way of working?

shelluser: which kind of advantage would you see in this kind of situation with cold collecting the data? incredibly thakful for any hints :)

Source Audio's icon

It is sometimes difficult to find right answer

because it might be only concerning specific object that you use,

even that in the goal of the project one could do all much better using other ones.

main issue I see is - you are not having any relation between random list with triggers,

and list with volumes.

and using next message is also not clear,

because it rotates coll indexes without any relation to steps.

could you maybe explain how you see that ?

MakePatchesNotWar's icon

Here's an audiorate solution. I replaced rampsmooth for slide btw.

Max Patch
Copy patch and select New From Clipboard in Max.

Luca Schwarz's icon

thank you MakePatchesNotWar! super nice to see this and how this could be realized :) sourceaudio yes you are right, but i guess for accents this would be the way how i would want it to work, so that for example every first trigger in a sequence is accented, no matter if there will be a trigger on this step or not (so i would not populate that coll randomly in this case, but rather have static values in there for each accent). but yes your question is legit in general, i mean your idea with zl compare is super intersting, thanks for making things a bit clearer to me.

Source Audio's icon

if very first trigger in the list should be accented

you need to link it with value in the volumes list.

that is easy.

In addition last max versions allow range attribute for random values,

so that you can avoid value 0. which would mute the trigger.

here is example for setting random volumes into buffer or coll

whatever you prefer

Max Patch
Copy patch and select New From Clipboard in Max.