Coder Social home page Coder Social logo

andronicus1000 / mcroomsim Goto Github PK

View Code? Open in Web Editor NEW
49.0 4.0 13.0 27.75 MB

Room acoustics simulator for multichannel microphone arrays

License: Other

MATLAB 100.00%
room-acoustics-simulation multichannel-microphone-arrays reverberation hrtf

mcroomsim's Introduction

MCRoomSim

MultiChannel Room Simulator
This is the new home for MCRoomSim since the original link has died.

MCRoomSim is a multichannel shoebox room acoustics simulator that enables simulation of multichannel microphone arrays, HRTFs and spherical harmonic expansions in reverberant environments. It operates as an extension function to MATLAB (mex). Please refer to MCRoomSim.m for info about the simulator.

Windows users may need to install Microsoft Visual C++ Redistributable Package prior to running. This package is available for download from the Microsoft website.

To configure the simulator use the suite of high level functions:

  • AddSource: Creates and configures a new source to add to the simulation.
  • AddReceiver: Creates and configures a new receiver to add to the simulation.
  • SetupRoom: Configures room properties (size, absorption, diffusion, etc.).
  • MCRoomSimOptions: Configures general parameters.
  • RunMCRoomSim: Takes the outputs of the above four functions, combines them into an input structure that MCRoomSim accepts and then runs MCRoomSim.

Auxiliary functions are also provided

  • AirAbsorption: Compute ISO standard frequency dependent air absorption values.
  • BandPassFilter: Filter signals into octave or third-octave bands.
  • Clap: Convolve impulse responses with a clap sound and play it back.
  • EarlyDecayTime: Calculate the Early Decay Times from a set of impulse responses.
  • EyringKuttruffReverberationTime: Calculate the reverberation time of the room described by the 'Room' configuration structure using the Eyring-Kuttruff formula.
  • FitzroyKuttruffReverberationTime: Calculate the reverberation time of the room described by the 'Room' configuration structure using the Fitzroy-Kuttruff formula. This formula is supposed to give slightly better results than the Eyring formula when the wall absorptions are uneven (e.g. more absorbant floor and ceiling).
  • GenSHIndices: Generate a 2 column vector that show the mapping of source/receiver channels to spherical harmonic components, as used in MCRoomSim.
  • MusicalClarity: Calculate the Musical Clarity Index (C80) from a set of impulse responses.
  • PlotSimSetup: Plots a 3D room with the source and receiver positions as well as indicating their orientation.
  • ReverberationTime: Calculate the reverberation times (T30) from a set of impulse responses.
  • SchroederCurve: Calculate the Schroeder curves from a set of impulse responses.
  • SpeechClarity: Calculate the Speech Clarity Index (C50) from a set of impulse responses.

If you use this software as part of your research, please cite our paper:
Room acoustics simulation for multichannel microphone arrays
A. Wabnitz, N. Epain, C. Jin and A. van Schaik, in Proceedings of the International Symposium on Room Acoustics (ISRA), Melbourne Australia, August 2010

mcroomsim's People

Contributors

andronicus1000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mcroomsim's Issues

Help

My system is MAC or Ubuntu, I want to recompile a mexw64 file, where can I find this cpp file?

crop leading zeros and trailing zeros

Hello! Thanks for this great library. I've seen many simulation libraries but none of them include the simulation of scattering. Your inclusion of scattering is really useful.

I have a question though. When I simulated 1000 RIRs with 40 microphones and 25 sources, the resulting RIRs are quite long (~21 seconds). However, when I only simulated 6 RIRs in the same room, the resulting RIRs are much shorter. I'm sure this is not because of the source-receiver distance or the room parameters. Then I found that basically after 3s, the remaining samples almost have a 0 amplitude. I set AutoCrop to false because I want to keep the leading zeros in favor of a fair direct sound arrival time simulation, but at the same time I also have to keep the trailing zeros in the current code...

I was wondering whether you could share the source code of MCRoomSim.mexw64 so that I could change the code a little bit to fit my use (keep leading zeros while cropping trailing zeros)? If the code could not be shared, could you kindly update this zero cropping function in your original code?

Thanks a lot in advance.

frequency response is only up to 15khz when the sampling rate is 96khz

Hello! I found an issue when checking the output RIR. In MCRoomSimOption.m, I set the sampling rate as 96khz, but when I checked the resulting RIR, its uppermost frequency in the spectrum is only about 15khz. At the same time, I found that this issue might be due to the far distance between the source and the receiver.

I tried to solve this issue by setting the parameter MinImgSrc and MinRayEngy to very low levels, -150 and -200, respectively, but the uppermost frequency in the response doesnt change. Do you recommend any solution to this issue? I was wondering whether you could update the addSource function with an overall gain paramter for all kinds of directivities, so that the source energy can be larger.

Thanks.

MEX-file Error

I get a MEX error (shown below) when trying to use the RunMCRoom() function. Any idea what might be the cause?

Screen Shot 2021-08-12 at 3 22 37 PM

MCRoomSim in Linux environment

I would start by saying thanks for making the acoustic simulator available to the community.

Related to Issue #1 , is there any way to run the MCRoomSim on a Linux environment?

Thanks in advance for your help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.