AL_Pitch
by Sam Guffey · in Technical Issues · 06/26/2002 (11:01 am) · 8 replies
Currently the range of pitch is only 0.5 - 2.0, Where is the code that defines the range, Im using pitch to update engine sound based on wheelSpeed and the pitch maxes out to soon.
About the author
#2
The code you posted is only for player chat voices, mainly for bots so they have slightly different sounds when they talk.
Does Open_AL have the source available "The one that needed to be installed before sound could be heard."
06/26/2002 (12:30 pm)
Well I need to get Open_AL to exept higher pitches, if the pitch goes over 2.0 then the pitch defaults to 1.0The code you posted is only for player chat voices, mainly for bots so they have slightly different sounds when they talk.
Does Open_AL have the source available "The one that needed to be installed before sound could be heard."
#3
well you can get the openAL source from here
http://www.openal.org/downloads/
of course if you modify it you'll have to distribute
your own openAL install with your specific changes.
I hope this is a better way then modifying openAL itself.
06/27/2002 (10:42 am)
ah i cwell you can get the openAL source from here
http://www.openal.org/downloads/
of course if you modify it you'll have to distribute
your own openAL install with your specific changes.
I hope this is a better way then modifying openAL itself.
#4
11/01/2002 (6:27 am)
Well its been awhile since I gave up on the Pitch, but now I really need it.. I know and understand how to use it, its just limited and there is no way to adjust it..The range is 0.2 - 2.0 with a default of 1.0 but I need to be able to go over the 2.0 barrier, I know Rick O. said that he had been a part of the dev of Open_AL so I thought I would post in hoping I could get an answer on what I needed to do to set AL_PITCH up for my needs..
#5
(I might be wrong though)
I am fairly sure that the limiting factor here is OpenAL itself nad not the THE code.
What are you trying to do and we might be able to suggest an alternative way around it?
11/02/2002 (5:46 am)
I thought there was an SDK on the creative site somewhere that could be downloaded for OpenAL ?(I might be wrong though)
I am fairly sure that the limiting factor here is OpenAL itself nad not the THE code.
What are you trying to do and we might be able to suggest an alternative way around it?
#6
11/02/2002 (12:09 pm)
As you know the vehicles run one sound for the engine, I am adjusting the pitch of the sound played based on the wheel speed of the car, but since the pitch maxes out at 2 there isnt a way to get the desired sound. I could have several sounds updating based on speed to give it a transmission type effect but for now I would just like to change the range of AL_Pitch.
#7
I would suggest using maybe a number of differnet sounds and using AL_Pitch up to 1 with them.
11/02/2002 (5:03 pm)
I did this in my game but not with transmission sound changes. I did have a sepearte idle sound though.I would suggest using maybe a number of differnet sounds and using AL_Pitch up to 1 with them.
#8
http://www.gamasutra.com/features/20021030/hill_01.htm
11/03/2002 (3:29 pm)
There's an interesting item on gamasutra at the moment about engine sounds. No great depth to it or anything, but it does mention cross-fading and provided a couple of links to some SDKs you can get to do "proper" engine sounds.http://www.gamasutra.com/features/20021030/hill_01.htm
Torque Owner TheMartian
Conundrum Studios
~/fps/client/scripts/chatHud.cs
here is the code snippet located right at the top
of the file:
// Helper function to play a sound file if the message indicates.
// Returns starting position of wave file indicator.
function playMessageSound(%message, %voice, %pitch)
{
// Search for wav tag marker.
%wavStart = strstr(%message, "~w");
if (%wavStart == -1) {
return -1;
}
%wav = getSubStr(%message, %wavStart + 2, 1000);
if (%voice !$= "") {
%wavFile = "~/data/sound/voice/" @ %voice @ "/" @ %wav;
}
else {
%wavFile = "~/data/sound/" @ %wav;
}
if (strstr(%wavFile, ".wav") != (strlen(%wavFile) - 4)) {
%wavFile = %wavFile @ ".wav";
}
// XXX This only expands to a single filepath, of course; it
// would be nice to support checking in each mod path if we
// have multiple mods active.
%wavFile = ExpandFilename(%wavFile);
if ((%pitch < 0.5) || (%pitch > 2.0)) {
%pitch = 1.0;
}
hope that helps.