im a new member of the totally crazy unity engine.
i started a project and i now have a question.
in the 1.6 version unity supports audio.pitch.
i tried to add a sound to my racing car, and it works.
now i have a problem. if the car is moving faster, it should pitch the sound variable from .5 to 2.0.
i tried to add audio.pitch to the tutorial car script.
it looks like audio.pitch = 1.0 * rpm.
the rpm is computed in the tutorial car script…
no error message, but nothing happens.
could someone please help me?
i am not a freakin coder, but i want to become one.
Doppler and pitch does work on several PPC machines we have here. For anyone that has it not working, please run Report Bug.app, write like “doppler does not work, ppc” and send it to us. Hopefully that will give us some insight why it’s not working.
i’ll stop bitching as im only going on what i’ve read here!..I will get around to actually testing out the new audio stuff myself on the powerbook G4 here at some point soon and see how it goes.
is what about you want, but if you just take the rpm parameter from the car example, you’d have a range from ~800 to 6000, which will give you pitches way out of reach for OpenAL.
Also, I wouldn’t scale engine pitch proportionally with RPM (doesn’t sound realistic). Try something like this instead:
audio.pitch = 0.5+0.9*rpm/maxRPM
you might also want to make the volume correspond to throttle input.
great
just for the record, I wasnt complaining. I dont understang doppler carry-on yet, but I did search the docs and found this, so I was making my statement based on that
AC
That documentation is outdated
Doppler works on ppc and intel (I realise that there are some bugs with this in the different implementations, the ppc should be fine now, looking into intel later).
I’ve had quite a bit of audio experience, but a doppler is a new concept to me. Is there a good example of using this anywhere? Maybe someone from OTEE could knock up a wee package? Prudy Please?
AC
Doppler is mostly interesting if you have objects with high velocities relative to each other. Like a car or plane passing by. Just try setting up a looping sound source attached to an object which is passing the camera at a high speed to get an impression of the effect.