Is there any study on the effectiveness of taking notes in a lecture vs taking notes on written materials? In many lectures I heard, I basically copied the lecture notes of the professor from the board into my notebook (I study mathematics). For me those lectures are comparable with going into the library, taking a textbook and making a handwritten copy from it.

The question I asked myself today: Is there a study investigating what is more effective? Going to lectures where I copy the professor's lecture notes from the board or making a handwritten copy from the lecture notes by myself? 

(I assume here that the lecture notes are available, e.g. from the lecture's homepage)

On the one hand the professor might give additional comments in the lecture. On the other hand one can take the time he needs to understand a complicated paragraph when he works by himself and is not in the lecture. One also can skip easily understandable parts when he works by himself...
The primary value of taking notes by hand is not the record that you create, but that the act of taking notes causes your brain to engage more deeply with the material.  You might never look at your notes again, but taking them has a strong positive effect on your ability to understand and remember the material that you are taking the notes about.

As such, you could potentially get similar value not by copying but by summarizing a text by hand.  Taking notes in lecture gives at least one additional benefit: it provides a focused block of time in which distractions are less available to you.  With a good lecturer, you get a second benefit: a lecturer is often much better than a text at directing your attention to the most important concepts in material.