calling same abstracted patch multiple times with different parameters without duplicating it

ufk's icon

Hi! :)
working with max for live on max8.
I created a sub patch that delays a midi note and adds a pitch to it based on the parameters it was provided.
for now if I wanted the midi note to have 3 voices (donno if that's the right term for it) i would duplicate my abstracted patch 3 times and to each one provide different parameters and connect the outlets of the notein to inlets of my 3 patches and the outlets of my patches to the noteout.

what if I want 10 voices.. or 30...
is there a way to call the same sub-patch several times with different values?
if only by adding java/nodejs code this thing is can be implemented, that's good too!
I just need to know how to start... what exactly to look for..
any information regarding this issue would be greatly appreciated.

thank you :)

double_UG's icon

have a look at the poly~ object

11OLSEN's icon

poly~ is made for this dynamic voice allocation. but as you talk about abstractions, you can use the arguments of an abtraction to initialize it with unique parameters. inside the abstraction use #1,#2... to work with the values.

ufk's icon

I assume you mean poly and not poly~ since I work with midi notes.
still can't find a proper way to send several voices with different delay pitch and velocity based on the original sound that was sent with notein without using several pipes for each voice required.. since I want this to be dynamic.. still don't know what to do.

poly can send sounds on different channels but I can't set a delay in there for each sound..


Roman Thilenius's icon

what about an abstraction with 8 copies of [pipe] in it?

[pipe #1] [pipe #2] [pipe #3] [pipe #4] [pipe #5] [pipe #6] [pipe #7] [pipe #8]

11OLSEN's icon

poly~ is a way to have multiple instances of a patch in a container. you're not forced to use audio in it.

ufk's icon

Roman thanks your input. how can 8 copies of pipe will help me? I want to have a knob to control the number of voices.. up to 100 or even more.

11OLSEN, thanks.. i'll dig into poly~