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.
How to change the pitch of a sound?
Moderators: GZDoom Developers, Raze Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
-
- Posts: 1321
- Joined: Tue Dec 06, 2016 11:25 am
Re: How to change the pitch of a sound?
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 :]
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 :]
-
- Posts: 113
- Joined: Fri Sep 07, 2018 8:30 am
Re: How to change the pitch of a sound?
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.
-
- Posts: 1321
- Joined: Tue Dec 06, 2016 11:25 am
Re: How to change the pitch of a sound?
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.
-
- Posts: 113
- Joined: Fri Sep 07, 2018 8:30 am
Re: How to change the pitch of a sound?
Well, I will try that and see what it gives. Thanks.
-
- Posts: 113
- Joined: Fri Sep 07, 2018 8:30 am
Re: How to change the pitch of a sound?
It doesn't seem to work. I've tried this code in SNDINFO.txt:
Setting randomized pitches to either on or off will override any definitions, it seems.
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