model_ = zeros(frames, max_amp+2);
voicing_ = zeros(1,frames);
H = zeros(frames, max_amp);
+ model_(1,1) = Wo_left = 2*pi/100;
+ voicing_left = 0;
+ left_vec = zeros(1,K);
+
for f=1:M:frames
if voicing(f)
index = encode_log_Wo(model(f,1), 6);
end
if f > M
- Wo1 = model_(f-M,1);
- Wo2 = model_(f,1);
- [Wo_ avoicing_] = interp_Wo_v(Wo1, Wo2, voicing(f-M), voicing(f));
+ %Wo1 = model_(f-M,1);
+ Wo_right = model_(f,1);
+ voicing_right = voicing(f);
+ [Wo_ avoicing_] = interp_Wo_v(Wo_left, Wo_right, voicing_left, voicing_right);
model_(f-M:f-1,1) = Wo_;
voicing_(f-M:f-1) = avoicing_;
model_(f-M:f-1,2) = floor(pi ./ model_(f-M:f-1,1)); % calculate L for each interpolated Wo
- left_vec = rate_K_surface_(f-M,:);
+ %left_vec = rate_K_surface_(f-M,:);
right_vec = rate_K_surface_(f,:);
sample_points = [f-M f];
resample_points = f-M:f-1;
end
end
+
+ % update for next time
+
+ Wo_left = Wo_right;
+ voicing_left = voicing_right;
+ left_vec = right_vec;
end
end
float Wo_left;
int voicing_left;
+ /*
for(k=0; k<K; k++)
prev_rate_K_vec_[k] = rate_K_surface_[0][k];
}
Wo_left = model_octave_[0][0];
+ */
+
+ for(k=0; k<K; k++)
+ prev_rate_K_vec_[k] = 0.0;
+ voicing_left = 0;
+ Wo_left = 2.0*M_PI/100.0;
for(f=0; f<FRAMES; f+=M) {
phase_fft_inv_cfg,
&indexes[f][0]);
+ /* store test vectors */
+
for(i=f-M, m=0; i<f; i++,m++) {
model_octave_[i][0] = model__[m].Wo;
model_octave_[i][1] = model__[m].L;
voicing_[i] = model__[m].voiced;
}
- /* back to rate L, synth phase */
-
int j;
for(i=f-M, j=0; i<f; i++,j++) {
for(m=1; m<=model__[j].L; m++) {
- model_octave_[i][m+1] = model__[j].A[m]; // = model_.A[m];
+ model_octave_[i][m+1] = model__[j].A[m];
H[i][m-1] = HH[j][m];// aH[m];
}
}