format jo application sur le temps

joris Abadiejoris Abadie


Lien pour entendre la sonnerie de téléphone créé au format son.jo
/**



/** 
*@projet audio au format jo 
*@ le format jo est un fichier de musique écrit en mode texte
*@imaginer et realiser par
*@Andre pierre jocelyn
*@andre@univ-montp2.fr
*@pierre.joc.andre@gmail.com
*@remerciements a
*@Frédéric Boulanger
*@frederic.boulanger@supelec.fr
*/

import
javax.sound.sampled.AudioFormat;
import
javax.sound.sampled.AudioSystem;
import
javax.sound.sampled.LineUnavailableException;
import
javax.sound.sampled.SourceDataLine;


public class LeO {

/** C ici que commence la construction
des ondes
* chaque onde devra avoir son propre
void, il suffit de copier coller 
*en remplaçant le numero de l'onde
pour en creer une nouvelle
*/
	
    static double Amp = 0.01;	// ici je
lie l'amplitude au nombre de boucle
    static double AmpA = 0.01;	// ici
je cree la forme de l'onde porter

//onde 1
  public static void face1(double
freq1, long duree1, SourceDataLine onde1) {


       AudioFormat jo1 =
onde1.getFormat();

       float TauxEchantillon1 =
jo1.getSampleRate();

       int tailletampon1 =
onde1.getBufferSize();

       int tailleEchantillon1 =
jo1.getSampleSizeInBits();
       int nbOctets = 0;  
       int valMax1 = 0;   
       if (tailleEchantillon1 == 8) {
       nbOctets = 1;   
       valMax1 = 0x7F;
       } else if (tailleEchantillon1 ==
16) {
       nbOctets = 2;   
       valMax1 = 0x7FFF;
       } else {
       throw new Error("# Nombre
de bits par echantillon non supporte : " + tailleEchantillon1);
       }
      
       boolean grandEndian1 =
jo1.isBigEndian();
    
      
      int nbEchantillons =
(int)Math.ceil((double)duree1 / 1000 * TauxEchantillon1);
    
      byte echantillonaudio1[] = new
byte[tailletampon1];
      int i = 0;
      while (i < nbEchantillons) {
      
      int j = 0;
      while ((j < tailletampon1) &&
(i < nbEchantillons)) {
      
        int val1 = (int)(valMax1 * 0.63
* base1(i++, freq1, TauxEchantillon1));
        if (nbOctets == 1) {
    
          echantillonaudio1[j++] =
(byte)val1;
        } else if (grandEndian1) {
       
          echantillonaudio1[j++] =
(byte)((val1 & 0xFF00) >> 8);
          echantillonaudio1[j++] =
(byte)(val1 & 0x00FF);
        } else {
      
          echantillonaudio1[j++] =
(byte)(val1 & 0x00FF);
          echantillonaudio1[j++] =
(byte)((val1 & 0xFF00) >> 8);
        }
        }
  
        onde1.write(echantillonaudio1,
0, j);
        }
        }
// fin onde 1

//debut onde 2
  
  public static void face2(double
freq2, long duree2, SourceDataLine onde2) {

	    AudioFormat jo2 =
onde2.getFormat();
	 
	    float TauxEchantillon2 =
jo2.getSampleRate();

	    int tailletampon2 =
onde2.getBufferSize();

	    int tailleEchantillon2 =
jo2.getSampleSizeInBits();
	    int nbOctets = 0;  
	    int valMax2 = 0;   
	    if (tailleEchantillon2 == 8) {
	      nbOctets = 1;    
	      valMax2 = 0x7F;
	    } else if (tailleEchantillon2 ==
16) {
	      nbOctets = 2;    
	      valMax2 = 0x7FFF;
	    } else {
	      throw new Error("# Nombre
de bits par echantillon non supporte : " + tailleEchantillon2);
	    }
	   
	    boolean grandEndian2 =
jo2.isBigEndian();
	   
	    int nbEchantillons =
(int)Math.ceil((double)duree2 / 1000 * TauxEchantillon2);
	    
	    byte echantillonaudio2[] = new
byte[tailletampon2];
	    int i = 0;
	    while (i < nbEchantillons) {
	     
	      int j = 0;
	      while ((j < tailletampon2) &&
(i < nbEchantillons)) {
	      
	        int val2 = (int)(valMax2 *
0.63 * base2(i++, freq2, TauxEchantillon2));
	        if (nbOctets == 1) {
	        
	          echantillonaudio2[j++] =
(byte)val2;
	        } else if (grandEndian2) {
	         
	          echantillonaudio2[j++] =
(byte)((val2 & 0xFF00) >> 8);
	          echantillonaudio2[j++] =
(byte)(val2 & 0x00FF);
	        } else {
	         
	          echantillonaudio2[j++] =
(byte)(val2 & 0x00FF);
	          echantillonaudio2[j++] =
(byte)((val2 & 0xFF00) >> 8);
	        }
	      }
	    
	      onde2.write(echantillonaudio2,
0, j);
	    }
	  }
//fin onde 2
  
//debut onde 3

  public static void face3(double
freq3, long duree3, SourceDataLine onde3) {

	  AudioFormat jo3 =
onde3.getFormat();

       float TauxEchantillon3 =
jo3.getSampleRate();

       int tailletampon3 =
onde3.getBufferSize();

       int tailleEchantillon3 =
jo3.getSampleSizeInBits();
       int nbOctets = 0;  
       int valMax3 = 0;   
       if (tailleEchantillon3 == 8) {
       nbOctets = 1;   
       valMax3 = 0x7F;
       } else if (tailleEchantillon3 ==
16) {
       nbOctets = 2;   
       valMax3 = 0x7FFF;
       } else {
       throw new Error("# Nombre
de bits par échantillon non supporté : " +
tailleEchantillon3);
       }
      
       boolean grandEndian3 =
jo3.isBigEndian();
    
      
      int nbEchantillons3 =
(int)Math.ceil((double)duree3 / 1000 * TauxEchantillon3);
    
      byte echantillonaudio3[] = new
byte[tailletampon3];
      int i = 0;
      while (i < nbEchantillons3) {
      
      int j = 0;
      while ((j < tailletampon3) &&
(i < nbEchantillons3)) {
      
        int val3 = (int)(valMax3 * 0.63
* base3(i++, freq3, TauxEchantillon3));
        if (nbOctets == 1) {
    
          echantillonaudio3[j++] =
(byte)val3;
        } else if (grandEndian3) {
       
          echantillonaudio3[j++] =
(byte)((val3 & 0xFF00) >> 8);
          echantillonaudio3[j++] =
(byte)(val3 & 0x00FF);
        } else {
      
          echantillonaudio3[j++] =
(byte)(val3 & 0x00FF);
          echantillonaudio3[j++] =
(byte)((val3 & 0xFF00) >> 8);
        }
        }
  
        onde3.write(echantillonaudio3,
0, j);
        }
        }
//fin onde 3

//ici nous indiquons quel va etre la
forme de chaque onde
//en exemple pour les voyelles nous
utilisons une fonction sinus
// pour les consonnes une fonction
exponentielle
//debut forme d'onde 1
  public static double base1(int i,
double freq1, double pourcentage1) {
  
    double temps1 =
Math.IEEEremainder(i/pourcentage1, 1/freq1);
 
    if (temps1 < 0) {
      temps1 += 1 / freq1;
    }

	    
    //  return (A *Math.sin(2 * Math.PI
* freq * temps1));
  //  return (A * Math.sin(2 * Math.PI
* freq * temps1));
 //   return Math.exp(t)*(0.50 *
