From what I understand the space and other qualities cause the pitch. So depending on how much space the instrument is set at changes the pitch. Let's say you loosen a guitar string the pitch is flatter because the string has more space to make the sound waves. If you tighten the same string it will be sharper because the string has less space to make the sound wave.