Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Also, if I remembering correctly, $pitchshift doesn't shift the pitch of the sound explicitly. What it does is provide the range the sound may be shifted if the player has pitch shifted sounds on. So, providing 7 for the sound $pitchshift will mean that if the player has pitch shifted sounds on, they will hear the widest variations of the noise, from normal to maximum pitchshift. Providing $pitchshift 0 for the sound means that even with pitch shifting sounds on, you will never hear that sound in a shifted pitch.
That might not be exactly it, but I think that's how it works.