Logic Pro X has MIDI Scripters, which might do some of what you're looking for, while still being a traditional DAW. Saw a video the other day of Brian Eno describing how he takes a regular drum beat, and adds a stack of Scriptors to it to make it probabilistic and ever-changing.
In that case you may really like reaktor. I'm pretty sure it integrates with reason and you can do graphical or C programming for it.
Or Bitwig Studio - it has controller scripting API.