The diatonic algo will do this just fine.
How so? Does the diatonic not just do the same diatonic interval, (for example maj or min thirds as appropriate)? The triad version substitutes a fourth below instead of a third when the root is played. Believe it or not this makes all the difference!