{"id":1836,"date":"2022-03-03T22:20:34","date_gmt":"2022-03-03T22:20:34","guid":{"rendered":"https:\/\/www.brucewiggins.co.uk\/?p=1836"},"modified":"2022-03-10T15:29:03","modified_gmt":"2022-03-10T15:29:03","slug":"stereo-to-ambisonics-using-uhj","status":"publish","type":"post","link":"https:\/\/www.brucewiggins.co.uk\/?p=1836","title":{"rendered":"Stereo to Ambisonics using UHJ"},"content":{"rendered":"\n<p>Back in 1983, Michael Gerzon presented a 2, 3 or 4 channel encoding system called UHJ where the 1st two channels are stereo compatible Left and Right signals.  This was, in the 4-channel incarnation, a lossless transcoding of the W, X, Y and Z channels of Ambisonics.  If only the first two channels are kept, then horizontal Ambisonic surround is still able to be extracted, albeit with less isolation between the resulting channels (much like Dolby Stereo used in cinemas from 1976).<\/p>\n\n\n\n<p>I won&#8217;t bore you with the equations and maths of the system, but Gerzon&#8217;s original paper can be found at <a href=\"http:\/\/decoy.iki.fi\/dsound\/ambisonic\/motherlode\/source\/11730.pdf\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/decoy.iki.fi\/dsound\/ambisonic\/motherlode\/source\/11730.pdf<\/a> <\/p>\n\n\n\n<p>To cut a long story short, I&#8217;ve made a UHJ decoder plug-in based on Gerzon&#8217;s paper above, as there isn&#8217;t one currently available that works in the same way:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2022\/03\/image-2.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"525\" height=\"480\" data-attachment-id=\"1839\" data-permalink=\"https:\/\/www.brucewiggins.co.uk\/?attachment_id=1839\" data-orig-file=\"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2022\/03\/image-2.png?fit=984%2C900&amp;ssl=1\" data-orig-size=\"984,900\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image-2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2022\/03\/image-2.png?fit=525%2C480&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2022\/03\/image-2.png?resize=525%2C480&#038;ssl=1\" alt=\"\" class=\"wp-image-1839\" srcset=\"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2022\/03\/image-2.png?w=984&amp;ssl=1 984w, https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2022\/03\/image-2.png?resize=300%2C274&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2022\/03\/image-2.png?resize=768%2C702&amp;ssl=1 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><figcaption>Screenshot of the WigWare UHJ Decoder\/Transcoder JS Effect Plugin<\/figcaption><\/figure>\n\n\n\n<p>Although UHJ encoded material works best (a discography of UHJ releases can be found at <a href=\"http:\/\/www.surrounddiscography.com\/uhjdisc\/uhjhtm.htm\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/www.surrounddiscography.com\/uhjdisc\/uhjhtm.htm<\/a>), any two-channel recording can be fed into the decoder and either a square\/rectangle decoding can be produced, or the B-Format for decoding using another plug-in.  Do note that the &#8216;shelf-filters&#8217; recommended for UHJ are different from the ones used for &#8216;standard&#8217; Ambisonic B-Format decoding.<\/p>\n\n\n\n<p>There are other UHJ implementations available, but this plug-in has a few features not available elsewhere:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Allpass filter based phase shift networks.  This is similar to the techniques used in the original hardware, and can sound more natural that FIR filter alternatives.<\/li><li>Correct shelf filtering based on Gerzon&#8217;s recommendations.<\/li><li>Speaker distance compensation (dial in, and compensate for, the distance the speakers are from the sweet spot.<\/li><\/ul>\n\n\n\n<p>The decoded polar patterns (coming from a 2-channel UHJ encoded source) can be seen below.  UHJ does well considering it&#8217;s only coming from UHJ stereo!<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2022\/03\/image-6.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"525\" height=\"247\" data-attachment-id=\"1859\" data-permalink=\"https:\/\/www.brucewiggins.co.uk\/?attachment_id=1859\" data-orig-file=\"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2022\/03\/image-6.png?fit=1926%2C906&amp;ssl=1\" data-orig-size=\"1926,906\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image-6\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2022\/03\/image-6.png?fit=525%2C247&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2022\/03\/image-6.png?resize=525%2C247&#038;ssl=1\" alt=\"\" class=\"wp-image-1859\" srcset=\"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2022\/03\/image-6.png?resize=1024%2C482&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2022\/03\/image-6.png?resize=300%2C141&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2022\/03\/image-6.png?resize=768%2C361&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2022\/03\/image-6.png?resize=1536%2C723&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2022\/03\/image-6.png?w=1926&amp;ssl=1 1926w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><figcaption>Low and High Frequency Decoding Polar Patterns for a Square Speaker Array from a 2-channel UHJ source<\/figcaption><\/figure>\n\n\n\n<p>The plugin, which is a JSFX for Reaper, can be downloaded below.  To install, unzip the files into the Effects folder in the Reaper Resource Path.  A guide for doing this can be found at: <a rel=\"noreferrer noopener\" href=\"https:\/\/reaperblog.net\/2015\/06\/quick-tip-how-to-install-js-plugins\/\" target=\"_blank\">https:\/\/reaperblog.net\/2015\/06\/quick-tip-how-to-install-js-plugins\/<\/a> <\/p>\n\n\n<a  data-e-Disable-Page-Transition=\"true\" class=\"download-link\" title=\"Version 0.6\" href=\"https:\/\/www.brucewiggins.co.uk?download=1842&amp;tmstv=1777366660\" rel=\"nofollow\" id=\"download-link-1842\" data-redirect=\"false\" >\n\tReaper JSFX UHJ Encoder\/Decoder\/Transcoder\t(60619 downloads\t)\n<\/a>\n\n","protected":false},"excerpt":{"rendered":"<p>Back in 1983, Michael Gerzon presented a 2, 3 or 4 channel encoding system called UHJ where the 1st two channels are stereo compatible Left and Right signals. This was, in the 4-channel incarnation, a lossless transcoding of the W, X, Y and Z channels of Ambisonics. If only the first two channels are kept, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.brucewiggins.co.uk\/?p=1836\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Stereo to Ambisonics using UHJ&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1836","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2iYFT-tC","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":1918,"url":"https:\/\/www.brucewiggins.co.uk\/?p=1918","url_meta":{"origin":1836,"position":0},"title":"Ambisonics B-Format to UHJ Transcoder","author":"Bruce Wiggins","date":"January 10th,  2023","format":false,"excerpt":"As a continuation of my previous post (UHJ to B-Format\/Quad Transcoder\/Decoder) I've now made a plug-in that transcodes\/encodes from 1st Order B-Format (AmbiX or FuMa) to UHJ. As before, it's based on Gerzon's original paper (http:\/\/decoy.iki.fi\/dsound\/ambisonic\/motherlode\/source\/11730.pdf) and also includes what Gerzon calls a PQ meter which is a simple visualisation\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2023\/01\/WigUHJ.gif?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2023\/01\/WigUHJ.gif?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2023\/01\/WigUHJ.gif?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2023\/01\/WigUHJ.gif?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":700,"url":"https:\/\/www.brucewiggins.co.uk\/?p=700","url_meta":{"origin":1836,"position":1},"title":"YouTube 360 VR Ambisonics Teardown!","author":"Bruce Wiggins","date":"April 28th,  2016","format":false,"excerpt":"UPDATE : 4th May 2016 - I've added a video using the measured filters. This will be useful for auditioning the mixes before uploading them to YouTube. So, I've\u00a0been experimenting with YouTube's Ambisonic to Binaural VR videos. \u00a0They work, sound spacious and head tracking also functions (although there seems to\u2026","rel":"","context":"In &quot;Ambisonics&quot;","block_context":{"text":"Ambisonics","link":"https:\/\/www.brucewiggins.co.uk\/?cat=3"},"img":{"alt_text":"You Tube HRIRs 0 degrees","src":"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/04\/YouTubeHRIRs00-300x222.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2041,"url":"https:\/\/www.brucewiggins.co.uk\/?p=2041","url_meta":{"origin":1836,"position":2},"title":"Spaced Stereo Mic Extraction from Ambisonic Recordings","author":"Bruce Wiggins","date":"November 12th,  2024","format":false,"excerpt":"Last year, Bo-Erik Sandholm (https:\/\/www.ohti.xyz) asked me if it was possible to generate spaced stereo microphone outputs from 3rd order Ambisonic recordings. It is possible, and the details of the start of this work can be found in: Girijavallabhan, A.. and Wiggins, B., (2024). A Subjective Comparison Of Virtual Stereo\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":730,"url":"https:\/\/www.brucewiggins.co.uk\/?p=730","url_meta":{"origin":1836,"position":3},"title":"YouTube Binaural Reaper Project","author":"Bruce Wiggins","date":"May 12th,  2016","format":false,"excerpt":"So, here's an example (but empty) Reaper project that contains the YouTube binaural filters I measured. \u00a0You'll need to use your preferred Ambisonics plug-ins of choice, and I'm assuming FuMa channel ordering etc.. they'll be remapped by a plug-in. There is a bundle of JS effects in the folder too,\u2026","rel":"","context":"In &quot;Ambisonics&quot;","block_context":{"text":"Ambisonics","link":"https:\/\/www.brucewiggins.co.uk\/?cat=3"},"img":{"alt_text":"YouTubeBinProject","src":"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/05\/YouTubeBinProject-300x166.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":666,"url":"https:\/\/www.brucewiggins.co.uk\/?p=666","url_meta":{"origin":1836,"position":4},"title":"YouTube, Ambisonics and VR","author":"Bruce Wiggins","date":"April 25th,  2016","format":false,"excerpt":"Introduction So, last week Google enabled head (phone!) tracked positional audio on 360 degree videos. \u00a0Ambisonics is now one of the defacto standards for VR audio. \u00a0This is a big moment! \u00a0I've been playing a little with some of the command line tools needed to get this to work, and\u2026","rel":"","context":"In &quot;Ambisonics&quot;","block_context":{"text":"Ambisonics","link":"https:\/\/www.brucewiggins.co.uk\/?cat=3"},"img":{"alt_text":"AmbiSignalRemap","src":"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/04\/AmbiSignalRemap.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":859,"url":"https:\/\/www.brucewiggins.co.uk\/?p=859","url_meta":{"origin":1836,"position":5},"title":"Details on Facebook 360 Ambisonics Mapping from Angelo Farina","author":"Bruce Wiggins","date":"February 22nd,  2017","format":false,"excerpt":"EDIT: You can download a JS effect (for Reaper) that does the conversion from ambiX to TBE and another that goes from TBE to 2nd order, 2D, Furse-Malham format here (I've included my remapping JS effect too, so you can also go from Furse-Malham to TBE format by converting to\u2026","rel":"","context":"In &quot;Ambisonics&quot;","block_context":{"text":"Ambisonics","link":"https:\/\/www.brucewiggins.co.uk\/?cat=3"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2017\/02\/TBE_Channel_4_ZR-217x300.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.brucewiggins.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1836","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.brucewiggins.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.brucewiggins.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.brucewiggins.co.uk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.brucewiggins.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1836"}],"version-history":[{"count":7,"href":"https:\/\/www.brucewiggins.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1836\/revisions"}],"predecessor-version":[{"id":1860,"href":"https:\/\/www.brucewiggins.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1836\/revisions\/1860"}],"wp:attachment":[{"href":"https:\/\/www.brucewiggins.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1836"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.brucewiggins.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1836"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.brucewiggins.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1836"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}