code: public void set_point( int point, int tick, int ampl ) {
  		if( point >= 0 && point < ticks.length ) {
  			if( point == 0 ) {
  				tick = 0;
  			}
  			if( point > 0 ) {
  				if( tick < ticks[ point - 1 ] ) {
  					/* Simple guess at where the point is supposed to be.*/
  					tick += 256;
  				}
  				if( tick <= ticks[ point - 1 ] ) {
  					System.out.println( "Envelope: Point not valid (" + tick + " <= " + ticks[ point - 1 ] + ")");
  					tick = ticks[ point - 1 ] + 1;
  				}
  			}
  			ticks[ point ] = tick;
  			ampls[ point ] = ampl;
  			point += 1;
  			while( point < ticks.length ) {
  				ticks[ point ] = ticks[ point - 1 ] + 1;
  				ampls[ point ] = 0;
  				point += 1;
  			}
  		}
  	}
docs: /* When you set a point, all subsequent points are reset.