Frequency inversion audio scrambling
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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?
0 Kommentare
Antworten (1)
Walter Roberson
am 6 Aug. 2015
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 Kommentare
Walter Roberson
am 8 Aug. 2015
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
Siehe auch
Kategorien
Mehr zu Fourier Analysis and Filtering 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!