• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

sofacoustics/SOFAtoolbox: SOFA Toolbox (API for Matlab, Octave)

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

sofacoustics/SOFAtoolbox

开源软件地址(OpenSource Url):

https://github.com/sofacoustics/SOFAtoolbox

开源编程语言(OpenSource Language):

MATLAB 82.1%

开源软件介绍(OpenSource Introduction):

SOFA - Spatially Oriented Format for Acoustics

SOFA is a file format for reading, saving, and describing spatially oriented data of acoustic systems.

Examples of data we consider are head-related transfer functions (HRTFs), binaural room impulse responses (BRIRs), multichannel measurements such as done with microphone arrays, or directionality data of loudspeakers.

The format specification is the major focus of SOFA, but we also aim in providing toolboxes for reading and writing the data in SOFA. For more information on the format specifications and available data, see http://www.sofaconventions.org/.

This project implements a reference toolbox for SOFA: The SOFA Toolbox.

SOFA Toolbox 2.x implements SOFA versions 2.x. The SOFA Toolbox has been previously known as the SOFA API_MO, which supported SOFA versions up to 1.x.

Downloads

Current releases of SOFA Toolbox can be found on its old home.

Note:

  • The currently latest release is known as the SOFA API M/O version 1.1.3.
  • The SOFA Toolbox 2.0 has never been released.
  • The SOFA Toolbox 2.1 is currently under preparation. It will support SOFA 2.1 as known as AES69-2022.

Usage

Matlab/Octave

In order to use SOFA with Matlab or Octave add its SOFAtoolbox folder to your search paths. After that you can play around with your acoustic measurements as shown by the following example which uses a HRTF measurement.

%% put your information here:
hrtf = SOFAload('path/to_your/HRTF.sofa');
soundInput = audioread('path/to_your/fancy_audio_file.wav');

%% demo script
% Start SOFA
SOFAstart;
% Display some information about the impulse response
SOFAinfo(hrtf);
% Plot a figure with the measurement setup
SOFAplotGeometry(hrtf);
% Have a look at the size of the data
disp(['size [MxRxN]: ' num2str(size(hrtf.Data.IR))])
% Calculate the source position from a listener point of view
apparentSourceVector = SOFAcalculateAPV(hrtf);
% Listen to the HRTF with azimuth of -90°
apparentSourceVector(91, 1)
SOFAplotGeometry(hrtf, 91);
soundOutput = [conv(squeeze(hrtf.Data.IR(91, 1, :)), soundInput) ...
               conv(squeeze(hrtf.Data.IR(91, 2, :)), soundInput)];
sound(soundOutput, hrtf.Data.SamplingRate);



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap