nodal is a free (for non-commercial use) app for developing generative musical systems and transmitting MIDI.
"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."
As Nodal outputs MIDI data it would be interesting to use in conjunction with programs like MaxMSP or pd. You could also use it to control sequencers/DAWs either in the studio or out live.
The Nodal website has a binch of tutorials and examples for you to dig around in.