Write .wav file , from buffer ?

2 visualizzazioni (ultimi 30 giorni)
I Made
I Made il 15 Mar 2013
How to convert back after using buffer function on a signal, e.g i have code
f=wavread('example.wav',native);
leftchanel=f(1:size(f),1);
rightchanel=f(1:size(f),2);
segment=buffer(leftchanel,512);
how do i convert back "segment" into "leftchanel" ? then what to do to combine the "leftchanel" and "rightchanel" back and rewrite it back to .wav file again? because :
wavwrite(y,filename);
only above write to wav code i can find, there is no chanel parameter in it? am i supposed to combine "rightchanel" and "leftchanel" into "f" first?

Risposta accettata

Walter Roberson
Walter Roberson il 15 Mar 2013
newleftchannel = segment(:);
newrightchannel = .... ?? %a column vector
wavwrite( [newleftchannel, newrightchannel], filename );
  1 Commento
I Made
I Made il 16 Mar 2013
I actually figured it out myself a little different using for loop to combine it, but yours work great too. Thanks :D

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Audio Processing Algorithm Design in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by