Several Envelopes to [poly~]

Tiago Simas's icon

Hello, everyone.

I'm kind of new to Max/MSP, so there is probably a solution to this problem, which I am not finding right now.

I am creating a four-voiced polyphonic synth using [poly~]. Everything is totally straightforward to me about inputting note values into this object, but I would also like the voices to behave independently regarding their amplitude. That's where the problem starts: I'm trying to deliver each voice its specific envelope, but I am not finding a way of inputting the envelope list successfully into [poly~], in order to have each determinate envelope being played by the same voice executing its correspondent note.

Is there any way I can achieve this?

Thank you for your time!

Tiago Simas

Roman Thilenius's icon


if you dont use automatic voice allocation but the "target" message for the note events, the rest will quickly become clear, too.

Jean-Francois Charles's icon

If you use automatic voice allocation with the midinote message, two classic options come to mind:
a) include the ADSR values (or any other value) as part of your midinote message. The message could look like 'midinote 60 127 10. 40. 0.81 121.' Unpack in the poly~ voice (first two values would be note, velocity; four float values would be used as adsr in this example)
b) right after giving a midinote message in inlet 1, give a notemessage message in inlet 2 with the adsr values. See 'notemessage' tab of the poly~ help file.

Tiago Simas's icon

Thank you for your answer, Roman Thilenius!

I've had already thought of that as a possibility, but I think, anyway, it would be far more complex to deal with voice allocation manually, at least for this patch I'm working on.

Tiago Simas's icon

Thank you, Jean-Francois Charles!

Both of those options appear to me as totally viable.
Anyway, I tried to use the notemessage message in the second inlet and no data is being received in the subpatcher (I checked that by selecting the cords in the instance receiving the [note $1] message).
I want to have an envelope of five values, so I'm sending the message [notemessage 1$ 2$ 3$ 4$ 5$] thru the second inlet of [poly~], which is, of course, activated at the same time of [note $1]. Is there anything I am possibly doing wrong?

Also, because of its features, I want the envelope list to be processed by a [line~] object. I assume that's not a problem and does not imply any possible mistake of mine...

Thank you once again.