Page 1 of 1

How to change the pitch of a sound?

Posted: Mon Dec 10, 2018 6:58 pm
by Get Phobo
I would like to make higher-pitched versions of some vanilla sounds for my WIP Doom Offspring mod using code, if possible.

How do I do this? Is it possible at all? I want to set a fixed pitch value, not specify a randomization range (I know how to do that).

Like, Mr. Baron has a son, and his son's voice has twice the pitch, so it sounds a lot higher.

Re: How to change the pitch of a sound?

Posted: Mon Dec 10, 2018 7:53 pm
by Cherno
viewtopic.php?f=3&t=21739

Using $pitchshiftrange <range> , then declaring the higher-pitched sound, then inserting $pitchshiftrange <range> again with a normal pitch value for all the sounds after that should do the trick in theory :]

Re: How to change the pitch of a sound?

Posted: Mon Dec 10, 2018 9:49 pm
by Get Phobo
Okay, but this sets a range for random alteration, which is exactly what I do not want. I just want to set a fixed pitch for a specific sound, like 2.0 to make it twice the normal pitch.

Re: How to change the pitch of a sound?

Posted: Tue Dec 11, 2018 3:35 am
by Cherno
The idea was to use a range that leaves no room for variation like 2.0 - 2.0. However, I never used ranged in zDoom so I'm noz sure how to delcare them.

Re: How to change the pitch of a sound?

Posted: Tue Dec 11, 2018 5:03 am
by Get Phobo
Well, I will try that and see what it gives. Thanks.

Re: How to change the pitch of a sound?

Posted: Thu Dec 20, 2018 3:19 pm
by Get Phobo
It doesn't seem to work. I've tried this code in SNDINFO.txt:

Code: Select all

$pitchshiftrange  7
yknight/sight dskntsit
yknight/active dsdmnact
yknight/pain dsdmnpn
yknight/death dskntdth
$pitchshift yknight/sight 7
$pitchshift yknight/active 7
$pitchshift yknight/pain 7
$pitchshift yknight/death 7
$pitchshiftrange 0
Setting randomized pitches to either on or off will override any definitions, it seems.