Frequency inversion audio scrambling

조회 수: 2 (최근 30일)
John Lynn
John Lynn 2015년 8월 6일
댓글: Walter Roberson 2015년 8월 8일
Hey everyone. I'm working on a project for my discrete systems class that involves scrambling an audio file (music) and transmitting to another computer to be unscrambled, equalized, and filtered. He specifically mentions using the frequency inversion technique and I'm having a bit of trouble with the output. I've been searching around for several days but haven't been able to find an answer. My code is still a work in progress but the process I'm doing is as follows:
1. read the audio file into matlab
2. normalize the audio data
3. transpose to match the audio array
4. fft
5. multiply with a vector of alternating 1,-1,1,-1,1,-1....
6. real(ifft())
7. normalize
8. play using soundsc()
The problem I'm running into is that the audio that plays is really really quiet, if I hold my speaker right up to the microphone I can unscramble it but I'm supposed to transmit around 5m away and filter noise. Anybody have any ideas as to why this audio is so quiet?

답변 (1개)

Walter Roberson
Walter Roberson 2015년 8월 6일
Remember to take into account the complex conjugate symmetry of the points after the first in the fft result; otherwise when you ifft back you are going to get a complex signal.
  댓글 수: 2
John Lynn
John Lynn 2015년 8월 7일
So what does that actually mean in terms of the audio playback? We've never covered any material about this and my professor just took off to speak at a conference almost 3 weeks ago and isn't responding to communication.. Our textbook doesn't seem to have anything helpful either. haha
Walter Roberson
Walter Roberson 2015년 8월 8일
Some of the power could be associated with the complex part of the resulting signal if your altered fft does not come out in the proper form.
Sample multiplication pattern:
A B C D
1, 1 -1 1 -1 1 -1, 1, -1 1 -1 1 -1 1
A: 1.0 so you do not change the first entry
B: alternating pattern of 1 and -1
D: same pattern as B but exactly reversed
C: the original signal length is even then after you take the first entry out of consideration, what remains would be odd length. B and D together would be an even length. C is then needed to leave the value in the middle as-is. But if the original signal length is odd, then after you take the first entry out of consideration, what remains would be an even length, in which case B and D together would exactly cover it, and you would leave out C

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by