How to create a huge wav file containing multiple tracks?

2 ビュー (過去 30 日間)
Roman
Roman 2014 年 12 月 12 日
回答済み: Roman 2014 年 12 月 15 日
I recorded five audio tracks (48kHz, 32bit, 1h) which I would like to write into one file with 5 channels à (48kHz, 32bit, 1h). When I simply read the tracks with audioread , I run out of memory. Using system objects didn't help as it turned out that dsp.AudioFileWriter does not allow to write more than two channels at once. Is there another technique how I could achieve that?
  1 件のコメント
Roman
Roman 2014 年 12 月 12 日
In version R2013b dsp.AudioFileWriter can handle more than 2 channels. However, if I copy one channel with the system object approach as shown below,
hafw = dsp.AudioFileWriter(RecFile,'FileFormat','WAV','SampleRate',hafr0.SampleRate);
hafr0 = dsp.AudioFileReader(PlayFile0,'SamplesPerFrame',SamplesPerFrame);
playbuff = zeros(SamplesPerFrame,5);
while ~isDone(hafr0)
playbuff(:,1) = step(hafr0);
step(hafw,playbuff);
end
I get the following error after some time:
Error using AudioFileReader/step the audio input stream has become unresponsive.
Error in combine (line 31) playbuff(:,1) = step(hafr0);
Any idea what could have gone wrong?

サインインしてコメントする。

採用された回答

Roman
Roman 2014 年 12 月 15 日
I couldn't solve the problem right in Matlab but with "SoX, the Swiss Army knife of sound processing programs" I was able to merge the tracks.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAudio I/O and Waveform Generation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by