"pertaining to or affected by a mode," 1560s, originally a term in logic, from Middle French modal and directly from Medieval Latin modalis "of or pertaining to a mode," from Latin modus "measure, extent, quantity; proper measure, rhythm, song; a way, manner, fashion, style" (in Late Latin also "mood" in grammar and logic), from PIE root *med- "take appropriate measures." Musical sense is from 1590s; In grammar from 1798.