1

Does anybody know of good (3D) ambisonics extensions for Pure Data?

I'm trying to setup some ambisonics examples for students in a small studio (8 speaker cube), so a simple 1st order panner and decoder object should be fine.

It seems like there are ambisonics libraries available in pd-extended, but I can't see how they actually work - i.e. where is the b-format encoder and decoder objects?

Charles Martin
  • 338
  • 2
  • 13

3 Answers3

3

Check out the hoalibrary

You can download it here

I'm still looking for example projects -- I'll update if I find any.

Update 1:

Ambilib

This pd library is sweet. It comes with a bunch of good sample projects in the help folder.

maelswarm
  • 1,163
  • 4
  • 18
  • 37
  • `hoalibrary` looks awesome but it only works for 2D speaker arrays so it's not a good solution for me. I'll try getting Ambilib up and running. – Charles Martin Mar 29 '14 at 00:49
  • I haven't had any luck getting Ambilib to work (Mac OS X) - any hints? – Charles Martin Mar 29 '14 at 01:25
  • I tried to configure but no dice; although, the following link offers a standalone app that uses ambilib. http://rickygraham.com/2012/03/01/pd2live-a-digital-music-performance-system/ – maelswarm Mar 29 '14 at 01:45
  • 1
    Annoying about Ambilib, got some response on twitter, but in the meantime, I put together a quick and dirty decoder to fill the gap: https://github.com/cpmpercussion/SimpleAmbisonics – Charles Martin Mar 30 '14 at 10:40
1

Here's basic 1st order ambisonic panner and decoder objects for an 8 speaker cube configuration. I've also put these objects on GitHub with some examples. The code snippets below should be put into separate .pd files!

Panner:

#N canvas 66 87 448 490 10;
#X obj 32 421 outlet~;
#X obj 141 421 outlet~;
#X obj 244 421 outlet~;
#X obj 324 421 outlet~;
#X obj 27 61 inlet~;
#X obj 32 336 /~ 1.41421;
#X obj 131 61 inlet;
#X obj 304 61 inlet;
#X text 27 37 signal;
#X text 131 37 azimuth (theta);
#X text 304 37 elevation (phi);
#X text 32 446 W;
#X text 141 446 X;
#X text 244 446 Y;
#X text 324 446 Z;
#X obj 134 179 cos;
#X obj 173 179 sin;
#X obj 307 179 cos;
#X obj 336 179 sin;
#X obj 141 336 *~;
#X obj 243 336 *~;
#X obj 324 336 *~;
#X obj 219 64 loadbang;
#X obj 131 87 \$1;
#X obj 304 87 \$2;
#X obj 141 362 *~;
#X obj 243 362 *~;
#X obj 131 123 * 3.14159;
#X obj 304 120 * 1.57079;
#X connect 4 0 5 0;
#X connect 4 0 19 0;
#X connect 4 0 21 0;
#X connect 4 0 20 0;
#X connect 5 0 0 0;
#X connect 6 0 23 0;
#X connect 7 0 24 0;
#X connect 15 0 19 1;
#X connect 16 0 20 1;
#X connect 17 0 25 1;
#X connect 17 0 26 1;
#X connect 18 0 21 1;
#X connect 19 0 25 0;
#X connect 20 0 26 0;
#X connect 21 0 3 0;
#X connect 22 0 23 0;
#X connect 22 0 24 0;
#X connect 23 0 27 0;
#X connect 24 0 28 0;
#X connect 25 0 1 0;
#X connect 26 0 2 0;
#X connect 27 0 15 0;
#X connect 27 0 16 0;
#X connect 28 0 17 0;
#X connect 28 0 18 0;

Decoder:

