Poly synth confusion
I’m making a simple synth I can rewire to cubase, but I’m having trouble actually making it polyphonic.
If I have an ADSR object inside the poly can I pass values to that from outside the poly? and will this update every instance of it?
I’ve had a look at the tutorial but that just has a line message inside the poly which is triggered when there’s a new note.
You might want to take a look at Darwin Grosse’s excellent synth building tutorials here: http://www.cycling74.com/story/2007/8/20/111019/403 .
They’re kind of old, and I don’t think the adsr~ object existed when they were written (correct me if I’m wrong anyone), but still provide a good introduction into the world of Max-built synths.
It’s kind of hard to comment more specifically than this without an example of how you’re implementing multiple voices using your poly~. However, if you do want to send specific messages to specific instances you can use target messages outside the poly, like this:
#N vpatcher 10 59 240 258;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 33 75 47 196617 target 1;
#P newex 16 48 27 196617 t i b;
#P number 16 27 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 16 118 58 196617 poly~ grub;
#P window linecount 7;
#P comment 81 52 56 196617 this will send an int to the first inlet of the first instance of your poly~;
#P connect 2 0 3 0;
#P connect 4 0 1 0;
#P connect 3 0 1 0;
#P connect 3 1 4 0;
… or, if your brain is engaged:
#N vpatcher 10 59 610 459;
#P window setfont "Sans Serif" 9.;
#P number 13 28 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P message 13 49 66 196617 target 1 , $1;
#P newex 13 70 58 196617 poly~ grub;
#P connect 2 0 1 0;
#P connect 1 0 0 0;
p.s. If you want to target every instance, use the message ‘target 0′.
Thanks for the replies George.
I had a look at your patches and the tutorials but I’m still none the wiser.
It’s not that I want different ADSRs for different voices, I just want to apply the one ADSR to everything.
My question is does the ADSR object have to be inside the poly object?
BI have had it inside before, but passing values to it doesn’t seem to work at all :/
The dataspace in Max is global. Therefore, any
time you pass data to an ADSR [or anything else]
using something humble and ordinary like send and
receive objects, *all* instantiations of the
voice in your poly~ object will receive the same
If you’re packing messages and directing them
into the patch hosted by the poly~ object, then
using "target 0" will send the message to ALL
If that’s *not* the case, then the usual patch/OS
version/Max version data will be a good idea.
On Aug 10, 2008, at 12:42 PM, Mike S wrote:
> My question is does the ADSR object have to be inside the poly object?
Yes, ADSR needs to be inside the poly object.
> I have had it inside before, but passing values to it doesn’t seem
> to work at all :/
To pass parameters to all instances of something inside a poly~ you
need to sent the poly~ a "target 0" message.
On Aug 10, 2008, at 11:30 PM, Chris Muir wrote:
> Yes, ADSR needs to be inside the poly object.
I reworked the StupidSynth example on my examples page to use adsr~
instead of line~ to illustrate this. I only reworked the Max 5
Thanks very much Chris and Greg, all clear in my head now!
(warning, extreme noob here)
I have been experimenting with the poly object, because I have been trying to eliminate clicking heard by hitting too many consecutive notes in a row. I initially built a very simple (1osc) synth with an adsr that ended up very similar to Chris’s example, but with both my attempt and Chris’s example, I hear clicks no matter what I do to the ADSR. Shouldn’t the clicks go away if I jack up the number of voices on my poly object (in Chris’s or mine).
> but with both my attempt and Chris’s example, I hear clicks no matter
> what I do to the ADSR. Shouldn’t the clicks go away if I jack up the
> number of voices on my poly object (in Chris’s or mine).
How do you trigger the voices? With a midinote message? If you provide a
patch this might lead to better answers. We can only guess what could go
wrong. And there could go wrong all sorts of things, I can only asure
you, that I can make voices without clicks…
In spirit of full disclosure, I messed up, you are right, your patch works fine. Initially when I opened your patch i didn’t see the ADSR’s on the main patch and I altered them in the wrong spot in the sub patch, which caused the ADSR to not be scaled correctly. Once I realized this, I went back and realized that is what was happening with my patch because I was trying to use the function as a cheap ADSR (mostly because I didn’t know about the ADSR object).
stefan, in your stupid synth patch, could you explain the usage of the sprintf command … not how it works, i understand that (my day job is as a programmer) but I was wondering why you used it … does the text "midinote" mean anything or is it just a marker, etc …
On Sep 21, 2008, at 9:09 PM, emajcher wrote:
> stefan, in your stupid synth patch, could you explain the usage of
> the sprintf command … not how it works, i understand that (my day
> job is as a programmer) but I was wondering why you used it … does
> the text "midinote" mean anything or is it just a marker, etc …
"midinote" is a keyword for the voice allocator in poly~, as is
"note". I use sprintf to cobble together a message that consists of
feeding an [append midinote] to generate this message.
I was wondering if there was an easy way to use the breakpoint function editor as the amplitude envelope?
Would it be a case of formatting a message like in the previous ADSR example? or is there an easier way?