Forums > MaxMSP

poly~ not turning of all instances.

May 7, 2007 | 3:32 pm

Hi,

I’ve got a simple FM synth that is contained within a poly~ object for polyphony. The problem is that one of the instances does not turn off as it is supposed to an continues to sound. I have tried sending a "target -1" message to the poly, as the help file says this turns everything within the poly~ object off, though this does not seem to work.

I only ever encounter this problem when using poly~ on a macintosh. Normally I use XP and it never does this. I have managed to overcome this problem once in the past, though I cannot remember how it was finally fixed.

Has anyone got any idea?

Thanks in advance!


May 7, 2007 | 4:18 pm

On 7 mai 07, at 17:32, Stuart Penman wrote:

> I’ve got a simple FM synth that is contained within a poly~ object
> for polyphony. The problem is that one of the instances does not
> turn off as it is supposed to an continues to sound. I have tried
> sending a "target -1" message to the poly, as the help file says
> this turns everything within the poly~ object off, though this does
> not seem to work.

If you could send a part of the patch that demonstrates the behavior,
it would help us to help you ;-) How do you manage the polyphony? do
you use the note/midinote messages, what about the busy state? Do you
use adsr~? …

Cheers,
ej


May 7, 2007 | 5:39 pm

Hi,

Sorry, that last post was a bit vague. I have included my FM synth that I am trying to use within a poly~. I have been sending ‘note’ messages to the poly~ from the main patch containing frequency, amplitude, duration information, etc.

The FM synth uses the ‘adsr~’ and ‘thispoly~’ objects, but i think it may be one of them that is causing the problem…which is a note that will not turn off until the poly~ object is re-initialised.

Here is the FM synth:

max v2;
#N vpatcher 198 108 1193 736;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N out~ 2;
#P newobj 216 531 33 9109513 out~ 2;
#N out~ 1;
#P newobj 136 531 33 9109513 out~ 1;
#P newex 136 487 27 9109513 *~;
#P newex 216 496 27 9109513 *~;
#P newex 216 433 42 9109513 *~ 0.999;
#P newex 216 460 34 9109513 cycle~;
#P newex 136 441 34 9109513 cycle~;
#P newex 136 396 34 9109513 +~ 100;
#P newex 136 370 33 9109513 *~ 0.;
#P newex 136 339 53 9109513 cycle~ 100;
#P newex 410 331 33 9109513 *~ 0.;
#P newex 410 251 27 9109513 *~;
#P flonum 136 307 60 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 136 282 91 9109513 * 0.;
#P flonum 217 213 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 136 255 27 9109513 float;
#P flonum 99 220 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 677 267 15 0;
#P newex 643 242 44 9109513 thispoly~;
#P comment 280 181 28 9109513 dur;
#P message 263 179 14 9109513 0;
#P newex 263 158 34 9109513 delay;
#P newex 569 212 121 9109513 adsr~ 10. 0. 1. 10.;
#P flonum 99 139 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 181 139 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 263 139 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 345 139 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 427 139 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 509 139 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 591 139 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 673 139 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 755 139 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 837 139 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 836 125 36 9109513 detune;
#P comment 754 125 38 9109513 release;
#P comment 509 125 34 9109513 attack;
#P comment 429 125 30 9109513 index;
#P comment 338 125 49 9109513 harm ratio;
#P newex 99 101 751 9109513 unpack f f f f f f f f f f;
#P comment 671 124 37 9109513 sustain;
#P comment 591 125 31 9109513 decay;
#P comment 260 125 43 9109513 duration;
#P comment 177 125 49 9109513 amplitude;
#P comment 92 125 50 9109513 frequency;
#N in 1;
#P newobj 99 65 23 9109513 in 1;
#P window linecount 2;
#P comment 694 261 100 9109513 Mute ‘On/Off’ for this poly~ instance;
#P window linecount 1;
#P comment 193 341 100 9109513 modulator;
#P connect 2 0 8 0;
#P hidden connect 8 0 23 0;
#P connect 23 0 30 0;
#P fasten 30 0 31 0 104 246 141 246;
#P connect 31 0 33 0;
#P connect 33 0 34 0;
#P connect 34 0 37 0;
#P connect 37 0 38 0;
#P connect 38 0 39 0;
#P connect 39 0 40 0;
#P connect 40 0 44 0;
#P connect 44 0 45 0;
#P fasten 24 0 44 1 574 482 158 482;
#P fasten 36 0 38 1 415 364 164 364;
#P fasten 30 0 39 1 104 393 165 393;
#P hidden connect 8 1 22 0;
#P fasten 39 0 42 0 141 428 221 428;
#P connect 42 0 41 0;
#P connect 41 0 43 0;
#P connect 43 0 46 0;
#P fasten 20 0 32 0 350 209 222 209;
#P connect 32 0 33 1;
#P fasten 24 0 43 1 574 488 238 488;
#P fasten 14 0 42 1 842 429 253 429;
#P hidden connect 8 2 21 0;
#P connect 21 0 25 0;
#P connect 25 0 26 0;
#P hidden connect 8 3 20 0;
#P fasten 24 0 35 0 574 241 415 241;
#P connect 35 0 36 0;
#P hidden connect 8 4 19 0;
#P connect 19 0 35 1;
#P fasten 34 0 36 1 141 325 438 325;
#P hidden connect 8 5 18 0;
#P fasten 22 0 24 0 186 200 574 200;
#P fasten 26 0 24 0 268 200 574 200;
#P hidden connect 8 6 17 0;
#P connect 18 0 24 1;
#P connect 17 0 24 2;
#P connect 24 2 28 0;
#P fasten 24 0 28 0 574 236 648 236;
#P connect 16 0 24 3;
#P hidden connect 8 7 16 0;
#P connect 15 0 24 4;
#P connect 28 1 29 0;
#P hidden connect 8 8 15 0;
#P hidden connect 8 9 14 0;
#P pop;