#N canvas 42 77 788 411 10;
#X obj 199 25 inlet~;
#X obj 303 29 inlet~;
#X obj 415 29 inlet~;
#X obj 538 26 inlet~;
#X text 199 5 W;
#X text 303 9 X;
#X text 415 9 Y;
#X text 538 6 Z;
#X obj 21 333 outlet~;
#X obj 123 333 outlet~;
#X obj 219 331 outlet~;
#X obj 318 331 outlet~;
#X obj 21 177 +~;
#X obj 215 177 -~;
#X obj 404 331 outlet~;
#X obj 506 331 outlet~;
#X obj 602 329 outlet~;
#X obj 701 329 outlet~;
#X text 21 359 LFU;
#X text 123 359 LBU;
#X text 219 357 RBU;
#X text 318 357 RFU;
#X text 404 357 LFD;
#X text 506 357 LBD;
#X text 602 355 RBD;
#X text 701 355 RFD;
#X obj 403 180 +~;
#X obj 600 180 -~;
#X obj 404 220 +~;
#X obj 601 220 -~;
#X obj 21 217 +~;
#X obj 215 217 -~;
#X obj 21 269 +~;
#X obj 122 177 -~;
#X obj 303 56 *~ 0.25;
#X obj 414 58 *~ 0.25;
#X obj 538 56 *~ 0.1768;
#X obj 199 55 *~ 0.1768;
#X obj 124 269 +~;
#X obj 219 269 +~;
#X obj 317 269 +~;
#X obj 404 267 -~;
#X obj 507 267 -~;
#X obj 602 267 -~;
#X obj 700 267 -~;
#X obj 317 217 -~;
#X obj 507 220 +~;
#X obj 695 220 -~;
#X obj 122 217 +~;
#X obj 317 177 +~;
#X obj 506 180 -~;
#X obj 694 180 +~;
#X connect 0 0 37 0;
#X connect 1 0 34 0;
#X connect 2 0 35 0;
#X connect 3 0 36 0;
#X connect 12 0 30 0;
#X connect 13 0 31 0;
#X connect 26 0 28 0;
#X connect 27 0 29 0;
#X connect 28 0 41 0;
#X connect 29 0 43 0;
#X connect 30 0 32 0;
#X connect 31 0 39 0;
#X connect 32 0 8 0;
#X connect 33 0 48 0;
#X connect 34 0 12 1;
#X connect 34 0 13 1;
#X connect 34 0 26 1;
#X connect 34 0 27 1;
#X connect 34 0 33 1;
#X connect 34 0 49 1;
#X connect 34 0 50 1;
#X connect 34 0 51 1;
#X connect 35 0 30 1;
#X connect 35 0 31 1;
#X connect 35 0 28 1;
#X connect 35 0 29 1;
#X connect 35 0 45 1;
#X connect 35 0 46 1;
#X connect 35 0 47 1;
#X connect 35 0 48 1;
#X connect 36 0 32 1;
#X connect 36 0 38 1;
#X connect 36 0 39 1;
#X connect 36 0 40 1;
#X connect 36 0 41 1;
#X connect 36 0 42 1;
#X connect 36 0 43 1;
#X connect 36 0 44 1;
#X connect 37 0 12 0;
#X connect 37 0 13 0;
#X connect 37 0 26 0;
#X connect 37 0 27 0;
#X connect 37 0 33 0;
#X connect 37 0 49 0;
#X connect 37 0 50 0;
#X connect 37 0 51 0;
#X connect 38 0 9 0;
#X connect 39 0 10 0;
#X connect 40 0 11 0;
#X connect 41 0 14 0;
#X connect 42 0 15 0;
#X connect 43 0 16 0;
#X connect 44 0 17 0;
#X connect 45 0 40 0;
#X connect 46 0 42 0;
#X connect 47 0 44 0;
#X connect 48 0 38 0;
#X connect 49 0 45 0;
#X connect 50 0 46 0;
#X connect 51 0 47 0;

There's helpful discussions about making ambisonic decoders in this paper:

Heller, Aaron, Richard Lee, and Eric Benjamin. "Is my decoder ambisonic?." Audio Engineering Society Convention 125. Audio Engineering Society, 2008. APA

Charles Martin
  • 338
  • 2
  • 13
1

I've put the code from that paper ("Is My Decoder...") and a number of newer design techniques into a MATLAB/Octave toolbox. The toolbox writes out ambisonic decoders in the Faust DSP specification language, which can then be compiled to Pd externals (and many other plugin formats, like VST, Max/MSP, LV2, ...). The code is in a git repo at https://bitbucket.org/ambidecodertoolbox/adt. I'm sorry that there are no simple-to-follow instructions for the code, but feel free to contact me with questions. The toolbox is described in our LAC2014 paper.