protected void generateEnvelope() {
	audioData = new byte[samples];
	double t = 0;
	double amp = 0;
	for (int i=0; i<samples; i++) {      //attack
	    if (DEBUG&&i%50 == 0)
		System.out.println(t+ " : time amplitude base:" + amp);
	    amp=generateAmplitude(t,amp);
	    if (DEBUG&&i%50 == 0)
	    	System.out.println("New Amplitude: " + amp);
	    audioData[i] = (byte)( (127) * generateWave(t) * amp);
	    t += 1.0 / (double)this.sampleRate;
	}	
    }