Changes between Version 3 and Version 4 of DSP/Interpolation
- Timestamp:
- Aug 4, 2015, 7:00:27 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DSP/Interpolation
v3 v4 53 53 Go back to the original .WAV File and listen to the audio. Then listen to the output file and notice the difference and effects of upsampling an audio sample. 54 54 == Interpolation of a Sinusoidal Wave with Octave == 55 To start off make a simple sine wave 56 {{{ 57 signal = sin(2*pi*3.*[0:.01:1]); 58 plot(signal); 59 }}} 60 [[Image(sine.png, 500px)]] 55 61 62 Then continue by entering 63 {{{ 64 signal_zeropadded = [signal;zeros(3,length(signal))]; 65 signal_zeropadded = signal_zeropadded(:); 66 pkg load signal 67 b = fir1(10,.12); 68 signal_interpolated=filter(b,1,signal_zeropadded); 69 plot(signal_interpolated) 70 }}} 71 [[Image(sine_interpolated.png, 500px)]] 72 == Interpolation of a .WAV File with Octave == 73 {{{ 74 [signal, fs] = auload("island(1).wav"); 75 signal_zeropadded = [signal;zeros(3,length(fs))]; 76 signal_zeropadded = signal_zeropadded(:); 77 pkg load signal 78 b = fir1(10,.12); 79 signal_interpolated = filter(b,1,signal_zeropadded); 80 plot(signal_interpolated) 81 }}} 56 82 83 The plot should look like 84 85 [[Image(sig_interpolated.png, 500px)]] 86 87 Then to save the interpolated signal as a .WAV file with the following command 88 {{{ 89 wavwrite(signal_interpolated, 'islands.wav'); 90 }}} 57 91 == Troubleshooting == 58 92 … … 81 115 and should see the following 82 116 83 [[Image(pkglist.png, 650px)]]117 [[Image(pkglist.png, 500px)]] 84 118 85 119 … … 93 127 If you receive the following error 94 128 95 [[Image(fir1_err.png, 650px)]]129 [[Image(fir1_err.png, 500px)]] 96 130 97 131 you will need to install the signal package. … … 104 138 105 139 If you receive the following error: 106 [[Image(signal_err.png, 650px)]] 140 141 [[Image(signal_err.png, 500px)]] 142 107 143 you will need to install the control package with the command 108 144 {{{