Re: [Sursound] Linux ambdec b-format channel order
On Sat, Nov 16, 2013 at 11:38:09AM -0800, Aaron Heller wrote: I encountered this a while back and modified my copy of Ambdec 0.5.1 to register its inputs with jack in FuMa order rather than ACN, specifically to get the mplayer-jack-ambdec chain to work as expected (which I suspect is one of the more common use cases). Ambdec's functioning is completely unaffected by this, unless of course, you're depending on seeing Ambdec's inputs in ACN order in jack. Here's patch file against the current sources: http://www.ai.sri.com/ajh/ambisonics/ambdec-jack-fuma-order.patch While I understand the motivation for doing this, it's futile. Jack does not have any notion of the 'order' of an application's ports. If a Jack API call happens to list the them in the order they were created you are just being lucky. The only valid way (ATM) to determine any order is to interpret the port names. Patches to Jack have been submitted (not by me, but I'd have supported them) years ago to solve this problem, but they were rejected with the usual promise of a 'better' solution which so far has not materialised. 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] Linux ambdec b-format channel order
Hi Fons I would be happy to use a patched version of mplayer *and* a patched version of jackd; is the patch for jackd still available (and compatible with jackd2)? -- Marc Fons Adriaensen f...@linuxaudio.org a écrit : On Sat, Nov 16, 2013 at 11:38:09AM -0800, Aaron Heller wrote: I encountered this a while back and modified my copy of Ambdec 0.5.1 to register its inputs with jack in FuMa order rather than ACN, specifically to get the mplayer-jack-ambdec chain to work as expected (which I suspect is one of the more common use cases). Ambdec's functioning is completely unaffected by this, unless of course, you're depending on seeing Ambdec's inputs in ACN order in jack. Here's patch file against the current sources: http://www.ai.sri.com/ajh/ambisonics/ambdec-jack-fuma-order.patch While I understand the motivation for doing this, it's futile. Jack does not have any notion of the 'order' of an application's ports. If a Jack API call happens to list the them in the order they were created you are just being lucky. The only valid way (ATM) to determine any order is to interpret the port names. Patches to Jack have been submitted (not by me, but I'd have supported them) years ago to solve this problem, but they were rejected with the usual promise of a 'better' solution which so far has not materialised. Ciao, ___ Sursound mailing list Sursound@music.vt.edu https://mail.music.vt.edu/mailman/listinfo/sursound
Re: [Sursound] Linux ambdec b-format channel order
On Sat, Nov 16, 2013 at 05:35:31PM -0500, Marc Lavallée wrote: I would be happy to use a patched version of mplayer *and* a patched version of jackd; is the patch for jackd still available (and compatible with jackd2)? Don't know if they are still available. But if implemented in Jack they would still require applications to be aware of them. The solution with current Jack is that Mplayer should use the port *names* and match them against the channel order in the file it is playing. Or allow the user to specify the connections in some way. 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] Linux ambdec b-format channel order
I meant a patched ambdec... Also, A patched mplayer would be better, as you prescribe. Another limitation of mplayer is the number of output channels, which I think is limited to 8 (to be verified). -- Marc Fons Adriaensen f...@linuxaudio.org a écrit : On Sat, Nov 16, 2013 at 05:35:31PM -0500, Marc Lavallée wrote: I would be happy to use a patched version of mplayer *and* a patched version of jackd; is the patch for jackd still available (and compatible with jackd2)? Don't know if they are still available. But if implemented in Jack they would still require applications to be aware of them. The solution with current Jack is that Mplayer should use the port *names* and match them against the channel order in the file it is playing. Or allow the user to specify the connections in some way. Ciao, ___ Sursound mailing list Sursound@music.vt.edu https://mail.music.vt.edu/mailman/listinfo/sursound
Re: [Sursound] Linux ambdec b-format channel order
Marc Lavallée wrote: In my experience, the order of channels in jack are stable enough to use this simple channels remapping trick: mplayer -channels 4 -af channels=4:4:0:0:1:3:2:1:3:2 -ao jack:port=ambdec AJH_eight-positions.amb FWIW, while looking at mplayer code it occured to me that - 1. My suggestion in my last post to make mplayer sort by name is silly and would be wrong for higher orders where channel number matters (I can't reply to my own post because of the stupid way gmail works). 2. Rather than taking time to extend mplayer to take input names, though useful, I could just use qjackctl patch bay. With that I can set up connections how I want and handle all the variety of higher orders (though I did notice an 8 channel limit in the mplayer code - easily changed). So if I did need to use mplayer for many different types of .amb I would just set up different mappings in patchbay, load my settings on starting jack and then with recent (older doesn't have noconnect) mplayer do something like - mplayer -channels 4 -ao jack:name=MP4:noconnect some-bformat.amb mplayer -channels 7 -ao jack:name=MP7:noconnect some-3rdhoriz.amb etc. MP4 and MP7 being names used in my patchbay config the right connections will be made when mplayer starts. ___ Sursound mailing list Sursound@music.vt.edu https://mail.music.vt.edu/mailman/listinfo/sursound
Re: [Sursound] Linux ambdec b-format channel order
On Thu, Nov 14, 2013 at 12:00:10AM +, Andy Furniss wrote: I am not experienced with ambdec, but while trying something today I noticed something confusing when feeding direct with mplayer - mplayer -channels 4 -ao jack:port=ambdec pwh-VoiCE-Round.amb The channels are crossed as in the screenshot. This doesn't happen if I were to use the same mplayer command to a different sink. I suppose it does match the order on the config screen, but not the jack input names. http://imageshack.com/a/img203/1880/1xzw.png Mplayer's Jack support is broken, it doesn't allow you to specify the ports to connect to, only the application name. Agreed. My (2007) take on this is item 5 on http://mchapman.com/amb/software. So not constructive ... except to re-assure you that the brickwall you are banging your head on has been banged by others ... Michael ___ Sursound mailing list Sursound@music.vt.edu https://mail.music.vt.edu/mailman/listinfo/sursound
Re: [Sursound] Linux ambdec b-format channel order - Player
Try to compile potamus a very simple player that can be modified to work as jack aware multichannel player. http://offog.org/code/potamus.html Can it play back multichannel wav files ? In theory it should do, but it only creates two JACK output ports by default, so you'll need to change that in the source (NUM_PORTS in src/output-jack.c). I've not actually tried it beyond two channels, but it was written with multichannel playback loosely in mind, so it should work. - It works! - Bosse It is also a very positive thing that potamus keeps the setup of jack between files as I understand it does. Yes -- it creates JACK output ports on startup, and connects them automatically to the physical input ports, but after that it doesn't touch them. Adam Sampson the author have provided the above info to me :-) Bo-Erik -Original Message- From: Sursound [mailto:sursound-boun...@music.vt.edu] On Behalf Of Fons Adriaensen Sent: den 14 november 2013 13:24 To: sursound@music.vt.edu Subject: Re: [Sursound] Linux ambdec b-format channel order On Thu, Nov 14, 2013 at 12:00:10AM +, Andy Furniss wrote: I am not experienced with ambdec, but while trying something today I noticed something confusing when feeding direct with mplayer - mplayer -channels 4 -ao jack:port=ambdec pwh-VoiCE-Round.amb The channels are crossed as in the screenshot. This doesn't happen if I were to use the same mplayer command to a different sink. I suppose it does match the order on the config screen, but not the jack input names. http://imageshack.com/a/img203/1880/1xzw.png Mplayer's Jack support is broken, it doesn't allow you to specify the ports to connect to, only the application name. And Jack itself has no notion of any 'order' of the ports, whatever order there is has to be inferred from the port names. Mplayer doesn't do this, and the result is more or less random connections. In this case the sequence matches the one in the config window, probably because Ambdec creates its ports in that order, and when asked for Ambdec's ports, Jack happens to list them in the same order again. But that is not documented in Jack's API, so you can't rely on it. The only solution is to fix Mplayer. -- 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 mailing list Sursound@music.vt.edu https://mail.music.vt.edu/mailman/listinfo/sursound
Re: [Sursound] Linux ambdec b-format channel order
Fons Adriaensen wrote: On Thu, Nov 14, 2013 at 12:00:10AM +, Andy Furniss wrote: I am not experienced with ambdec, but while trying something today I noticed something confusing when feeding direct with mplayer - mplayer -channels 4 -ao jack:port=ambdec pwh-VoiCE-Round.amb The channels are crossed as in the screenshot. This doesn't happen if I were to use the same mplayer command to a different sink. I suppose it does match the order on the config screen, but not the jack input names. http://imageshack.com/a/img203/1880/1xzw.png Mplayer's Jack support is broken, it doesn't allow you to specify the ports to connect to, only the application name. And Jack itself has no notion of any 'order' of the ports, whatever order there is has to be inferred from the port names. Mplayer doesn't do this, and the result is more or less random connections. OK, so do you mean that in the absence of being able to specify names (or even if implemented to save user typing) that just sorting the inputs by name would be the correct thing to do? In this case the sequence matches the one in the config window, probably because Ambdec creates its ports in that order, and when asked for Ambdec's ports, Jack happens to list them in the same order again. But that is not documented in Jack's API, so you can't rely on it. The only solution is to fix Mplayer. Thanks for the info, and thanks also to Marc and Michael for their posts. It's going to bug me till I find it, but I think that a link recently on this list suggested the very mplayer command that I was testing. @Fons - have you built ambdec with a recent linux set up? Though I am not a very typical/good test case as I use LFS (actually CLFS on this PC) I had to add -lpthreads to the makefile as ld (binutils from last year) threw an error. It was self explanatory and searching it seems that the default behavior has changed so you have to explicitly specify libs that previously would have been included if referenced by other libs that were specified. As I don't use distros I don't know if they work around so have no idea if any one else will see this. ___ Sursound mailing list Sursound@music.vt.edu https://mail.music.vt.edu/mailman/listinfo/sursound
[Sursound] Linux ambdec b-format channel order
I am not experienced with ambdec, but while trying something today I noticed something confusing when feeding direct with mplayer - mplayer -channels 4 -ao jack:port=ambdec pwh-VoiCE-Round.amb The channels are crossed as in the screenshot. This doesn't happen if I were to use the same mplayer command to a different sink. I suppose it does match the order on the config screen, but not the jack input names. http://imageshack.com/a/img203/1880/1xzw.png ___ Sursound mailing list Sursound@music.vt.edu https://mail.music.vt.edu/mailman/listinfo/sursound