[gst-devel] ambisonics pipeline in gst-editor

Andy Wingo wingo at pobox.com
Mon Jul 15 23:50:44 CEST 2002


http://ambient.2y.net/tmp/gst-editor-ambisonics.png

compare to http://gstreamer.net/images/mega.png from over a year ago.

From http://gstreamer.net/apps/gsteditor.php, written over a year ago
about a version of gst-editor I never saw work:

"The example at the right shows a complex pipeline set up for playback of
an MP3 in an Ambisonics surround setup. From left to right you have a
Disksrc to read from disk, mpg123 to decode the mp3, and
LADSPA_freeverb3 to apply some world-class reverb effects. At the bottom
you have LADSPA_encode_bformat, which has three arguments: angle,
elevation, and distance. This encodes the audio as 4 channels of
surround sound. The LADSPA_bf2cube element converts this surround data
into output channels appropriate for a cube of speakers. The fakesink
represents the not-yet-complete ALSA audio sink for an 8-channel sound
card (though could just as well be 2 SBLive!'s)."

So now we use mad, have the filesrc, and have an alsasink. The old
pipeline didn't think too much about the fact the basic ladspa format is
mono float data. Also, the ladspa effects work. This pipeline is
different from the old one, inasmuch as it should work in theory, I just
don't have a card that can support 8 channels of output. The XML of this
pipeline is attached.

Regards,

wingo.
-------------- next part --------------
<?xml version="1.0"?>
<gstreamer xmlns:gst="http://gstreamer.net/gst-core/1.0/">
  <gst:element>
    <gst:name>pipeline0</gst:name>
    <gst:type>pipeline</gst:type>
    <gst:version>0.4.0.1</gst:version>
    <gst:param>
      <gst:name>name</gst:name>
      <gst:value>pipeline0</gst:value>
    </gst:param>
    <gst:children>
      <gst:element>
        <gst:name>filesrc1</gst:name>
        <gst:type>filesrc</gst:type>
        <gst:version>0.4.0.1</gst:version>
        <gst:param>
          <gst:name>name</gst:name>
          <gst:value>filesrc1</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>offset</gst:name>
          <gst:value>0</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>location</gst:name>
          <gst:value/>
        </gst:param>
        <gst:param>
          <gst:name>filesize</gst:name>
          <gst:value>0</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>fd</gst:name>
          <gst:value>0</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>blocksize</gst:name>
          <gst:value>4096</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>mmapsize</gst:name>
          <gst:value>4194304</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>touch</gst:name>
          <gst:value>TRUE</gst:value>
        </gst:param>
        <gst:pad>
          <gst:name>src</gst:name>
          <gst:peer>mad1.sink</gst:peer>
        </gst:pad>
      </gst:element>
      <gst:element>
        <gst:name>mad1</gst:name>
        <gst:type>mad</gst:type>
        <gst:version>0.4.0.1</gst:version>
        <gst:param>
          <gst:name>name</gst:name>
          <gst:value>mad1</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>layer</gst:name>
          <gst:value>unknown</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>mode</gst:name>
          <gst:value>single channel</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>emphasis</gst:name>
          <gst:value>none</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>bitrate</gst:name>
          <gst:value>0</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>samplerate</gst:name>
          <gst:value>0</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>channels</gst:name>
          <gst:value>0</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>average-bitrate</gst:name>
          <gst:value>0</gst:value>
        </gst:param>
        <gst:pad>
          <gst:name>sink</gst:name>
          <gst:peer>filesrc1.src</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>src</gst:name>
          <gst:peer>int2float1.sink</gst:peer>
        </gst:pad>
      </gst:element>
      <gst:element>
        <gst:name>int2float1</gst:name>
        <gst:type>int2float</gst:type>
        <gst:version>0.4.0.1</gst:version>
        <gst:param>
          <gst:name>name</gst:name>
          <gst:value>int2float1</gst:value>
        </gst:param>
        <gst:pad>
          <gst:name>sink</gst:name>
          <gst:peer>mad1.src</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>src0</gst:name>
          <gst:peer>ladspa_freeverb31.Input--Right-</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>src1</gst:name>
          <gst:peer>ladspa_freeverb31.Input--Left-</gst:peer>
        </gst:pad>
      </gst:element>
      <gst:element>
        <gst:name>ladspa_freeverb31</gst:name>
        <gst:type>ladspa_freeverb3</gst:type>
        <gst:version>1123</gst:version>
        <gst:param>
          <gst:name>name</gst:name>
          <gst:value>ladspa_freeverb31</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>Freeze-Mode</gst:name>
          <gst:value>FALSE</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>Room-Size</gst:name>
          <gst:value>0.000000</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>Damping</gst:name>
          <gst:value>0.000000</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>Wet-Level</gst:name>
          <gst:value>0.000000</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>Dry-Level</gst:name>
          <gst:value>0.000000</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>Width</gst:name>
          <gst:value>0.000000</gst:value>
        </gst:param>
        <gst:pad>
          <gst:name>Input--Left-</gst:name>
          <gst:peer>int2float1.src1</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>Input--Right-</gst:name>
          <gst:peer>int2float1.src0</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>Output--Left-</gst:name>
          <gst:peer>adder1.sink0</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>Output--Right-</gst:name>
          <gst:peer>adder1.sink1</gst:peer>
        </gst:pad>
      </gst:element>
      <gst:element>
        <gst:name>ladspa_encode_bformat1</gst:name>
        <gst:type>ladspa_encode_bformat</gst:type>
        <gst:version>1087</gst:version>
        <gst:param>
          <gst:name>name</gst:name>
          <gst:value>ladspa_encode_bformat1</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>Sound-Source-X-Coordinate</gst:name>
          <gst:value>0.000000</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>Sound-Source-Y-Coordinate</gst:name>
          <gst:value>0.000000</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>Sound-Source-Z-Coordinate</gst:name>
          <gst:value>0.000000</gst:value>
        </gst:param>
        <gst:pad>
          <gst:name>Input</gst:name>
          <gst:peer>adder1.src</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>Output--W-</gst:name>
          <gst:peer>ladspa_bf2cube1.Input--W-</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>Output--X-</gst:name>
          <gst:peer>ladspa_bf2cube1.Input--X-</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>Output--Y-</gst:name>
          <gst:peer>ladspa_bf2cube1.Input--Y-</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>Output--Z-</gst:name>
          <gst:peer>ladspa_bf2cube1.Input--Z-</gst:peer>
        </gst:pad>
      </gst:element>
      <gst:element>
        <gst:name>ladspa_bf2cube1</gst:name>
        <gst:type>ladspa_bf2cube</gst:type>
        <gst:version>1092</gst:version>
        <gst:param>
          <gst:name>name</gst:name>
          <gst:value>ladspa_bf2cube1</gst:value>
        </gst:param>
        <gst:pad>
          <gst:name>Input--W-</gst:name>
          <gst:peer>ladspa_encode_bformat1.Output--W-</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>Input--X-</gst:name>
          <gst:peer>ladspa_encode_bformat1.Output--X-</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>Input--Y-</gst:name>
          <gst:peer>ladspa_encode_bformat1.Output--Y-</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>Input--Z-</gst:name>
          <gst:peer>ladspa_encode_bformat1.Output--Z-</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>Output--Base-Front-Left-</gst:name>
          <gst:peer>alsasink1.sink0</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>Output--Base-Front-Right-</gst:name>
          <gst:peer>alsasink1.sink1</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>Output--Base-Back-Left-</gst:name>
          <gst:peer>alsasink1.sink2</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>Output--Base-Back-Right-</gst:name>
          <gst:peer>alsasink1.sink3</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>Output--Top-Front-Left-</gst:name>
          <gst:peer>alsasink1.sink4</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>Output--Top-Front-Right-</gst:name>
          <gst:peer>alsasink1.sink5</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>Output--Top-Back-Left-</gst:name>
          <gst:peer>alsasink1.sink6</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>Output--Top-Back-Right-</gst:name>
          <gst:peer>alsasink1.sink7</gst:peer>
        </gst:pad>
      </gst:element>
      <gst:element>
        <gst:name>stereo2mono1</gst:name>
        <gst:type>stereo2mono</gst:type>
        <gst:version>0.4.0.1</gst:version>
        <gst:param>
          <gst:name>name</gst:name>
          <gst:value>stereo2mono1</gst:value>
        </gst:param>
        <gst:pad>
          <gst:name>sink</gst:name>
          <gst:peer></gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>src</gst:name>
          <gst:peer></gst:peer>
        </gst:pad>
      </gst:element>
      <gst:element>
        <gst:name>adder1</gst:name>
        <gst:type>adder</gst:type>
        <gst:version>0.4.0.1</gst:version>
        <gst:param>
          <gst:name>name</gst:name>
          <gst:value>adder1</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>num-pads</gst:name>
          <gst:value>2</gst:value>
        </gst:param>
        <gst:pad>
          <gst:name>src</gst:name>
          <gst:peer>ladspa_encode_bformat1.Input</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>sink0</gst:name>
          <gst:peer>ladspa_freeverb31.Output--Left-</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>sink1</gst:name>
          <gst:peer>ladspa_freeverb31.Output--Right-</gst:peer>
        </gst:pad>
      </gst:element>
      <gst:element>
        <gst:name>alsasink1</gst:name>
        <gst:type>alsasink</gst:type>
        <gst:version>0.4.0.1</gst:version>
        <gst:param>
          <gst:name>name</gst:name>
          <gst:value>alsasink1</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>device</gst:name>
          <gst:value>default</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>format</gst:name>
          <gst:value>-1</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>channels</gst:name>
          <gst:value>8</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>rate</gst:name>
          <gst:value>44100</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>period-count</gst:name>
          <gst:value>2</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>period-frames</gst:name>
          <gst:value>8192</gst:value>
        </gst:param>
        <gst:param>
          <gst:name>debug</gst:name>
          <gst:value>FALSE</gst:value>
        </gst:param>
        <gst:pad>
          <gst:name>sink0</gst:name>
          <gst:peer>ladspa_bf2cube1.Output--Base-Front-Left-</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>sink1</gst:name>
          <gst:peer>ladspa_bf2cube1.Output--Base-Front-Right-</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>sink2</gst:name>
          <gst:peer>ladspa_bf2cube1.Output--Base-Back-Left-</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>sink3</gst:name>
          <gst:peer>ladspa_bf2cube1.Output--Base-Back-Right-</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>sink4</gst:name>
          <gst:peer>ladspa_bf2cube1.Output--Top-Front-Left-</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>sink5</gst:name>
          <gst:peer>ladspa_bf2cube1.Output--Top-Front-Right-</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>sink6</gst:name>
          <gst:peer>ladspa_bf2cube1.Output--Top-Back-Left-</gst:peer>
        </gst:pad>
        <gst:pad>
          <gst:name>sink7</gst:name>
          <gst:peer>ladspa_bf2cube1.Output--Top-Back-Right-</gst:peer>
        </gst:pad>
      </gst:element>
    </gst:children>
  </gst:element>
</gstreamer>


More information about the gstreamer-devel mailing list