I suppose a good rule of thumb is that "dissonant" notes (in the musical syntax sense) should be in a harmonic relation with the scale step they will ultimately resolve into - so D to C, A to G, F to C etc. This can and will create roughness in the vertical dimension, but that actually reflects their unstable "energy" that drives them to resolution. Of course one could just as well use microtonal shifts to play with this kind of stability whenever longer-range relations are involved. Perhaps this is part of what good performers do intuitively when playing a melodic instrument. The relevance of music-syntactical dissonance and resolution is what might make Schenkerian analysis a very useful tool to understand these possibilities!