I am reading the book "Gödel, Escher, Bach", in which the author tries to present concepts in mathematics, drawings and music as instances of a certain "pattern", that he calls "strange loops". He makes several comments about Bach's music, in particular, as the title suggests. So, he talks about the fugues, sonatas and partitas, modulation, themes played against themselves, how Bach manages to get two or more musical lines going simultaneously and so on.

But I don't understand a thing about these musical concepts. I have tried to listen on YouTube to some of the compositions he mentions in the book, but my stupid brain only hears a stream of notes flowing. I can't recognize the patterns he talks about, nor can I grasp, for example, the fact the the "Canon per Tonos" rises successively until it reaches the key C again. 

So how can I learn more about these musical concepts, so as to better follow the book's main ideas? To make this question narrower, I'm not asking for general references to learn about music, but something very specific to the content of the book, so that I don't miss important information (and fun) from his exposition.


Question: Piezo as a switch to flash an led when disturbed
Answer: I have done this myself to detect tiny vibrations from anyone touching my bike. It triggers an MCU to text me using a GM862GPS module.

The circuit uses a comparator whose inputs are set to be very close to each other. Then the vibration sensor can disturb the input voltages a little, causing the comparator to trigger.

The diodes are there just to make sure the vibration sensor doesn't generate too high a voltage. It may be possible to get rid of them, but I haven't actually checked.