Re: [Sursound] Periphonic Irregular HO Ambisonics Decoder
Thanks Fons! I will start from this! Ciao Davide -- next part -- An HTML attachment was scrubbed... URL: https://mail.music.vt.edu/mailman/private/sursound/attachments/20140319/b12dba8b/attachment.html ___ Sursound mailing list Sursound@music.vt.edu https://mail.music.vt.edu/mailman/listinfo/sursound
Re: [Sursound] Periphonic Irregular HO Ambisonics Decoder
Thanks to all for your feedback! I developed the code in python 2.7 and I never tried to run it under python3. If you are forced to work with python3 I could look for the necessary changes to adapt idhoa code to python3 ... but I would prefer to focus on other activities ;) The expected behaviour is the one described by Aaron, and it should work fine. Just a note on WBIN (and the available flags). Wbin is a flag to exclude from the optimization the floor region under a certain degree. This can be done automatically with the AUTOREM flag, which tries to automatically remove the area without loudspeakers from the computation of the objective function. If you don't like this, just put AUTOREM flag to 0 and you have a more standard behaviour: the decoder will try to optimize the decoding even in the areas without loudspeakers. Remeber that we can also help in calculating your decoding matrix... we would be glad to make some comparisons with other methods. Best Davide -- next part -- An HTML attachment was scrubbed... URL: https://mail.music.vt.edu/mailman/private/sursound/attachments/20140318/318c536a/attachment.html ___ Sursound mailing list Sursound@music.vt.edu https://mail.music.vt.edu/mailman/listinfo/sursound
Re: [Sursound] Periphonic Irregular HO Ambisonics Decoder
Hi Fons, thanks for your valuable feedback. I inserted a 'print (thetaTest)' in Wbinary(), just before the compare that fails. The code *is* called, and thetaTest is printed as a list, not an array. Yes! Wbinary() is called in constants.py, just to call it once and store the result, which *should* be a vector with True and False elements. But, as you correctly pointed out, in the function Wbinary() the comparison is between a list and a float and not a np.array and a float (which would be legit). Thanks for finding this bug! I will fix it immediately! There is always one more bug. Anyway if you run the code with WBIN = 0, as comes by default, the results are not affected. Ciao, Davide -- next part -- An HTML attachment was scrubbed... URL: https://mail.music.vt.edu/mailman/private/sursound/attachments/20140318/0c608eb8/attachment.html ___ Sursound mailing list Sursound@music.vt.edu https://mail.music.vt.edu/mailman/listinfo/sursound
Re: [Sursound] Periphonic Irregular HO Ambisonics Decoder
On Mon, Mar 17, 2014 at 06:05:11PM +0100, /dav/random wrote: - The code is not written by software engineers. We have our evident limits. Please don't take this personally, but it shows :-) It's in fact a glorious mess... There are circular dependencies between the modules. Which is why you have to delay 'imports' and put them inside functions. This breaks as soon as you add or change anything that requires a module to be imported earlier. And it makes total nonsense of the entire 'module' concept, while that is the primary way to structure Python code. It also uses a mix of plain matplotlib and pyplot which provide the same things via different interfaces, and also of plain numpy and pylab which includes numpy and again pyplot. Trying to maintain this will be fun... Ciao, -- FA A world of exhaustive, reliable metadata would be an utopia. It's also a pipe-dream, founded on self-delusion, nerd hubris and hysterically inflated market opportunities. (Cory Doctorow) ___ Sursound mailing list Sursound@music.vt.edu https://mail.music.vt.edu/mailman/listinfo/sursound
Re: [Sursound] Periphonic Irregular HO Ambisonics Decoder
On Tue, Mar 18, 2014 at 11:34:02PM +0100, /dav/random wrote: It is my first work with python, and I accept any kind of contribution, hint, ticket, code, ... and even ideas on how to restructure it, so it can make more sense. Python + numpy is probably the ideal language for this sort of thing, so that was a good choice. First thing I'd do is put all the input data in a class. This can be passed around easily as a function argument instead of having to 'import' it (or parts of it !), along with many other advantages. Python classes are very nice. Coming from C++ there are some changes to get used to - things work in different ways - but it all makes a lot of sense. Another thing to consider is that almost all changes made in Python 3 have been backported to recent Python 2. So it's quite easy to write code that works with either. Good luck ! -- FA A world of exhaustive, reliable metadata would be an utopia. It's also a pipe-dream, founded on self-delusion, nerd hubris and hysterically inflated market opportunities. (Cory Doctorow) ___ Sursound mailing list Sursound@music.vt.edu https://mail.music.vt.edu/mailman/listinfo/sursound
[Sursound] Periphonic Irregular HO Ambisonics Decoder
Dear Sursounders, we released the code for calculating the coefficients for decoding high order ambisonics to your irregular periphonic layout. The project is called IDHOA and the code is hosted here [1] under GPL . Few words on the project. - The code is not written by software engineers. We have our evident limits. - The code has some dependacies to be satisfied: NLopt and some python packages (like matplotlib). - You can calculate the Ambisonics coefficients for decoding up to fifth order. - The software will try to optimize for you layout: (a) the number of speaker playing, (b) the order of ambisonics that your layout is able to reproduce. E.g. if you have 20 lodspeakers you won't be able to reproduce fourth order. The decoder will then mute the fourth ambisonics order. - You can select between: (basic), max-Re and in-phase decodings. The decoder will try to optimize the (pressure) energy and the (velocity) acoustic intensity. - After the installation you have to modify only the constants.py file, introducing your layout... and you are ready to go. Feel free to ask more information! We can also help in calculating your decoding matrix. We are interested to know your opinion by making a comparison with you actual decoder. Thanks! Davide Scaini Daniel Arteaga [1] https://github.com/BarcelonaMedia-Audio/idhoa -- next part -- An HTML attachment was scrubbed... URL: https://mail.music.vt.edu/mailman/private/sursound/attachments/20140317/febd85f9/attachment.html ___ Sursound mailing list Sursound@music.vt.edu https://mail.music.vt.edu/mailman/listinfo/sursound
Re: [Sursound] Periphonic Irregular HO Ambisonics Decoder
On Mon, Mar 17, 2014 at 06:05:11PM +0100, /dav/random wrote: The project is called IDHOA and the code is hosted here [1] under GPL . (after automatic conversion to python3) Traceback (most recent call last): File ./main.py, line 32, in module from constants import * File /data/build/idhoa/constants.py, line 106, in module WbinVec = fu.Wbinary() File /data/build/idhoa/functions.py, line 525, in Wbinary return thetaTest thetaThreshold TypeError: unorderable types: list() float() Ciao, -- FA A world of exhaustive, reliable metadata would be an utopia. It's also a pipe-dream, founded on self-delusion, nerd hubris and hysterically inflated market opportunities. (Cory Doctorow) ___ Sursound mailing list Sursound@music.vt.edu https://mail.music.vt.edu/mailman/listinfo/sursound
Re: [Sursound] Periphonic Irregular HO Ambisonics Decoder
On Mon, Mar 17, 2014 at 05:06:32PM -0700, Aaron Heller wrote: On Mon, Mar 17, 2014 at 1:09 PM, Fons Adriaensen f...@linuxaudio.orgwrote: On Mon, Mar 17, 2014 at 06:05:11PM +0100, /dav/random wrote: The project is called IDHOA and the code is hosted here [1] under GPL . (after automatic conversion to python3) Traceback (most recent call last): File ./main.py, line 32, in module from constants import * File /data/build/idhoa/constants.py, line 106, in module WbinVec = fu.Wbinary() File /data/build/idhoa/functions.py, line 525, in Wbinary return thetaTest thetaThreshold TypeError: unorderable types: list() float() It runs fine in Python 2.7 with NLOpt 2.4.1 It took about 370 seconds to solve the example speaker array at 3rd-order. From a quick look at the usual performance metrics, the resulting coefficients look pretty good for a challenging array. It turns out that Python 2 allows to compare a list of floats to a float. But the result is probably not what the authors assumed it to be: Python 2.7.6 (default, Nov 26 2013, 12:52:49) [GCC 4.8.2] on linux2 Type help, copyright, credits or license for more information. A = [0.1, 0.2, 0.3] A 1000 True A -1000 True A 1000 False A -1000 False In other words, the compare that Python 3 refuses will always return True in Python 2. I suspect this is a bug. Ciao, -- FA A world of exhaustive, reliable metadata would be an utopia. It's also a pipe-dream, founded on self-delusion, nerd hubris and hysterically inflated market opportunities. (Cory Doctorow) ___ Sursound mailing list Sursound@music.vt.edu https://mail.music.vt.edu/mailman/listinfo/sursound
Re: [Sursound] Periphonic Irregular HO Ambisonics Decoder
Fons, here's my little code review: The bug is harmless, because the WbinVec variable is used only if WBIN is considered True, and WBIN is actually a constant set to 0. -- Marc Le Tue, 18 Mar 2014 01:01:25 +, Fons Adriaensen f...@linuxaudio.org a écrit : On Mon, Mar 17, 2014 at 05:06:32PM -0700, Aaron Heller wrote: On Mon, Mar 17, 2014 at 1:09 PM, Fons Adriaensen f...@linuxaudio.orgwrote: On Mon, Mar 17, 2014 at 06:05:11PM +0100, /dav/random wrote: The project is called IDHOA and the code is hosted here [1] under GPL . (after automatic conversion to python3) Traceback (most recent call last): File ./main.py, line 32, in module from constants import * File /data/build/idhoa/constants.py, line 106, in module WbinVec = fu.Wbinary() File /data/build/idhoa/functions.py, line 525, in Wbinary return thetaTest thetaThreshold TypeError: unorderable types: list() float() It runs fine in Python 2.7 with NLOpt 2.4.1 It took about 370 seconds to solve the example speaker array at 3rd-order. From a quick look at the usual performance metrics, the resulting coefficients look pretty good for a challenging array. It turns out that Python 2 allows to compare a list of floats to a float. But the result is probably not what the authors assumed it to be: Python 2.7.6 (default, Nov 26 2013, 12:52:49) [GCC 4.8.2] on linux2 Type help, copyright, credits or license for more information. A = [0.1, 0.2, 0.3] A 1000 True A -1000 True A 1000 False A -1000 False In other words, the compare that Python 3 refuses will always return True in Python 2. I suspect this is a bug. Ciao, ___ Sursound mailing list Sursound@music.vt.edu https://mail.music.vt.edu/mailman/listinfo/sursound
Re: [Sursound] Periphonic Irregular HO Ambisonics Decoder
When I run it in Python 2.7, thetaTest is an array, not a list as in Fons' example, so the comparison works as expected and produces a boolean array array([.1, .2, .3, .4]) .25 array([False, False, True, True], dtype=bool) and boolean types behave like the constants 0 and 1 under multiplication array([1,2,3,4]) * (array([.1, .2, .3, .4]) .25) array([0, 0, 3, 4]) I don't know much about Python 3. Aaron On Mon, Mar 17, 2014 at 7:07 PM, Marc Lavallée m...@hacklava.net wrote: Fons, here's my little code review: The bug is harmless, because the WbinVec variable is used only if WBIN is considered True, and WBIN is actually a constant set to 0. -- Marc Le Tue, 18 Mar 2014 01:01:25 +, Fons Adriaensen f...@linuxaudio.org a écrit : On Mon, Mar 17, 2014 at 05:06:32PM -0700, Aaron Heller wrote: On Mon, Mar 17, 2014 at 1:09 PM, Fons Adriaensen f...@linuxaudio.orgwrote: On Mon, Mar 17, 2014 at 06:05:11PM +0100, /dav/random wrote: The project is called IDHOA and the code is hosted here [1] under GPL . (after automatic conversion to python3) Traceback (most recent call last): File ./main.py, line 32, in module from constants import * File /data/build/idhoa/constants.py, line 106, in module WbinVec = fu.Wbinary() File /data/build/idhoa/functions.py, line 525, in Wbinary return thetaTest thetaThreshold TypeError: unorderable types: list() float() It runs fine in Python 2.7 with NLOpt 2.4.1 It took about 370 seconds to solve the example speaker array at 3rd-order. From a quick look at the usual performance metrics, the resulting coefficients look pretty good for a challenging array. It turns out that Python 2 allows to compare a list of floats to a float. But the result is probably not what the authors assumed it to be: Python 2.7.6 (default, Nov 26 2013, 12:52:49) [GCC 4.8.2] on linux2 Type help, copyright, credits or license for more information. A = [0.1, 0.2, 0.3] A 1000 True A -1000 True A 1000 False A -1000 False In other words, the compare that Python 3 refuses will always return True in Python 2. I suspect this is a bug. Ciao, ___ Sursound mailing list Sursound@music.vt.edu https://mail.music.vt.edu/mailman/listinfo/sursound -- next part -- An HTML attachment was scrubbed... URL: https://mail.music.vt.edu/mailman/private/sursound/attachments/20140317/9ab9562c/attachment.html ___ Sursound mailing list Sursound@music.vt.edu https://mail.music.vt.edu/mailman/listinfo/sursound