Harmonic rules for the Ionian and Dorian modes