Thanks m1469! I've always loved your improvs as well so I am really happy you liked these.
I think the thing that got me started initially was Ted's advice of "get your hands going in the same scale, it'll sound alright." I began gleefully following this advice, but definitely was a big fan of the style of baroque and wanted to figure out how to make those sounds specifically. I think I eventually read something about the basic idea of species counterpoint, and it gave me an idea to start with one against one, then play with two against two..etc. But I think the exercise which really got me going was what I'd call "anchor voices."
I start with the bass, and just go completely stepwise either on major or a minor scale (but eventually when more comfortable, chromatic lines!), and try to make one other voice "snap" on thirds and sixths (and tenths etc. etc.) but treat other intervals as "necessary evils." That's basically what all common practice theory boils down to in my mind. Thirds are raised above all else as the sound we want to hear, and anything else if used too much will not be thirdy enough and should be discarded, except where the melody is so good you wouldn't care anyway. (Bach is guilty of this!).
Eventually I realized I had anchored too long in just the bass, and began treating the middle and sometimes even upper voice as the anchor, making the others snap to triads, playing with suspensions, etc. In my case I'm finding the more relaxed and the less I think the better it turns out. In fact, often when I go days or even weeks without doing this it incubates and surprises me when I do it again.
It used to bother me that I haven't done a lot of hard study of the "rules" as we call them today, and I used to be obsessed with this idea of thirds being raised above all else and trying to find out precise reasons why common practice composers treated fifths and fourths exactly the way they did, but I'm starting to let go of that too...and I'm finding that letting go is actually helping what I perceive to be better results! I'm sure the "vague" idea is right---thirds are the most important interval, but I'm not sure there are hard and objective reasons about how the other intervals are treated, just that if you want to have more than two voices or interesting melodies they just inconveniently get in the way and sometimes distract you from the thirds, so be careful with them. What better way to be careful than to thoroughly enjoy the sound of the thirds.
And yep they most definitely were improvised. I guess the only things that are not are tiny fragments of the stepwise anchor voice exercises that I mentioned earlier---but once those are in your brain they can be broken up in thousands of different ways. *edit* I am still finding it a fun exercise to try to anchor middle voices and especially the upper voice. For some reason the bass remains the easiest voice to anchor, maybe due to so much non baroque music being bass oriented or maybe because the bass naturally moves more slowly and produces more pleasing harmonic overtones than higher voices? I'm not sure.