Taking a little break from the tempo change implementation to do a follow up on the first post as promised...
I won't spend a lot of time here going over the same topics I did in part 1. Continuing with the scenario discussed there, lets assume we are approximating a One Drop rhythm.
Pete approves. So we have guessed that there are going to be two kicks to the measure. That's great but where do they go? This is kind of where this really becomes more of an art form than a development exercise. You are really writing algorithms to apply a certain sense of style to the phrases you generate and the kick is a really good example in this situation.
For these sorts of rhythms, the routine is pretty simplistic. We determine the basic sort of beat based on the number of kicks predicted per measure. If we guessed 1 or 2, we know this is going to be a One Drop and as such will look to place all kicks on a 2nd or 4th beat - remember we are counting half time so that may be considered on the 3 by some . If we only guessed 1 (as opposed to 2) or ended up with an odd total, the placement of a given note may be randomly on either the 2nd or 4th beat of the measure. This logic gets extrapolated out to Rockers, meaning that if we guessed four kicks per measure or less, we will look to place all kicks on quarters. This expands to Steppers in the same manner (except with eighths).
Now, these are by far the most straightforward calculations we make with respect to generating the note lists. Most of the time we make these predictions using distribution models like the one mentioned in part 1. We finely tune the parameters to the point where we are comfortable with the possibilities, and let chance sort out the rest. That's part of the art of it so I won't get into details - if you are reading this you are obviously interested in implementing your own solution so just do it the way you think it should be done.
Tempo variation is coming...not easy...