Math.sin(freq * temps1 * Math.exp(1)));
 //     return ((Amp + 0.001 ) *
Math.exp(-0.39) * Math.sin( 2 * Math.PI * freq1 * temps1));
      return ((Amp + 0.0001 ) * 0.4 *
Math.sin( 2 * Math.PI * freq1 * temps1));
 //      return (0.3 * Math.sin(freq1 *
Math.exp(temps1)));
 //   return (A * Math.cos(2 * Math.PI
* freq1 * temps1 + 1 ) * Math.cos(2 * Math.PI * freq1 * temps1 +1));
	    }
	    
  //fin forme onde 1
 //debut forme d'onde 2
  public static double base2(int i,
double freq2, double pourcentage2) {
	  
	    double temps2 =
Math.IEEEremainder(i/pourcentage2, 1/freq2);
	 
	    if (temps2 < 0) {
	      temps2 += 1 / freq2;
	    }

	  //  return
Math.exp(temps2)*(Math.sin(freq * temps2 ));
	 //   return Math.exp(temps2)*(0.25 *
Math.sin(freq * temps2 * Math.exp(1)));
	  //  return (2 *A * Math.sin(2 *
Math.PI * freq * temps2));
	 //   return (2 * A * Math.sin(freq *
temps2 * Math.exp(1)));
    //      return ((AmpA + 0.001 ) *
Math.exp(-0.89) * Math.sin(2 * Math.PI * freq2 * temps2));
	    return (( AmpA + 0.0001 ) * 0.4 *
Math.sin(2 * Math.PI * freq2 * temps2));
//	    return (0.3 * Math.sin(freq2 *
Math.exp(temps2)));
//	    return (2 *A * Math.cos(2 *
Math.PI * freq2 * temps2 + 1) * Math.cos(2 * Math.PI * freq2 * temps2
+ 1));
	  }

  //fin forme onde 2