I tried making 50 instances of the patch in poly~, just incase it was reaching its max, but this didnt help. Currently the poly~ is set to have 25 instances of the FM patch.


May 8, 2007 | 1:35 pm

See the tutorial for examples of the mode message to thispoly to enable and
disable. BTW, I have taken to loadbang the disable because some of my polys
seem to start enabled causing huge spikes in CPU when nothing is supposed to
be happening.

On 5/7/07 1:39 PM, "Stuart Penman" wrote:

> max v2;
> #N vpatcher 198 108 1193 736;
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #N out~ 2;
> #P newobj 216 531 33 9109513 out~ 2;
> #N out~ 1;
> #P newobj 136 531 33 9109513 out~ 1;
> #P newex 136 487 27 9109513 *~;
> #P newex 216 496 27 9109513 *~;
> #P newex 216 433 42 9109513 *~ 0.999;
> #P newex 216 460 34 9109513 cycle~;
> #P newex 136 441 34 9109513 cycle~;
> #P newex 136 396 34 9109513 +~ 100;
> #P newex 136 370 33 9109513 *~ 0.;
> #P newex 136 339 53 9109513 cycle~ 100;
> #P newex 410 331 33 9109513 *~ 0.;
> #P newex 410 251 27 9109513 *~;
> #P flonum 136 307 60 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 136 282 91 9109513 * 0.;
> #P flonum 217 213 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 136 255 27 9109513 float;
> #P flonum 99 220 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P toggle 677 267 15 0;
> #P newex 643 242 44 9109513 thispoly~;
> #P comment 280 181 28 9109513 dur;
> #P message 263 179 14 9109513 0;
> #P newex 263 158 34 9109513 delay;
> #P newex 569 212 121 9109513 adsr~ 10. 0. 1. 10.;
> #P flonum 99 139 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 181 139 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 263 139 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 345 139 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 427 139 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 509 139 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 591 139 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 673 139 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 755 139 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 837 139 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P comment 836 125 36 9109513 detune;
> #P comment 754 125 38 9109513 release;
> #P comment 509 125 34 9109513 attack;
> #P comment 429 125 30 9109513 index;
> #P comment 338 125 49 9109513 harm ratio;
> #P newex 99 101 751 9109513 unpack f f f f f f f f f f;
> #P comment 671 124 37 9109513 sustain;
> #P comment 591 125 31 9109513 decay;
> #P comment 260 125 43 9109513 duration;
> #P comment 177 125 49 9109513 amplitude;
> #P comment 92 125 50 9109513 frequency;
> #N in 1;
> #P newobj 99 65 23 9109513 in 1;
> #P window linecount 2;
> #P comment 694 261 100 9109513 Mute ‘On/Off’ for this poly~ instance;
> #P window linecount 1;
> #P comment 193 341 100 9109513 modulator;
> #P connect 2 0 8 0;
> #P hidden connect 8 0 23 0;
> #P connect 23 0 30 0;
> #P fasten 30 0 31 0 104 246 141 246;
> #P connect 31 0 33 0;
> #P connect 33 0 34 0;
> #P connect 34 0 37 0;
> #P connect 37 0 38 0;
> #P connect 38 0 39 0;
> #P connect 39 0 40 0;
> #P connect 40 0 44 0;
> #P connect 44 0 45 0;
> #P fasten 24 0 44 1 574 482 158 482;
> #P fasten 36 0 38 1 415 364 164 364;
> #P fasten 30 0 39 1 104 393 165 393;
> #P hidden connect 8 1 22 0;
> #P fasten 39 0 42 0 141 428 221 428;
> #P connect 42 0 41 0;
> #P connect 41 0 43 0;
> #P connect 43 0 46 0;
> #P fasten 20 0 32 0 350 209 222 209;
> #P connect 32 0 33 1;
> #P fasten 24 0 43 1 574 488 238 488;
> #P fasten 14 0 42 1 842 429 253 429;
> #P hidden connect 8 2 21 0;
> #P connect 21 0 25 0;
> #P connect 25 0 26 0;
> #P hidden connect 8 3 20 0;
> #P fasten 24 0 35 0 574 241 415 241;
> #P connect 35 0 36 0;
> #P hidden connect 8 4 19 0;
> #P connect 19 0 35 1;
> #P fasten 34 0 36 1 141 325 438 325;
> #P hidden connect 8 5 18 0;
> #P fasten 22 0 24 0 186 200 574 200;
> #P fasten 26 0 24 0 268 200 574 200;
> #P hidden connect 8 6 17 0;
> #P connect 18 0 24 1;
> #P connect 17 0 24 2;
> #P connect 24 2 28 0;
> #P fasten 24 0 28 0 574 236 648 236;
> #P connect 16 0 24 3;
> #P hidden connect 8 7 16 0;
> #P connect 15 0 24 4;
> #P connect 28 1 29 0;
> #P hidden connect 8 8 15 0;
> #P hidden connect 8 9 14 0;
> #P pop;

Cheers
Gary Lee Nelson
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson


Viewing 4 posts - 1 through 4 (of 4 total)