Forums > MaxMSP

polyphonic synth – debugging

November 3, 2009 | 8:46 am

Hi there, I was wondering if I could get some help with debugging a patch of mine?

I’ve had this little polyphonic fm synth running for a while now. I have the modulation index controlled by an function envelope – which is also treated polyphonically. What I can’t figure out, is why the last value of my envelope is triggered directly before the envelope itself. This only seems to occur after I have run through each instance of the poly~ patch once.. ie all 16 instances have been used. I thought it might have had something to do with snapshot re-triggering the final value continuously, however adding the change object hasn’t fixed this.

I realise my little synth could be put together much more eloquently, however any ideas or suggestions on how to debug this particular problem would be greatly appreciated.

Thank you in advance everyone!

Ben


November 4, 2009 | 2:12 pm

Hi all – I think my biggest problem in this must be the use of function from outside of the poly~ object. I would like to be able to control the instances of my poly~ subpatch polyphonically using the function object, but as you can see in my patch – all I could think of was to convert the line output of the function into control messages via snapshot – like I mentioned, not very eloquent! Does anybody have any idea how I would be able to do this another way? I was trying to avoid routing the line output directly into the poly~ object as I know that signals are passed to all instances of the subpatch.

Cheers for the help,

Ben


November 4, 2009 | 3:19 pm

hi ben

you can put the line~ object inside the poly~ and use the function outside of it. this means that you have to convert the text of the function message correctly so that line~ can understand it, you also need to send the message to the correct line~ object.

you can do this by using thispoly~ to get the instance number, and then use this to set the name of a receive object (env3 in the example) with the 3 being added with sprintf

also worth noting is that you need to use the fromsymbol object inside your poly~ so that line~ understands the message

if you are still struggling i can knock up a patcher with a poly~ to make it clearer

– Pasted Max Patch, click to expand. –

November 4, 2009 | 11:01 pm

thanks mike – I’ll have a go at implementing this today. Thought of another option in the meantime as well – using the dump outlet of the function within the parent patch to update a function stored in the poly~ patch. If I used target 0, this would mean that all of the messages sent by the function remain inside the poly~, and the function drawn from the outside is simply to update each individual instance.. attached a patcher to illustrate.

Thanks for the help – I’m going to have to look into sprintf I think…

– Pasted Max Patch, click to expand. –

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