//debut forme d'onde 3

  public static double base3(int i,
double freq3, double pourcentage3) {
	  
	    double temps3 =
Math.IEEEremainder(i/pourcentage3, 1/freq3);
	 
	    if (temps3 < 0) {
	      temps3 += 1 / freq3;
	    }

	    return ((AmpA + 0.0001 ) * 0.002 *
Math.sin( Math.PI * freq3 * temps3 ));
	  //  return
Math.exp(t)*(Math.sin(freq * temps3 ));
	  //  return (3 * A * Math.sin(freq3 *
temps3 * Math.exp(1)));
	   // return (3 * A * Math.sin(2 *
Math.PI * freq3 * temps3));
//	    return ((Amp + 0.001 ) * 0.01 *
Math.cos(2 *  Math.PI * freq3 * temps3));
//	    return (3 * Math.sin(freq3 *
Math.exp(temps3)));
//	    return (3 * A  * Math.cos(2 *
Math.PI * freq3 * temps3 + 1) * Math.cos(2 * Math.PI * freq3 * temps3
+ 1));
	  }
  //fin forme onde 3
 


  public static void main(String
args[]) {
    final float TauxEchantillon1 =
20500;  
    final int tailleEchantillon1 = 8;
    final boolean grandEndian1 = true;
    final boolean signed1 = true;      
 
    final float TauxEchantillon2 =
20500;  
    final int tailleEchantillon2 = 8;
    final boolean grandEndian2 = true;
    final boolean signed2 = true;
    final float TauxEchantillon3 =
20500;  
    final int tailleEchantillon3 = 8;
    final boolean grandEndian3 = true;
    final boolean signed3 = true;
    
    
    AudioFormat audiojo1 = new
AudioFormat(TauxEchantillon1, tailleEchantillon1, 1, signed1,
grandEndian1);
    AudioFormat audiojo2 = new
AudioFormat(TauxEchantillon2, tailleEchantillon2, 1, signed2,
grandEndian2);
    AudioFormat audiojo3 = new
AudioFormat(TauxEchantillon3, tailleEchantillon3, 1, signed3,
grandEndian3);
    
   
    SourceDataLine onde1 = null;
    SourceDataLine onde2 = null;
    SourceDataLine onde3 = null;

    
    try {
      onde1 =
AudioSystem.getSourceDataLine(audiojo1);
      onde1.open(audiojo1);
      onde2 =
AudioSystem.getSourceDataLine(audiojo2);
      onde2.open(audiojo2);
      onde3 =
AudioSystem.getSourceDataLine(audiojo3);
      onde3.open(audiojo3);

            
    } catch (LineUnavailableException
lue) {
      System.out.println("# Erreur
: impossible de trouver une ligne de sortie audio au format :");
      System.out.println("#       
  " + audiojo1);
      System.exit(1);
    }

    onde1.start();  
    onde2.start();
    onde3.start();

   
    //ici commence les donnees a
modifier pour jouer differents son
    // variables pour les boucles
    double B1 = 0 , B2 = 0 ,B3 = 0;// 
    // variables des durees
    int Dur1 = 5;
    //frequence 
 //   double F1 = 0.5 * Math.exp(6) ,
F2 = 2 * F1;
    double F1 = 0.5 * Math.exp(6) , F2
= 2 * F1 , F3 = 7 * F2;
    // F1 est la forme de base, F2
donne la contenance, F3 entre 2800 et 3200 donne le timbre
    // N6ous remarquons que l'intensite
pour garder l'equilibre avec la frequence est très importante
    // l'intensite se reglant dans la
forme de la courbe plus haut
    //ici fini la fin des donnees, il
reste la forme de la courbe aussi modifiable, ou ajouter des ondes
 // /**

   while (B2 <= 1) 
    {
    
    B1 =0; 
    double lienM1 =
Math.exp(-6.8971199849);
   double lienM1B = Math.exp(-0.598); 
    while (B1 <= 0) //onde1
    {
        Amp = lienM1; 
        AmpA = lienM1B;
        face1(F1, Dur1 , onde1); 
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);

    B1 = B1+1;


}
    B1 = 0;
    double lienM2 =
Math.exp(-5.1711829815);
   double lienM2B = Math.exp(-0.398); 
    while (B1 <= 0) //onde2
    {
    	Amp = lienM2;
    	AmpA = lienM2B;
    face1(F1, Dur1 , onde1);
    face2(F2, Dur1 , onde2);
    face3(F3, Dur1 , onde3);
    B1 = B1+1;
    
}  
          
//onde3
    B1 = 0;
    double lienM3 =
Math.exp(-0.8915981193);
   double lienM3B = Math.exp(-0.398);  

    while (B1 <= 0) 
    {
    	Amp = lienM3;
    	AmpA = lienM3B;
    face1(F1, Dur1 , onde1);
    face2(F2, Dur1 , onde2);
    face3(F3, Dur1 , onde3);
    B1 = B1+1;
    
} 
//onde4
    B1 = 0; 
    double lienM4 =
Math.exp(-0.8675005677);
    double lienM4B = Math.exp(0.23);   
  
    while (B1 <= 0) 
    {
     Amp = lienM4;
     AmpA = lienM4B;
    face1(F1, Dur1 , onde1);
    face2(F2, Dur1 , onde2);
    face3(F3, Dur1 , onde3);
    B1 = B1+1;

} 
    

//onde5
    B1 =0;
    double lienM5 =
Math.exp(-0.7985076962);
   double lienM5B = Math.exp(0.43);    
            
    while (B1 <= 0) 
    {
     Amp = lienM5;
     AmpA = lienM5B;
    face1(F1, Dur1 , onde1);
    face2(F2, Dur1 , onde2);
    face3(F3, Dur1 , onde3);
    B1 = B1+1;
 
} 
    

    B1 =0;              //onde 6
   double lienM6 =
Math.exp(-0.6539264674);
   double lienM6B = Math.exp(0.43);    

   while (B1 <= 0) 
    {
     Amp = lienM6;
     AmpA = lienM6B;
    face1(F1, Dur1 , onde1);
    face2(F2, Dur1 , onde2);
    face3(F3, Dur1 , onde3);
    B1 = B1+1;
 
} 
    
    B1 =0;              //onde 7
   double lienM7 =
Math.exp(-0.5108256238);
   double lienM7B = Math.exp(0.43);   
    while (B1 <= 0) 
    {
     Amp = lienM7;
     AmpA = lienM7B;
    face1(F1, Dur1 , onde1);
    face2(F2, Dur1 , onde2);
    face3(F3, Dur1 , onde3);
    B1 = B1+1;
 
} 
 
   
    B1 =0;              //onde 8
   double lienM8 =
Math.exp(-0.4004775666);
   double lienM8B = Math.exp(0.43);  
   while (B1 <= 0) 
    {
     Amp = lienM8;
     AmpA = lienM8B;
    face1(F1, Dur1 , onde1);
    face2(F2, Dur1 , onde2);
    face3(F3, Dur1 , onde3);
    B1 = B1+1;
 } 
    B1 =0;              //onde 9
   double lienM9 =
Math.exp(-0.2744368457);
   double lienM9B = Math.exp(0.43);
    while (B1 <= 0) 
    {
     Amp = lienM9;
     AmpA = lienM9B;
    face1(F1, Dur1 , onde1);
    face2(F2, Dur1 , onde2);
    face3(F3, Dur1 , onde3);
    B1 = B1+1;
} 

    B1 =0;              //onde 10
   double lienM10 =
Math.exp(-0.2231435513);
   double lienM10B = Math.exp(0.43);
    while (B1 <= 0) 
    {
     Amp = lienM10;
     AmpA = lienM10B;
    face1(F1, Dur1 , onde1);
    face2(F2, Dur1 , onde2);
    face3(F3, Dur1 , onde3);
    B1 = B1+1;
 
}   

    B1 =0;              //onde 11
   double lienM11 =
Math.exp(-0.1743533871);
   double lienM11B = Math.exp(0.43);
    while (B1 <= 0) 
    {
     Amp = lienM11;
     AmpA = lienM11B;
    face1(F1, Dur1 , onde1);
    face2(F2, Dur1 , onde2);
    face3(F3, Dur1 , onde3);
    B1 = B1+1;
 
}   

    B1 =0;              //onde 12
   double lienM12 =
Math.exp(-0.1165338163);
   double lienM12B = Math.exp(0.43);
    while (B1 <= 0) 
    {
     Amp = lienM12;
     AmpA = lienM12B;
    face1(F1, Dur1 , onde1);
    face2(F2, Dur1 , onde2);
    face3(F3, Dur1 , onde3);
    B1 = B1+1;
 
}   
    B1 =0;              //onde 13
   double lienM13 =
Math.exp(-0.1392620673);
   double lienM13B = Math.exp(0.43);
    while (B1 <= 0) 
    {
     Amp = lienM13;
     AmpA = lienM13B;
    face1(F1, Dur1 , onde1);
    face2(F2, Dur1 , onde2);
    face3(F3, Dur1 , onde3);
    B1 = B1+1;
 
} 
    B1 =0;              //onde 14
   double lienM14 =
Math.exp(-0.0943106795);
   double lienM14B = Math.exp(0.43);
    while (B1 <= 0) 
    {
     Amp = lienM14;
     AmpA = lienM14B;
    face1(F1, Dur1 , onde1);
    face2(F2, Dur1 , onde2);
    face3(F3, Dur1 , onde3);
    B1 = B1+1;
 
}  
    B1 =0;              //onde 15
   double lienM15 =
Math.exp(-0.0779615415);
   double lienM15B = Math.exp(0.43);
    while (B1 <= 0) 
    {
     Amp = lienM15;
     AmpA = lienM15B;
    face1(F1, Dur1 , onde1);
    face2(F2, Dur1 , onde2);
    face3(F3, Dur1 , onde3);
    B1 = B1+1;
 
}  
    B1 =0;              //onde 16
   double lienM16 =
Math.exp(-0.0725706928);
   double lienM16B = Math.exp(0.43);
    while (B1 <= 0) 
    {
     Amp = lienM16;
     AmpA = lienM16B;
    face1(F1, Dur1 , onde1);
    face2(F2, Dur1 , onde2);
    face3(F3, Dur1 , onde3);
    B1 = B1+1;
 
}
    B1 =0;              //onde 17
   double lienM17 =
Math.exp(-0.0672087497);
   double lienM17B = Math.exp(0.43);
    while (B1 <= 0) 
    {
     Amp = lienM17;
     AmpA = lienM17B;
    face1(F1, Dur1 , onde1);
    face2(F2, Dur1 , onde2);
    face3(F3, Dur1 , onde3);
    B1 = B1+1;
 
}
    B1 =0;              //onde 18
   double lienM18 =
Math.exp(-0.0202027073);
   double lienM18B = Math.exp(0.43); 
    while (B1 <= 0) 
    {
     Amp = lienM18;
     AmpA = lienM18B;
    face1(F1, Dur1 , onde1);
    face2(F2, Dur1 , onde2);
    face3(F3, Dur1 , onde3);
    B1 = B1+1;
 
}                     
    B1 =0;              //onde 19 pic
principal
    double lienM19 =
Math.exp(-0.0050125418);
    double lienM19B = Math.exp(0.43); 
    while (B1 <= 0) 
    {
     Amp = lienM19;
     AmpA = lienM19B;
    face1(F1, Dur1 , onde1);
    face2(F2, Dur1 , onde2);
    face3(F3, Dur1 , onde3);
    B1 = B1+1;
 
}  
    B1 =0;              //onde 20
	double lienD1 =
Math.exp(-0.0202027073);
    double lienD1B = Math.exp(0.42); 
    while (B1 <= 0) 
    {
     Amp = lienD1;
     AmpA = lienD1B;
    face1(F1, Dur1 , onde1);
    face2(F2, Dur1 , onde2);
    face3(F3, Dur1 , onde3);
    B1 = B1+1;
 
}  
    B1 =0;              //onde 21
	double lienD2 =
Math.exp(-0.0618754037);
        double lienD2B =
Math.exp(0.41); 
    while (B1 <= 0) 
    {
     Amp = lienD2;
     AmpA = lienD2B;
    face1(F1, Dur1 , onde1);
    face2(F2, Dur1 , onde2);
    face3(F3, Dur1 , onde3);
    B1 = B1+1;
 
}
    B1 = 0;             //onde 22
	double lienD3 =
Math.exp(-0.1053605157);
    double lienD3B = Math.exp(0.40); 
    while (B1 <= 0) 
    {
     Amp = lienD3;
     AmpA = lienD3B;
    face1(F1, Dur1 , onde1);
    face2(F2, Dur1 , onde2);
    face3(F3, Dur1 , onde3);
    B1 = B1+1;

}
    B1 = 0;             //onde 23
	double lienD4 =
Math.exp(-0.1625189295);
    double lienD4B = Math.exp(0.399); 

    while (B1 <= 0) 
    {
     Amp = lienD4;
     AmpA = lienD4B;
    face1(F1, Dur1 , onde1);
    face2(F2, Dur1 , onde2);
    face3(F3, Dur1 , onde3);
    B1 = B1+1;

}
    
    B1 = 0;             //onde 24
	double lienD5 =
Math.exp(-0.1984509387);
    double lienD5B = Math.exp(0.389); 

    while (B1 <= 0) 
    {
     Amp =  lienD5;
     AmpA = lienD5B;
    face1(F1, Dur1 , onde1);
    face2(F2, Dur1 , onde2);
    face3(F3, Dur1 , onde3);
    B1 = B1+1;

}
    B1 = 0;             //onde 25
	double lienD6 =
Math.exp(-0.1743533871);
        double lienD6B =
Math.exp(0.388);  
    while (B1 <= 0) 
    {
     Amp = lienD6;
     AmpA = lienD6B;
    face1(F1, Dur1 , onde1);
    face2(F2, Dur1 , onde2);
    face3(F3, Dur1 , onde3);
    B1 = B1+1;

} 
    B1 = 0;             //onde 26
	double lienD7 =
Math.exp(-0.1743533871);
        double lienD7B =
Math.exp(0.389);  
    while (B1 <= 0) 
    {
     Amp = lienD7;
     AmpA = lienD7B;
    face1(F1, Dur1 , onde1);
    face2(F2, Dur1 , onde2);
    face3(F3, Dur1 , onde3);
    B1 = B1+1;

}    
        B1 = 0;             //onde 27
 	 double lienD8 =
Math.exp(-0.1508228897);
        double lienD8B =
Math.exp(0.3891);   
        while (B1 <= 0) 
        {
         Amp = lienD8;
         AmpA = lienD8B;
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;

    }    
        B1 = 0;             //onde 28
        double lienD9 =
Math.exp(-0.1392620673);
        double lienD9B =
Math.exp(0.3892);  
        while (B1 <= 0) 
        {
         Amp = lienD9;
         AmpA = lienD9B;
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;

    }    
        
        B1 = 0;             //onde 29
        double lienD10 =
Math.exp(-0.1625189295);
        double lienD10B =
Math.exp(0.3892);   
        while (B1 <= 0) 
        {
         Amp = lienD10;
         AmpA = lienD10B;
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;

    }       
    
        B1 = 0;             //onde 30
        double lienD11 =
Math.exp(-0.2231435513);
        double lienD11B =
Math.exp(0.3892);  
        while (B1 <= 0) 
        {
         Amp = lienD11;
         AmpA = lienD11B;
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;

    } 
        
        B1 = 0;             //onde 31
        double lienD12 =
Math.exp(-0.2548922496);
        double lienD12B =
Math.exp(0.3892);   
        while (B1 <= 0) 
        {
         Amp = lienD12;
         AmpA = lienD12B;
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;

    } 
        
        B1 = 0;             //onde 32
        double lienD13 =
Math.exp(-0.2613647641);
        double lienD13B =
Math.exp(0.3892);  
        while (B1 <= 0) 
        {
         Amp = lienD13;
         AmpA = lienD13B;
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;

    }          
        B1 = 0;             //onde 33
        double lienD14 =
Math.exp(-0.2876820725);
        double lienD14B =
Math.exp(0.3892);  
        while (B1 <= 0) 
        {
         Amp = lienD14;
         AmpA = lienD14B;
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;

    }    
  
        B1 = 0;             //onde 34
        double lienD15 =
Math.exp(-0.415515444);
        double lienD15B =
Math.exp(0.3892);   
        while (B1 <= 0) 
        {
         Amp = lienD15;
         AmpA = lienD15B;
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;

    } 
        B1 = 0;             //onde 35
        double lienD16 =
Math.exp(-0.5276327421);
        double lienD16B =
Math.exp(0.3892);  
        while (B1 <= 0) 
        {
         Amp = lienD16;
         AmpA = lienD16B;
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;

    } 
        
        B1 = 0;             //onde 36
        double lienD17 =
Math.exp(-0.5978370008);
        double lienD17B =
Math.exp(0.3892); 
        while (B1 <= 0) 
        {
         Amp = lienD17;
         AmpA = lienD17B;
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;

    } 
        
        B1 = 0;             //onde 37
        double lienD18 =
Math.exp(-0.5621189182);
        double lienD18B =
Math.exp(0.3892);   
        while (B1 <= 0) 
        {
         Amp = lienD18;
         AmpA = lienD18B;
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;

    } 
        
        B1 = 0;             //onde 38
        double lienD19 =
Math.exp(-0.5108256238);
        double lienD19B =
Math.exp(0.3892);     
        while (B1 <= 0) 
        {
         Amp = lienD19;
         AmpA = lienD19B;
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;

    } 
        
        B1 = 0;             //onde 39
        double lienD20 =
Math.exp(-0.5108256238);
        double lienD20B =
Math.exp(0.3892);    
        while (B1 <= 0) 
        {
         Amp = lienD20;
         AmpA = lienD20B;
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;

    } 
        
        B1 = 0;             //onde 40
        double lienD21 =
Math.exp(-0.4620354596);
        double lienD21B =
Math.exp(0.3892);   
        while (B1 <= 0) 
        {
         Amp = lienD21;
         AmpA = lienD21B;
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;

    }
        B1 = 0;             //onde 41
        double lienD22 =
Math.exp(-0.5108256238);
        double lienD22B =
Math.exp(0.3892);  
        while (B1 <= 0) 
        {
         Amp = lienD22;
         AmpA = lienD22B;
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;

    } 
        B1 = 0;             //onde 42
        double lienD23 =
Math.exp(-0.5621189182);
        double lienD23B =
Math.exp(0.3892);  
        while (B1 <= 0) 
        {
         Amp = lienD23;
         AmpA = lienD23B;
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;

    }  
        
        B1 = 0;             //onde 43
        double lienD24 =
Math.exp(-0.6931471806);
        double lienD24B =
Math.exp(0.3892); 
        while (B1 <= 0) 
        {
         Amp = lienD24;
         AmpA = lienD24B;
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;

    } 
        
        B1 = 0;             //onde 44
        double lienD25 =
Math.exp(-0.6931471806);
        double lienD25B =
Math.exp(0.3892); 
        while (B1 <= 0) 
        {
         Amp = lienD25;
         AmpA = lienD25B;
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;

    } 
        
        
        B1 = 0;             //onde 45
        double lienD26 =
Math.exp(-1.1394342832);
        double lienD26B =
Math.exp(0.3892);
        while (B1 <= 0) 
        {
         Amp = lienD26;
         AmpA = lienD26B;
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;

    }    
        B1 = 0;             //onde 46
47fin armonique
        double lienS1 =
Math.exp(-1.2039728043);
        double lienS1B =
Math.exp(0.3892);
        while (B1 <= 0) 
        {
         Amp = lienS1;
         AmpA = lienS1B;         
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;

    }  
        
        B1 = 0;             //onde 49
48
        double lienS2 =
Math.exp(-1.1711829815);
        double lienS2B =
Math.exp(0.3892);
        while (B1 <= 0) 
        {
         Amp = lienS2;
         AmpA = lienS2B;
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;

    } 
        

        B1 = 0;             //onde 50
51
        double lienS3 =
Math.exp(-1.0788096614);
        double lienS3B =
Math.exp(0.3892);
        while (B1 <= 0) 
        {
         Amp = lienS3;
         AmpA = lienS3B;
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;

    }  
    
        B1 = 0;             //onde 53
52
        double lienS4 =
Math.exp(-0.9416085399);
        double lienS4B =
Math.exp(0.3892);
        while (B1 <= 0) 
        {
         Amp = lienS4;
         AmpA = lienS4B;
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;

    }
        B1 = 0;             //onde 55
54
        double lienS5 =
Math.exp(-0.9162907319);
        double lienS5B =
Math.exp(0.3892);
        while (B1 <= 0) 
        {
         Amp = lienS5;
         AmpA = lienS5B;        
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;
    }       
        B1 = 0;             //onde 57
56
        double lienS6 =
Math.exp(-1.0078579254);
        double lienS6B =
Math.exp(0.3892);
        while (B1 <= 0) 
        {
         Amp = lienS6;
         AmpA = lienS6B; 
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;
    }      
      
        B1 = 0;             //onde 59
58
        double lienS7 =
Math.exp(-1.0216512475);
        double lienS7B =
Math.exp(0.3892);
        while (B1 <= 0) 
        {
         Amp = lienS7;
         AmpA = lienS7B;        
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;

    }
        B1 = 0;             //onde 60
61
        double lienS8 =
Math.exp(-1.2039728043);
        double lienS8B =
Math.exp(0.3892);
        while (B1 <= 0) 
        {
         Amp = lienS8;
         AmpA = lienS8B;         
        face1(F1, Dur1 , onde1);
        face2(F2, Dur1 , onde2);
        face3(F3, Dur1 , onde3);
        B1 = B1+1;

    }      
 //onde 62    63
           B1 = 0; 
        double lienS9 =
Math.exp(-1.0216512475);
        double lienS9B =
Math.exp(0.3892);
           while (B1 <= 0) 
           {
            Amp = lienS9;  
            AmpA = lienS9B;
           face1(F1, Dur1 , onde1); 
           face2(F2, Dur1 , onde2);
           face3(F3, Dur1 , onde3);
           B1 = B1+1;
       } 
//onde 64    65
           B1 =0;
        double lienS10 =
Math.exp(-1.237874356);
        double lienS10B =
Math.exp(0.3892); 
           while (B1 <=0 ) 
           {
            Amp = lienS10; 
            AmpA = lienS10B;
           face1(F1, Dur1 , onde1); 
           face2(F2, Dur1 , onde2);
           face3(F3, Dur1 , onde3);
           B1 = B1+1;

       } 
 //onde 66   67 
           B1 =0;
        double lienS11 =
Math.exp(-1.3664917338);
        double lienS11B =
Math.exp(0.3892);  
           while (B1 <=0 ) 
           {
            Amp = lienS11;    
            AmpA = lienS11B;
           face1(F1, Dur1 , onde1); 
           face2(F2, Dur1 , onde2);
           face3(F3, Dur1 , onde3);
           B1 = B1+1;

       }
//onde 68    69
           B1 =0;
        double lienS12 =
Math.exp(-1.8643301621);
        double lienS12B =
Math.exp(-0.598);   
           while (B1 <= 0) 
           {
            Amp = lienS12; 
            AmpA = lienS12B;
           face1(F1, Dur1 , onde1); 
           face2(F2, Dur1 , onde2);
           face3(F3, Dur1 , onde3);
           B1 = B1+1;

       }           
 //onde 70  71    
           B1 =0;
        double lienS13 =
Math.exp(-2.0402208285);
        double lienS13B =
Math.exp(-0.598);  
           while (B1 <=0 ) 
           {
            Amp = lienS13;  
            AmpA = lienS13B;
           face1(F1, Dur1 , onde1); 
           face2(F2, Dur1 , onde2);
           face3(F3, Dur1 , onde3);
           B1 = B1+1;

       }           
//onde 72    73
           B1 =0;
        double lienS14 =
Math.exp(-2.1628231506);
        double lienS14B =
Math.exp(-0.598);   
           while (B1 <= 0) 
           {
            Amp = lienS14; 
            AmpA = lienS14B;
           face1(F1, Dur1 , onde1); 
           face2(F2, Dur1 , onde2);
           face3(F3, Dur1 , onde3);
           B1 = B1+1;

       }
 //onde 74    75
           B1 =0;
        double lienS15 =
Math.exp(-2.6592600369);
        double lienS15B =
Math.exp(-0.598);    
           while (B1 <= 0) 
           {
            Amp = lienS15;
            AmpA = lienS15B;
           face1(F1, Dur1 , onde1); 
           face2(F2, Dur1 , onde2);
           face3(F3, Dur1 , onde3);
           B1 = B1+1;

       }
//onde 77    76
           B1 =0;
        double lienS16 =
Math.exp(-2.9957322736);
        double lienS16B =
Math.exp(0.3892);  
           while (B1 <= 0) 
           {
            Amp = lienS16;
            AmpA = lienS16B;
           face1(F1, Dur1 , onde1); 
           face2(F2, Dur1 , onde2);
           face3(F3, Dur1 , onde3);
           B1 = B1+1;

       } 
//onde 79    78
           B1 =0;
        double lienS17 =
Math.exp(-3.3524072175);
        double lienS17B =
Math.exp(-0.598);   
           while (B1 <= 0) 
           {
            Amp = lienS17;
            AmpA = lienS17B;
           face1(F1, Dur1 , onde1); 
           face2(F2, Dur1 , onde2);
           face3(F3, Dur1 , onde3);
           B1 = B1+1;

       }
//onde 81    80
           B1 =0;
        double lienS18 =
Math.exp(-3.6888794541);
        double lienS18B =
Math.exp(-0.598);   
           while (B1 <= 0) 
           {
            Amp = lienS18;
            AmpA = lienS18B;
           face1(F1, Dur1 , onde1); 
           face2(F2, Dur1 , onde2);
           face3(F3, Dur1 , onde3);
           B1 = B1+1;
 }
//onde 82    83
           B1 =0;
        double lienS19 =
Math.exp(-4.605170186);
        double lienS19B =
Math.exp(-0.598);  
           while (B1 <= 0) 
           {
            Amp = lienS19;
            AmpA = lienS19B;
           face1(F1, Dur1 , onde1); 
           face2(F2, Dur1 , onde2);
           face3(F3, Dur1 , onde3);
           B1 = B1+1;
 }
//ondes de fin
           B1 =10;
        double lienS20 =
Math.exp(-4.605170186);
        double lienS20B =
Math.exp(-0.598);  
           while (B1 <= 10) 
           {
               Amp = lienS20;
               AmpA = lienS20B;
           face1(F1, Dur1 , onde1); 
           face2(F2, Dur1 , onde2);
           face3(F3, Dur1 , onde3);
           B1 = B1+1;
 }         

              B2 = B2 + 1;            


   

B3 = (int) (B2%2) ;
if(B3 == 1)
{

F1 = F1 + 1;

}
else
{
  
	F1 = F1 - 2;

} 

          
    }
    onde1.drain();
    onde2.drain();
    onde3.drain();
    System.exit(0);
  }  
}