- Timestamp:
- Mar 13, 2013, 7:25:01 PM (12 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 376946a
- Parents:
- c25d5b5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/spectral/phasevoc.c
rc25d5b5 r9778d9a 112 112 { 113 113 uint_t i; 114 for (i =0;i<win_s-hop_s;i++)114 for (i = 0; i < win_s - hop_s; i++) 115 115 data[i] = dataold[i]; 116 for (i =0;i<hop_s;i++)117 data[win_s -hop_s+i] = datanew[i];118 for (i =0;i<win_s-hop_s;i++)119 dataold[i] = data[i +hop_s];116 for (i = 0; i < hop_s; i++) 117 data[win_s - hop_s + i] = datanew[i]; 118 for (i = 0; i < win_s - hop_s; i++) 119 dataold[i] = data[i + hop_s]; 120 120 } 121 121 … … 124 124 { 125 125 uint_t i; 126 smpl_t scale = 2 *hop_s/(win_s+.0);126 smpl_t scale = 2 * hop_s / (win_s + .0); 127 127 /* add new synth to old one and put result in synthnew */ 128 for (i =0;i<hop_s;i++)129 synthnew[i] = synthold[i] +synth[i]*scale;128 for (i = 0; i < hop_s; i++) 129 synthnew[i] = synthold[i] + synth[i] * scale; 130 130 /* shift synthold */ 131 for (i =0;i<win_s-2*hop_s;i++)132 synthold[i] = synthold[i +hop_s];131 for (i = 0; i < win_s - 2 * hop_s; i++) 132 synthold[i] = synthold[i + hop_s]; 133 133 /* erase last frame in synthold */ 134 for (i =win_s-hop_s;i<win_s;i++)135 synthold[i -hop_s]=0.;134 for (i = win_s - hop_s; i < win_s; i++) 135 synthold[i - hop_s] = 0.; 136 136 /* additive synth */ 137 for (i =0;i<win_s-hop_s;i++)138 synthold[i] += synth[i +hop_s]*scale;137 for (i = 0; i < win_s - hop_s; i++) 138 synthold[i] += synth[i + hop_s] * scale; 139 139 } 140 140
Note: See TracChangeset
for help on using the changeset viewer.