<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div></div><div><br></div><div><br>5 juni 2017 kl. 03:03 skrev Chris Robinson <<a href="mailto:chris.kcat@gmail.com">chris.kcat@gmail.com</a>>:<br><br></div><blockquote type="cite"><div><span>On 06/04/2017 01:14 PM, Anders Genell wrote:</span><br><blockquote type="cite"><span>So, does OpenAL Soft use a matrix of predefined possible speaker</span><br></blockquote><blockquote type="cite"><span>positions when decoding b-format (there are som standard ones related</span><br></blockquote><blockquote type="cite"><span>to the wave-x format in some way, isn't there?) or how is the</span><br></blockquote><blockquote type="cite"><span>b-format otherwise decoded to a speaker array?</span><br></blockquote><span></span><br><span>Basically it takes an accumulation of how much each B-Format channel contributes to the direction the speaker is in. That's a pretty gross oversimplification, but it's the simplest way to explain it that I can think of.</span><br><span></span><br><span>The general concept is, given a sound panned in B-Format to some direction, all the speakers contribute to make a physical plane wave coming from that direction. The more speakers you have, and the higher the ambisonic order, the more accurate the plane wave can be.</span><br><span></span><br><blockquote type="cite"><span>You say a multi-channel audio file may or may not have corresponding</span><br></blockquote><blockquote type="cite"><span>output channels, but if the number or channels in the file or stream</span><br></blockquote><blockquote type="cite"><span>exactly matches the number of channels in the output format set in</span><br></blockquote><blockquote type="cite"><span>alsoft.conf should they then at least match channel to channel?</span><br></blockquote><span></span><br><span>I tried doing that once, but I found there was a perceptual volume difference when an input channel is matched directly to an output channel, compared to being panned. At least for surround sound output. And for stereo, there's the recently-implemented stereo_angles extension that allows rotating the stereo channels, so even if the channel names match, their intended positions might not.</span><br><span></span><br><span>And things like HRTF, which is stereo output but uses filters to provide consistent reproduction of multi-channel sources (you wouldn't want to directly match input to output with HRTF anyway, unless the sound is already made for headphones).</span><br><span></span><br><span>One of the ideas I currently have in mind is something where you can query the number of output channels, get text labels for each channel, and some method to "link" a source to play on a specific output channel instead of going through the panning stuff. This should be reasonably flexible since it wouldn't restrict OpenAL to using a list of predefined formats, or a list of predefined channels. Not too keen on the idea of text labels to identify channels, but I don't think predefined enums would be the best idea for ease of extendability.</span><br></div></blockquote><div><br></div><div>That would be absolutely perfect for a speaker-test kind of thing! </div><br><blockquote type="cite"><div><span></span><br><blockquote type="cite"><span>Also, what kind of b-format decoder does OpenAL Soft use? Would it be</span><br></blockquote><blockquote type="cite"><span>possible to have it decode to a horribly skewed speaker setup that</span><br></blockquote><blockquote type="cite"><span>would need both angular and time/phase correction?</span><br></blockquote><span></span><br><span>Not sure about angular correction, but time/phase correction on speakers is possible. Simply provide an .ambdec config file that specifies the proper speaker distances, and OpenAL Soft will apply the necessary delays and gains to make them sound equidistant.</span><br></div></blockquote><div><br></div><div>Oh?! Fantastic!</div><div>Is it documented somewhere how to implement this? Looking at e.g. Fons Adriaensen's ambisonics decoder for linux, it seems angles should be possible too.</div><div><a href="http://kokkinizita.linuxaudio.org/linuxaudio/adec-pict.html">http://kokkinizita.linuxaudio.org/linuxaudio/adec-pict.html</a></div><div><br></div><div>Regards,</div><div>Anders</div></body></html>