Lien pour entendre la variation de durée 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.9 * 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.5 * 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.0002 * 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;// influence durer
//frequence
// double F1 = 0.5 * Math.exp(6) , F2 = 2 * F1;
double F1 = Math.exp(5) , F2 = 6 * F1 , F3 = 7 * F1;//ici le son A pour avoir le son O il suffit de changer les frequences
// 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(-2.4079456087);
double lienM1B = Math.exp(-1.8971199849);
// double lienM1 = Math.exp(-2.4079456087/0.525);
// double lienM1B = Math.exp(-1.8971199849 * 0.525);
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(-3.1010927892/2.17);
// double lienM2B = Math.exp(-1.1711829815 * 2.17);
double lienM2 = Math.exp(-3.1010927892/1.435);//l'utilisation de java deforme les onde en ajoutant une derive d'ordre 1 d'ou la correction par 1.435
double lienM2B = Math.exp(-1.1711829815*1.435);
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(-2.4079456087/1.435);
double lienM3B = Math.exp(-0.8915981193*1.435);
// double lienM3 = Math.exp(-2.4079456087/1.435);
// double lienM3B = Math.exp(-0.8915981193 * 1.435);
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(-2.5257286443/1.265);//chaque onde n'est analysable que par rapport a elle meme d'ou correction varie
double lienM4B = Math.exp(-0.8675005677*1.265); // meme si C la repition du changement de vitesse qui cre le son
// double lienM4 = Math.exp(-2.5257286443/1.65375);
// double lienM4B = Math.exp(-0.8675005677 * 1.65375);
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(-2.8134107168/1.265);
double lienM5B = Math.exp(-0.7985076962*1.265);
// double lienM5 = Math.exp(-2.8134107168/2.3625);
// double lienM5B = Math.exp(-0.7985076962 * 2.3625);
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(-2.0402208285/1.265);
double lienM6B = Math.exp(-0.6539264674 * 1.265);
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(-1.6607312068/0.9947368421);
double lienM7B = Math.exp(-0.5108256238 * 0.9947368421);
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(-1.5606477483/1.005);
double lienM8B = Math.exp(-0.4004775666 * 1.005);
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(-1.4696759701/1.0408695652);
double lienM9B = Math.exp(-0.2744368457 * 1.0408695652);
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(-1.5141277326/1.1454545455);
double lienM10B = Math.exp(-0.2231435513 *1.1454545455);
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(-1.3862943611/1.0584);
double lienM11B = Math.exp(-0.1743533871 * 1.0584);
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(-1.2729656758/1.00125);
double lienM12B = Math.exp(-0.1165338163 * 1.00125);
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(-1.347073648/1.0540384615);
double lienM13B = Math.exp(-0.1392620673 * 1.0540384615);
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(-1.4271163556/1.194375);
double lienM14B = Math.exp(-0.0943106795* 1.194375);
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(-1.2729656758/1.040625);
double lienM15B = Math.exp(-0.0779615415* 1.040625);
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(-1.237874356/1.0101724138);
double lienM16B = Math.exp(-0.0725706928* 1.0101724138);
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(-1.2039728043/0.98175);
double lienM17B = Math.exp(-0.0672087497* 0.98175);
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(-1.1086626245/0.9354545455);
double lienM18B = Math.exp(-0.0202027073* 0.9354545455);
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(-1.1711829815/1.0110483871);
double lienM19B = Math.exp(-0.0050125418 * 1.0110483871);
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(-1.237874356/1.0644827586);
double lienD1B = Math.exp(-0.0202027073 * 1.0644827586);
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(-1.347073648/1.1388461538);
double lienD2B = Math.exp(-0.0618754037 * 1.1388461538);
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(-1.4696759701/1.2326086957);
double lienD3B = Math.exp(-0.1053605157 * 1.2326086957);
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(-1.5141277326/1.2170454545);
double lienD4B = Math.exp(-0.1625189295 * 1.2170454545);
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(-1.6607312068/1.3594736842);
double lienD5B = Math.exp(-0.1984509387 * 1.3594736842);
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(-1.7147984281/1.47);
double lienD6B = Math.exp(-0.1743533871/1.02 * 1.47);
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(-1.6607312068/1.3926315789);
double lienD7B = Math.exp(-0.1743533871 * 1.3926315789);
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(-1.6450650901/1.403626943);
double lienD8B = Math.exp(-0.1508228897 * 1.403626943);
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(-1.6296406198/1.3982142857);
double lienD9B = Math.exp(-0.1392620673 * 1.3982142857);
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(-1.5141277326/1.2170454545);
double lienD10B = Math.exp(-0.1625189295 * 1.2170454545);
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(-1.5141277326/1.1454545455);
double lienD11B = Math.exp(-0.2231435513 * 1.1454545455);
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(-1.5606477483/1.1625);
double lienD12B = Math.exp(-0.2548922496 * 1.1625);
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(-1.4271163556/1.010625);
double lienD13B = Math.exp(-0.2613647641 * 1.010625);
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(-1.4696759701/1.027173913);
double lienD14B = Math.exp(-0.2876820725 * 1.027173913);
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(-1.5371172509/0.9669767442);
double lienD15B = Math.exp(-0.415515444 * 0.9669767442);
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(-1.6094379124/0.92925);
double lienD16B = Math.exp(-0.5276327421 * 0.92925);
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(-2.1202635362/1.44375);
// double lienD17B = Math.exp(-0.5978370008 * 1.44375);
double lienD17 = Math.exp(-2.1202635362/1.22);
double lienD17B = Math.exp(-0.5978370008*1.22);
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(-2.302585093/1.4);
double lienD18B = Math.exp(-0.5621189182*1.4);
// double lienD18 = Math.exp(-2.302585093/1.7955);
// double lienD18B = Math.exp(-0.5621189182 * 1.7955);
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(-1.7719568419/1.1117647059);
double lienD19B = Math.exp(-0.5108256238 * 1.1117647059);
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(-1.5606477483/0.9);
double lienD20B = Math.exp(-0.5108256238 * 0.9);
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(-1.7147984281/1.1025);
double lienD21B = Math.exp(-0.4620354596 * 1.1025);
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(-1.5141277326/0.8590909091);
double lienD22B = Math.exp(-0.5108256238 * 0.8590909091);
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(-1.3862943611/0.7182);
double lienD23B = Math.exp(-0.5621189182 * 0.7182);
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(-1.347073648/0.6057692308);
double lienD24B = Math.exp(-0.6931471806 * 0.6057692308);
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(-1.5606477483/0.75);
double lienD25B = Math.exp(-0.6931471806 * 0.75);
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.347073648/0.65);
double lienD26B = Math.exp(-1.1394342832 * 0.65);
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 47 fin armonique
double lienS1 = 0.5 * Math.exp(-1.2039728043/ 0.2953125);
double lienS1B = 0.5 * Math.exp(-1.13943428318836*0.2953125);
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 48 49
double lienS2 = 0.52 * Math.exp(-1.1711829815/0.2569736842);
double lienS2B = 0.52 * Math.exp(-0.967584026261706*0.2569736842);
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 = 0.54 * Math.exp(-1.0788096614/0.2746153846);
double lienS3B = 0.54 * Math.exp(-0.941608539858445*0.2746153846);
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 52 53
double lienS4 = 0.56 * Math.exp(-0.9416085399/0.2925);
double lienS4B = 0.56 * Math.exp(-0.867500567704723*0.2925);
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 54 55
double lienS5 = 0.58 * Math.exp(-0.9162907319/0.3652173913);
double lienS5B = 0.58 * Math.exp(-1.06421086195078*0.3652173913);
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 56 57
double lienS6 = 0.6 * Math.exp(-1.0078579254/0.2948076923);
double lienS6B = 0.6 * Math.exp(-0.941608539858445*0.2948076923);
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 = 0.62 * Math.exp(-1.0216512475 /0.36);
double lienS7B = 0.62 * Math.exp(-1.1551826401565*0.36 );
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 = 0.64 * Math.exp(-1039728043 /0.27);
double lienS8B = 0.64 * Math.exp(-1.04982212449868*0.27 );
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 = 0.66 * Math.exp(-1.0216512475/0.3658064516);
double lienS9B = 0.66 * Math.exp(-1.17118298150295*0.3658064516 );
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 = 0.66 * Math.exp(-1.37874356/0.32625);
double lienS10B = 0.66 * Math.exp(-1.27296567581289*0.32625);
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 = 0.64 * Math.exp(-1.3664917338/0.4227631579);
double lienS11B = 0.64 * Math.exp(-1.66073120682165*0.4227631579);
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 = 0.62 * Math.exp(-1.8643301621/0.2959090909);
double lienS12B = 0.62 * Math.exp(-1.80180980508156*0.2959090909);
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 = 0.6 * Math.exp(-2.0402208285/0.2925);
double lienS13B = 0.6 * Math.exp(-1.96611285637283*0.2925);
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 = 0.58 * Math.exp(-2.1628231506/0.60375);
double lienS14B = 0.58 * Math.exp(-2.81341071676004*0.60375);
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 = 0.56 * Math.exp(-2.6592600369/0.3392307692);
double lienS15B = 0.56 * Math.exp(-2.7333680090865*0.3392307692);
while (B1 <= 0)
{
Amp = lienS15;
AmpA = lienS15B;
face1(F1, Dur1 , onde1);
face2(F2, Dur1 , onde2);
face3(F3, Dur1 , onde3);
B1 = B1+1;
}
//onde 76 77
B1 =0;
double lienS16 = 0.54 * Math.exp(-2.9957322736/0.2863636364);
double lienS16B = 0.54 * Math.exp(-2.90042209374967*0.2863636364);
while (B1 <= 0)
{
Amp = lienS16;
AmpA = lienS16B;
face1(F1, Dur1 , onde1);
face2(F2, Dur1 , onde2);
face3(F3, Dur1 , onde3);
B1 = B1+1;
}
//onde 78 79
B1 =0;
double lienS17 = 0.52 * Math.exp(-3.3524072175/0.55125);
double lienS17B = 0.52 * Math.exp(-3.91202300542815*0.55125);
while (B1 <= 0)
{
Amp = lienS17;
AmpA = lienS17B;
face1(F1, Dur1 , onde1);
face2(F2, Dur1 , onde2);
face3(F3, Dur1 , onde3);
B1 = B1+1;
}
//onde 80 81
B1 =0;
double lienS18 = 0.5 * Math.exp(-3.6888794541/0.39375);
double lienS18B = 0.5 * Math.exp(-3.91202300542815*0.39375);
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 = 0.5 * Math.exp(-4.605170186/0.63);
double lienS19B = 0.5 * Math.exp(-5.29831736654804*0.63);
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 =49;
double lienS20 = 0.5 * Math.exp(-4.605170186/0.63);
double lienS20B = 0.5 * Math.exp(-5.29831736654804*0.63);
while (B1 <= 50)
{
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 - 5;
F2 = 6 * F1;
F3 = 7 * F1;
}
else
{
F1 = F1 - 1;
F2 = 6 * F1;
F3 = 7 * F1;
}
}
onde1.drain();
onde2.drain();
onde3.drain();
System.exit(0);
}
}