How to create a huge wav file containing multiple tracks?

2 Ansichten (letzte 30 Tage)
Roman
Roman am 12 Dez. 2014
Beantwortet: Roman am 15 Dez. 2014
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 Kommentar
Roman
Roman am 12 Dez. 2014
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?

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Roman
Roman am 15 Dez. 2014
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.

Weitere Antworten (0)

Kategorien

Mehr zu Audio I/O and Waveform Generation finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by