Core elements would be random-number generation or stochastic/probability/algorithmic generation of pitch/amplitude/rhythm/duration and perhaps even timbre.
The rest is really up to you based on what elements you'd like to apply the algorithmic or random generation to.
Although complex, here is a patch which applies random generative principles to the realm of FM-synthesis created by electronic-music-master John Bischoff:
That one uses random number generation. For stochastic or probability generation you could use something simple like a table object with weighted probabilities and a bang attached(see table or itable help-file for more info. and then apply it to whatever process you'd like).
There are also algorithmic possibilities such as using fractals etc. You can find jitter ways of creating such audio algorithms here:
LindenMayerMusic2.maxpat in the same folder
both created by R. Luke Dubois(another master, of course).
Nodal is a generative software application for composing music. It uses a novel method for the notation and playing of MIDI based music. This method is based around the concept of a user-defined graph. The graph consists of nodes (musical events) and edges (connections between events). You interactively define the graph, which is then traversed by any number of players who play the musical events as they encounter them on the graph. The time taken to travel from one node to another is based on the length of the edges that connect the nodes.
Nodal is free software available for Mac OS X based computers.
Glad to help, on second look, the help-file for itable/table isn't quite as enlightening regarding probability methods as I thought, so you might have a look at Tutorial 17: Data Structures And Probability. Using similar techniques, you would algorithmically generate data to be applied to parameters for your synth or any other type of electronic instrument(technically, you could also generate scores for acoustic instruments as well; though real-time playback upon generation might require some extra ingenuity...).