Instruments
Max for Live lets you create Instruments which receive MIDI information from the Live application and use that information to generate audio output which can be sent back to the Live application or be further processed by any number of Audio effects devices.
Max for Live provides several tutorials and example Instruments you can try, study, and modify:
In addition, the Max programming environment itself provides you with some helpful tools for one of the classic challenges of synth creation - the management of polyphony. The Max poly~ object is created specifically to efficiently manage polyphony in the context of synthesizer design. The MSP tutorials also include a section on using the poly~ object .
You can use any MIDI input object to receive MIDI data from Live application. You'll use the plugout~ object for audio output.