Changeset dea34a1


Ignore:
Timestamp:
Jul 27, 2012, 6:37:38 PM (12 years ago)
Author:
Paul Brossier <piem@piem.org>
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:
85ebab8, fc197b0
Parents:
0c83de6
Message:

src/spectral/tss.c: clarify

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/spectral/tss.c

    r0c83de6 rdea34a1  
    6161    theta2[j] = theta1[j];
    6262    theta1[j] = input->phas[j];
    63   }
    6463
    65   for (j=0;j<nbins; j++){
    6664    /* transient analysis */
    6765    test = (ABS(dev[j]) > parm*oft1[j]);
    6866    trans->norm[j] = input->norm[j] * test;
    6967    trans->phas[j] = input->phas[j] * test;
    70   }
    7168
    72   for (j=0;j<nbins; j++){
    7369    /* steady state analysis */
    7470    test = (ABS(dev[j]) < parm*oft2[j]);
     
    7672    stead->phas[j] = input->phas[j] * test;
    7773
    78     /*increase sstate probability for sines */
     74    /*increase probability for transient */
    7975    test = (trans->norm[j]==0.);
    8076    oft1[j]  = test;
     77    test = (trans->norm[j]>0.);
     78    oft1[j] += alpha*test;
     79    test = (oft1[j]>1. && trans->norm[j]>0.);
     80    oft1[j] += beta*test;
     81
     82    /*increase probability for steady states */
    8183    test = (stead->norm[j]==0.);
    8284    oft2[j]  = test;
    83     test = (trans->norm[j]>0.);
    84     oft1[j] += alpha*test;
    8585    test = (stead->norm[j]>0.);
    8686    oft2[j] += alpha*test;
    87     test = (oft1[j]>1. && trans->norm[j]>0.);
    88     oft1[j] += beta*test;
    8987    test = (oft2[j]>1. && stead->norm[j]>0.);
    9088    oft2[j] += beta*test;
Note: See TracChangeset for help on using the changeset viewer.