Then there is source music, where it emanates from an obvious source rather thin air. I find that to be effective in the same way that the use of natural language is effective (i.e. German soldiers, Jesuses, et al do not speak mid-western American). The 1964 Abbey Lincoln/Ivan Dixon film, "Nothing But a Man," which is among my favorite black movies, used source music, Motown recordings from radios, etc.
I agree with those who feel that film music is most effective when it seamlessly blends with the visual.