Greetings, my fellow music lovers. I'm not certain if this question is on-topic but it's been bugging me for a long time. When we knock or tap our fingers on wood, or other solid objects, we make noises that almost sound like music. Well, for instance, the piece with seven notes that are played when we knock on doors, "Shave and a haircut, two bit". I know they can't make different frequencies of sound with the same piece of wood and drums don't have notes in the traditional sense, but when I picture a melody in my head and play it by knocking on my desk, it creates a somewhat similar tune with the same rhythm (due to my timing) and notes as what I have in mind. I've tried recording my noises and compared it but I'm afraid there might be some cognitive biases. Or is this simply just a psychological illusion?
I know they can't make different frequencies of sound with the same piece of wood and drums don't have notes in the traditional sense
Incorrect. There are wooden percussive instruments with defined pitch sounds e.g. marimba. I also don't understand why you believe you can't get different frequencies from the same object. Depending on where and how you hit it, you induce different modes of vibration. E.g. in stringed instrument that's how you change the tone or produce harmonics sounds.
Or is this simply just a psychological illusion?
Perception of pitch is the domain of psychoacoustics. There is no definite boundary between perceiving certain vibrations as unpitched or pitched. Typically solid objects make sounds with continuous spectrum of multiple frequencies, but also typically not all audible frequencies have equal amplitude. Your ear may, or may not assign pitch to that sound. You can call pitch an illusion, if you wish.
Another aspect is that rhythm is a very important constituent of music. If you play a melody with a characteristic rhythm, even if pitches are only roughly correct, the melody might be recognizable.
Different pieces of wood can make different pitches. Think of a xylophone or marimba. The same piece of wood hit in different locations can make different pitches. (Hit me with a practical musical example, someone?)
Sometimes you get a distinct pitch. Sometimes just a thud. (But knocking on a small door sounds different to knocking on a large one - yes?)
Drums can definitely have pitch. Again, some are very distinct (timpani, some tom-toms) others just more generally high or low. You can tune your snare drum tight or loose even though there's no discernable pitch.
It's an interesting question. Not that interesting, but it's a slow day.
user1079505 is right in saying a melody with a characteristic rhythm might be recognizable. The rhythm of "Shave and a haircut two bits" is as well known as its tune. So the real test is, can your friends and casual acquaintances correctly identify a tune with no rhythmic interest, such as "Oh God our help in ages past, Our hope in years to come": 13 consecutive minims and a dotted semibreve? Or The Flight of the Bumble-bee with its 132-odd semiquavers? Or the intro to Purple Haze for that matter, which is, rhythmically, so like Beethoven's fifth symphony? If they can't then it's probably all in your mind.