Effacer les filtres
Effacer les filtres

How do I convert a multichannel .mat to .wav

4 vues (au cours des 30 derniers jours)
Oli
Oli le 26 Fév 2024
Commenté : Oli le 26 Fév 2024
I would like to convert a 2 x 24 channel binaural room impulse response (BRIR) for Atmos into .wav audio file.
I am a Matlab illiterate and could not get audiowrite to do it.
This is the format of the BRIR:
brir 65536x2x24 double 65536x2x24 double
After some trying I ended up with
audiowrite('/MATLAB Drive/angle_0.wav', brir, Fs, 'BitsPerSample',nBits, 'Comment','Surrey BRIR Azimut0');
Error using audiowrite
Data must be a 1-D or 2-D numeric array.
How can I do it?

Réponse acceptée

jibrahim
jibrahim le 26 Fév 2024
First reshape brir to a 2-D array:
brir = reshape(brir,size(brir,1),[]);
audiowrite('/MATLAB Drive/angle_0.wav', brir, Fs, 'BitsPerSample',nBits, 'Comment','Surrey BRIR Azimut0');
  1 commentaire
Oli
Oli le 26 Fév 2024
Great! Thanks a lot.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Audio I/O and Waveform Generation dans Help Center et File Exchange

Produits


Version

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by