void EnterState_SendI(bool dropMode = false)
 {
     m_random.setSeed( CUseTrueRandom ? time(0) : 35654);
     m_state = SEND_I;
     GenerateParam(dropMode);
     ResetState();                      
 }
void make_parameter()
{
   Model *m;
   Tree *t;
   int state, nframe, i, sid;

   m = mhead;
   nframe = 0;
   for (;;)
     {
/* search pdfs */
       state = 2;
       sid = m->phoneme->sid;
       if ((m->pitchpdf = (char **) calloc (nstate, sizeof (char *))) == NULL)
         {
           ErrMsg("Memory allocation error !  (in make_parameter)\n");
           restart(1);
         }

       if ((m->pitchmean = (float **) calloc (nstate, sizeof (float *))) == NULL)
         {
           ErrMsg("Memory allocation error !  (in make_parameter)\n");
           restart(1);
         }

       if ((m->pitchvariance = (float **) calloc (nstate, sizeof (float *))) == NULL)
         {
           ErrMsg("Memory allocation error !  (in make_parameter)\n");
           restart(1);
         }

       if ((m->voiced = (Boolean *) calloc (nstate, sizeof (Boolean))) == NULL)
         {
           ErrMsg("Memory allocation error !  (in make_parameter)\n");
           restart(1);
         }

 
       m->pitchpdf -= 2;
       m->pitchmean -= 2;
       m->pitchvariance -= 2;
       m->voiced -= 2;
       for (t = mset[sid].thead[PITCH]; t != mset[sid].ttail[PITCH]; t = t->next)
         {
            m->pitchpdf[state] = strdup (TraverseTree (m->name,
                                                           t->parent));
            SearchPitchPDF (m, state, sid);
            state++;
          }

       state = 2;
       if ((m->mceppdf = (char **) calloc (nstate, sizeof (char *))) == NULL )
         {
           ErrMsg("Memory allocation error !  (in make_parameter)\n");
           restart(1);
         }

       if ((m->mcepmean = (float **) calloc (nstate, sizeof (float *))) == NULL)
         {
           ErrMsg("Memory allocation error !  (in make_parameter)\n");
           restart(1);
         }

       if ((m->mcepvariance = (float **) calloc (nstate, sizeof (float *))) == NULL)
         {
           ErrMsg("Memory allocation error !  (in make_parameter)\n");
           restart(1);
         }

       m->mceppdf -= 2;
       m->mcepmean -= 2;
       m->mcepvariance -= 2;
       for (t = mset[sid].thead[MCEP]; t != mset[sid].ttail[MCEP]; t = t -> next)
         {
           m->mceppdf[state] = strdup (TraverseTree (m->name,
                                                         t->parent));
           SearchMcepPDF (m, state, sid);
           state++;
         }
#ifdef DEBUG
       TmpMsg("%d %d %s\n", nframe, nframe + m->totalduration, m->name);
#endif
       nframe += m->totalduration;
       if (m == mtail) break;
       m = m->next;
     }

/* parameter generation */
     totalframe = nframe;
     f0.rate = FRAME_RATE;
     if ((f0.data = (double *) calloc (totalframe + 1, sizeof (double))) == NULL)
       {
         ErrMsg("Memory allocation error !  (in make_parameter)\n");
         restart(1);
       }

     power.rate = FRAME_RATE;
     if ((power.data = (double *) calloc (totalframe + 1, sizeof (double))) == NULL)
       {
         ErrMsg("Memory allocation error !  (in make_parameter)\n");
         restart(1);
       }

     alpha.rate = FRAME_RATE;
     if ((alpha.data = (double *) calloc (totalframe + 1, sizeof (double))) == NULL)
       {
         ErrMsg("Memory allocation error !  (in make_parameter)\n");
         restart(1);
       }


     if ((mcep = (double **) calloc (totalframe + 1, sizeof (double *))) == NULL)
       {
         ErrMsg("Memory allocation error !  (in make_parameter)\n");
         restart(1);
       }

     if ((coeff = (double **) calloc (totalframe + 1, sizeof (double *))) == NULL)
       {
         ErrMsg("Memory allocation error !  (in make_parameter)\n");
         restart(1);
       }

     if ((voiced = (Boolean *) calloc (totalframe +1, sizeof (Boolean))) == NULL)
       {
         ErrMsg("Memory allocation error !  (in make_parameter)\n");
         restart(1);
       }

     for (i=0; i <= totalframe; i++)
       {
         if ((mcep[i] = (double *) calloc (mceppst.order + 1, sizeof (double))) == NULL)
           {
             ErrMsg("Memory allocation error !  (in make_parameter)\n");
             restart(1);
           }

         if ((coeff[i] = (double *) calloc (mceppst.order + 1, sizeof (double))) == NULL)
           {
             ErrMsg("Memory allocation error !  (in make_parameter)\n");
             restart(1);
           }

 
       }
     GenerateParam(stdout);
/*
     for (i=0; i <= totalframe; i++)
     	f0.data[i] = (f0.data[i] == 0.0)? 0:f0.data[i]+log(2.0);
*/
}
 void EnterState_SendU()
 {
     m_state = SEND_U;
     GenerateParam();                      
     ResetState();                      
 }