XML
这个格式用于表示位置的文件。
hark_xml
- 用途:所有HARK XML文件格式的根节点。
- 属性:hark_xml有强制属性版本(mandatory attribute version?)
- 字节点:config,positions,neighbors,channels
config
- 用途:XML文件通用的描述
- 属性:没有属性
- 子节点:有以下可选子节点。除了comment外所有的节点都是用于一个transfer function file。
- comment:文件的描述,任意字符串
- SynchronousAverage:转移功能(transfer function measurement)的信号的重复次数。一个自然数
- TSPpath:TSP信号的音频文件的路径,字符串
- TSPOffset:transfer function计算的偏移量,自然数
- PeakSearch:两个属性:from跟to。这个信息是用来计算峰顶与峰谷的差(?)。必须的属性,而且一定要是自然数
- nfft:transfer function calculation的傅立业变换的长的
- samplingRate:transfer function measuremeent的记录信号的采集速度。自然数,通常是16000Hz
- signalMax:transfer function measuremeent的记录信号的振幅。自然数,如果波形样本的宽度是16位,那这个值一定是32767
- TSPLength:???
positions
- 用途:代表一套位置
- 属性:
- type:强制行的,用来声明位置的类型
- noise:噪声位置
- microphone:麦克风的位置
- source:定位的声源的位置
- tsp:TSP录音文件的位置
- impluse:脉冲回应文件(impluse response files)的位置
- noise:噪声位置
- coordinate:强制性的,表示位置的坐标系统。这个值一定是迪卡尔坐标或角坐标
- frame:可选,
- type:强制行的,用来声明位置的类型
- 子节点:前两个是必须的。
- id:每个位置节点具有的独特的数字
- path:位置对应的路径
- If coordinate=”cartesian” :单位mm
- If coordinate=”polar”:属性是azimuth方位,elevation海拔,radius半径。前两个单位是度,半径单位mm
neighbors
- 用途:表示位置节点之间的相邻关系
- 属性:强制属性是algorithm。表示计算位置的邻居的算法。通常只有NearestNeighbor是可用的。该算法基于欧级里德距离计算。
- 字节点:id:他自己的id。/ids:他跟他邻居的id。比如下面表示它自己id为1,邻居为2
<neighbor id="1" ids="1;2"/>
XML文件格式样本
<hark_xml version="1.3">
<config>
<comment>Test file</comment>
<SynchronousAverage>16</SynchronousAverage>
<TSPpath>/home/tsp.wav</TSPpath>
<TSPOffset>2</TSPOffset>
<PeakSearch from="0" to="100"/>
<nfft>1024</nfft>
<samplingRate>0</samplingRate>
<signalMax>0</signalMax>
<TSPLength>0</TSPLength>
</config>
<positions type="tsp" coordinate="cartesian">
<position x="0.100" y="0.100" z="0.100" id="0" path="/home/tsp1.wav"/>
<position x="0.150" y="0.100" z="0.100" id="1" path="/home/tsp2.wav"/>
<position x="0.200" y="0.200" z="0.200" id="2" path="/home/tsp3.wav"/>
</positions>
<neighbors algorithm="NearestNeighbor">
<neighbor id="0" ids="0;1;2;"/>
<neighbor id="1" ids="1;0;2;"/>
<neighbor id="2" ids="2;1;0;"/>
</neighbors>
</hark_xml>
Matrix Binary Format二进制矩阵格式
这格式代表了一个转移函数的矩阵,下图
一开始32字节,一个字符串表明该文件是矩阵二进制文件。第二个32字节,一个字符串表明了内容的数据类型。支持的数据类型有int32,float32,complex(4字节int,4字节float)
Zip Format
该文件格式代表一套组合信息。比如一个表示所有方向的转移方程的定位用的转移方程文件(?This file format represents a compound information such as a transfer function file for localization which represents This file format represents a compoutransfer functions for all directions. )一个转移方程包含多种信息。比如microphone的位置,source的位置,转移方程本身。zip format将他们全部结合进一个文件,同时用一个目录树(directory tree)来表示他们之间的关系。