code: function Bformat_rotator(audioCtx)
  {
      this.initialized = false;
      
      this.ctx = audioCtx;
      this.yaw = 0;
      this.pitch = 0;
      this.roll = 0;
      this.rotMtx = [[],[],[]];
      this.rotMtxNodes = [[],[],[]];
      // Input and output nodes
      this.in = this.ctx.createChannelSplitter(4);
      this.out = this.ctx.createChannelMerger(4);
      // Initialize rotation gains to identity matrix
      for (i=0; i<3; i++) {
          for (j=0; j<3; j++) {
              this.rotMtxNodes[i][j] = context.createGain();
              if (i == j) this.rotMtxNodes[i][j].gain.value = 1;
              else this.rotMtxNodes[i][j].gain.value = 0;
          }
      }
      // Create connections
      this.in.connect(this.out,0,0);
      
      for (i=0; i<3; i++) {
          for (j=0; j<3; j++) {
              this.in.connect(this.rotMtxNodes[i][j],j+1,0);
              this.rotMtxNodes[i][j].connect(this.out,0,i+1);
          }
      }
      
      this.initialized = true;
  }
docs: //////////////////// /* B_FORMAT ROTATOR ////////////////////