late 14c., "a musical sound, a succession of musical notes," unexplained variant of tone. Meaning "state of being in proper pitch" is from mid-15c.
"bring into a state of proper pitch," c.1500, from tune (n.). Non-musical meaning "to adjust an organ or receiver" is recorded from 1887. Verbal phrase tune in in reference to radio (later also TV) is recorded from 1913; figurative sense of "become aware" is recorded from 1926. Tune out "to eliminate radio reception" is recorded from 1908; figurative sense of "disregard, stop heeding" is from 1928. Related: Tuned; tuning.
(From musical, possibly via automotive, usage) To optimise a program or system for a particular environment, especially by adjusting numerical parameters designed as hooks for tuning, e.g. by changing "#define" lines in C. One may "tune for time" (fastest execution), "tune for space" (least memory use), or "tune for configuration" (most efficient use of hardware).
See bum, hot spot, hand-hacking.