how to invert the samples of a audio signal

62 ビュー (過去 30 日間)
ramya
ramya 2011 年 3 月 20 日
コメント済み: Walter Roberson 2017 年 4 月 8 日
hi friends....how to invert the samples of an audio signal using fliplr statement in matlab.

回答 (6 件)

ramya
ramya 2011 年 3 月 20 日
by using fliplr statement we can invert the samples.but for an audio signal it is not possible.can u plz give me suggestion how to invert the samples of an audio signal...plzzzzzzzzzzzz
  5 件のコメント
Paulo Silva
Paulo Silva 2011 年 3 月 20 日
show us your code
ramya
ramya 2011 年 3 月 21 日
i hav got the ouput for the signal that i hav defined but im not getting the output for the audio signal(.wav file)

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


Walter Roberson
Walter Roberson 2011 年 3 月 20 日
Are you assigning the result of fliplr() to a variable? fliplr() returns a new array that is flipped, rather than affecting the existing array.
  1 件のコメント
ramya
ramya 2011 年 3 月 21 日
ha yes i assigned the result of filplr() to a variable but i cant get the output

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


Daniel Shub
Daniel Shub 2011 年 3 月 21 日
Are you sure you have row data and not column data. Have you tried flipud?

Alex
Alex 2011 年 3 月 21 日
Why do you want to invert an audio signal? An inverted signal will sound the same as the original.
Do you want to reverse the order of the samples?
  1 件のコメント
ramya
ramya 2011 年 3 月 21 日
ha yes i want the reverse order of the samples...

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


Walter Roberson
Walter Roberson 2012 年 6 月 29 日
Audio data is usually represented as by the columns of an array, rather than the rows of an arrow. Mono audio data would have only one column, so fliplr() applied to that column would be exactly the same as before. Stereo data would have two columns, so fliplr() applied to it would reverse the channels but only that. If you have column-oriented data and want to reverse the order of the samples, you need flipud() rather than fliplr()

Dipesh  Mudatkar
Dipesh Mudatkar 2017 年 4 月 8 日
編集済み: Walter Roberson 2017 年 4 月 8 日
Try this.
[y,fs]=audioread('put your audio file path'); % This will give you audio samples is y (It should be in row vector).
sound(y,fs); % Now listen it in correct ordered samples.
[m,n]=size(y);
if n==1 % If y is not row vector this convert it into row vector.
y=y';
end
y1=fliplr(y); % Now flip it and check audio.
sound(y1,fs); % Now, lest listen to your reverse audio.
  1 件のコメント
Walter Roberson
Walter Roberson 2017 年 4 月 8 日
audioread will return one column per channel, not rows.

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

カテゴリ

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