Audio Orientation (simple question)
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Audio Orientation (simple question)
Nothing I can find (including experimentation) has solved this issue for me. What are the arguments used by love.audio.getOrientation and love.audio.setOrientation? What are the units (degrees, radians, etc.) and which directions do axes face?
Re: Audio Orientation (simple question)
hey,
i also needed this informations, the love wiki is lacking a lot of this openal descriptions.
Löve uses OpenAL for positional audio and OpenAL uses the RHS coordinate system.
This is the best picture to show it.
here is a good site.
http://pythonhosted.org/PyAL/audio.html
You need SetOrientation only for the listener (normally you only have one).
This is my setup, but I have something firstperson, (fake3d) Doom-like. I completely ignore the Y direction.
I hope this helps you. It works in my game. You can produce real positional 3d audio.
cheers
i also needed this informations, the love wiki is lacking a lot of this openal descriptions.
Löve uses OpenAL for positional audio and OpenAL uses the RHS coordinate system.
This is the best picture to show it.
here is a good site.
http://pythonhosted.org/PyAL/audio.html
You need SetOrientation only for the listener (normally you only have one).
This is my setup, but I have something firstperson, (fake3d) Doom-like. I completely ignore the Y direction.
Code: Select all
-- AUDIO - LISTENER --------------------------------------------
-- X 0 Z X 0 Z
-- /*fwd:*/ 0., 0., -1., /*up:*/ 0., 1., 0.
if self.activeplayer.faceID == facing_.CFACING_NORTH then
love.audio.setOrientation( 0, 0, -1, 0, 1, 0 )
elseif self.activeplayer.faceID == facing_.CFACING_SOUTH then
love.audio.setOrientation( 0, 0, 1, 0, 1, 0 )
elseif self.activeplayer.faceID == facing_.CFACING_EAST then
love.audio.setOrientation( 1, 0, 0, 0, 1, 0 )
elseif self.activeplayer.faceID == facing_.CFACING_WEST then
love.audio.setOrientation( -1, 0, 0, 0, 1, 0 )
end
cheers
Re: Audio Orientation (simple question)
Thanks; this helps so much. But what are the units that the last 3 arguments (the rotation ones/ux, uy, uz) use? What makes a full circle?
Re: Audio Orientation (simple question)
Code: Select all
>>> listener.orientation = (0, 0, -1, 0, 1, 0)
>>> ^^^^^^^^ ^^^^^^^
>>> direction, rotation
>>> Forward vector, Up vector
What you mean by circle? What do you want to circulate?
Normally you have one listener (the one where you set the orientation) and a emitter (the sound producing event).
You set the listener and than you rotate the emitter around the listener.
So your listener is the one that hears the sound and the emitter is for example a torch.
This is how I move the emitter. To move it in a circle around the listener, you need to change x,y.
Code: Select all
abc:setPosition( x, 0, y )
TEsound.play(abc, "sfx", volume or 1.0, pitch, func)
Take my modified TESound, because only this supports sound sources. You need sound sources to modify Position.
https://github.com/SiENcE/love2d_gamete ... Esound.lua
cheers
Re: Audio Orientation (simple question)
Let's say that I am a listener and have a sound emitter in directly in front of me. Say that I turn to the left, and now the emitter is a little bit to the right. If I keep turning to the left, the emitter will eventually be directly in front of me again. This is what I mean by a full circle. It is represented by 360 degrees or 2 * pi radians.
Re: Audio Orientation (simple question)
It's a vector {0.0-1f, 0.0-1f, 0.0-1f}.
I point you to the openal 1.1 specification.
http://www.openal.org/documentation/ope ... cation.pdf
I point you to the openal 1.1 specification.
http://www.openal.org/documentation/ope ... cation.pdf
Re: Audio Orientation (simple question)
This hand is misleading. The thumb (X axis) should point to the right, the middle finger (Z axis) towards the person.SiENcE wrote:hey,
i also needed this informations, the love wiki is lacking a lot of this openal descriptions.
Löve uses OpenAL for positional audio and OpenAL uses the RHS coordinate system.
This is the best picture to show it.
cheers
Who is online
Users browsing this forum: Semrush [Bot] and 5 guests