So I tucked this scale run making technology into lickmaker and added a composer operation "runs" which allows various kinds of runs to be inserted between two licks. (or just wherever)
Here's what that looks like in my composer syntax:
bsdic['bs_12b_0']=[ ['plick','e_1bar_Maj_bs'], ['match_n','bs_12b_0',0], ['alt','bs_12b_0',0], ['match_n','bs_12b_0',2,'rentropy'],
['plick','sour_2bar_min_bs'],
['runs','min_b_scale',[-1,-1]],['posit','bs_12b_0',1 ,14],
['chordit','bs_12b_0',0,7,'7','scratch'],['chordit','bs_12b_0',1,5,'7'],
['plick','e_2bar_turns']
]
This is the new command: ['runs','min_b_scale',[-1,-1]]
"runs" is the opcode to insert a scale. Then you specify the type of scale, minor blues in this case. (hmmm. it assumes the root of the scale, I'll have to add a way to modify that). the [-1,-1]) tells the composer that the scale should start with a note in the scale specified as close as possible to the last note of the previous lick to as near as possible to the first note of the next lick. (Of course for this to work the next lick has to be already selected, so to make this all work composition is now a two pass operation. First pass find the licks you can then second pass fill in with bars like this 'runs' command.
There are some other details, you can just specify the starting or ending note(s) of the scale. It doesn't have to be a scale, it could be a chord form so you can add arpeggios this way.
I talked mostly about the AI for figuring out how to play the notes on a guitar fretboard but there is some selection of what rhythm patters and notes to play based on starting and ending notes- the choices lickmaker makes is pretty limited at this point but it's easy to add patterns. Also, scale patterns could just be added that are more than simple scale sequences.
Here's what the score around a couple of the synthesized scales looks like:


And you can hear how this changes the fist song that I made with lickmaker
here.
I like to imagine ...