How to change the pitch of a sound?

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!
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.

How to change the pitch of a sound?

Postby Get Phobo » Mon Dec 10, 2018 7:58 pm

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.
User avatar
Get Phobo
Banned User
 
Joined: 07 Sep 2018

Re: How to change the pitch of a sound?

Postby Cherno » Mon Dec 10, 2018 8:53 pm

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 :]
User avatar
Cherno
 
Joined: 06 Dec 2016

Re: How to change the pitch of a sound?

Postby Get Phobo » Mon Dec 10, 2018 10:49 pm

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.
User avatar
Get Phobo
Banned User
 
Joined: 07 Sep 2018

Re: How to change the pitch of a sound?

Postby Cherno » Tue Dec 11, 2018 4:35 am

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.
User avatar
Cherno
 
Joined: 06 Dec 2016

Re: How to change the pitch of a sound?

Postby Get Phobo » Tue Dec 11, 2018 6:03 am

Well, I will try that and see what it gives. Thanks.
User avatar
Get Phobo
Banned User
 
Joined: 07 Sep 2018

Re: How to change the pitch of a sound?

Postby Get Phobo » Thu Dec 20, 2018 4:19 pm

It doesn't seem to work. I've tried this code in SNDINFO.txt:
Code: Select allExpand view
$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.
User avatar
Get Phobo
Banned User
 
Joined: 07 Sep 2018


Return to Assets (and other stuff)

Who is online

Users browsing this forum: No registered users and 1 guest

cron