Getting rid of delay() using tone

I am building a sketch that is eventually going to count down from an inputed value and when it gets to about 10 seconds start the first beep sequence, then around five start the second beep sequence, and when its done do the third beep sequence but I am having trouble getting it to the point where it can run while the system does other things. I'd like it to be more flexible, but am not sure how to do it. I need to get rid of the delays that halt the processor. I have studied the blink without delay sketch but that doesn't help much. I also need to figure out how to make the millis function count down from the specified value.

#include <LiquidCrystal.h>
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);


const int tickled =  4;
int ledState = HIGH;
long previousMillis = 0;
long interval = 1000; 
int RLED = A1;
int YLED = A2;
int GLED = A3;
int button = A0;

void setup(){
  pinMode(RLED,OUTPUT);
  pinMode(YLED, OUTPUT);
  pinMode(GLED, OUTPUT);
  pinMode(button,INPUT);
  pinMode(tickled, OUTPUT);   
  lcd.clear(); 
  lcd.print("Time");
}


void loop()
{


  unsigned long currentMillis = millis()/interval;  

  if(currentMillis - previousMillis < 4){

    digitalWrite(GLED,HIGH);
    tone(A5,575 , 150);
    delay(1000);
    lcd.setCursor(7,0);
    lcd.print(millis()/interval);
    delay(1000);
    lcd.setCursor(7,0);
    lcd.print(millis()/interval);
    delay(1000);
    lcd.setCursor(7,0);
    lcd.print(millis()/interval);
    digitalWrite(GLED,LOW);
    unsigned long currentMillis = millis()/interval;  

  }

  if(currentMillis - previousMillis <= 8){
    digitalWrite(YLED,HIGH);
    tone(A5,100 , 1000);
    tone(A5,250 , 1000);
    delay(1000);
    lcd.setCursor(7,0);
    lcd.print(millis()/interval);
    delay(1000);
    lcd.setCursor(7,0);
    lcd.print(millis()/interval);

    digitalWrite(YLED,LOW);
    unsigned long currentMillis = millis()/interval;  

  }

  if(currentMillis - previousMillis == 9){
    digitalWrite(RLED,HIGH);
        lcd.setCursor(7,0);
    lcd.print(millis()/interval);
    tone(A5,300,1000);
    delay(1000);
    tone(A5,100,1000);



  }

}

You need to set up a timer to give you regular interrupts. Then in the interrupt service routine you need to see if it is time to toggle the tone output or not. That way any use of delays is completely removed.

I understand what you mean but how to implement it I, don't know. Is there a function too use? Thanks for patience.

No function just write it.
You can use this as a basis although to get funny sounds you need to nursemaid it. I am in the middle of doing a fuly automatic version but I have been snowed under by other work at the moment.

/******************************************************
Sound effects - blips and bleeps
By Mike Cook
*****************************************************/

 volatile unsigned int sample = 0;
 volatile unsigned int increment = 0x800;

void setup(){
    setSampleTimer();
}

ISR(TIMER2_COMPB_vect){  // Interrupt service routine to output next sample to PWM
      sample += increment;
     if((sample & 0x8000) != 0)  // implement a triangle wave
     OCR2B = 127 - (sample >> 8) & 0x7f;
     else
      OCR2B = (sample >> 8) & 0x7f;
}

void setSampleTimer(){  // sets timer 2 going at the output sample rate
  pinMode(3, OUTPUT);
  TCCR2A = _BV(COM2B1) | _BV(WGM21) | _BV(WGM20); // Just enable output on Pin 3 and disable it on Pin 11
  TCCR2B = _BV(WGM22) | _BV(CS22);
  OCR2A = 129; // defines the frequency 120 = 16.13 KHz or 62uS, 124 = 15.63 KHz or 64uS, 248 = 8 KHz or 125uS
  OCR2B = 64;  // deines the duty cycle - Half the OCR2A value for 50%
  TCCR2B = TCCR2B & 0b00111000 | 0x2; // select a prescale value of 8:1 of the system clock
}

void loop(){
   wobble(10);
   delay(1000);
   sweepUp(200);
   sweepDown(200);
   noise(1000);
   delay(1000);
   notes(30); 
   delay(1000);
}

void wobble(int wobbles){
   TIMSK2 = _BV(OCIE2B); // sound
    for(int j=0; j<wobbles; j++){
  for(int i = 0x500; i< 0x1300; i+=0x4){
    increment = i;
   delayMicroseconds(100);
  }
  }
  TIMSK2 = 0; // hush
}

void noise(int length){ // length about 1000
     TIMSK2 = _BV(OCIE2B); // sound
  for(int i=0; i<length; i++){ // noise
   increment = random(30, 0x1500);
   delayMicroseconds(100);
 }
   TIMSK2 = 0; // hush
}

void sweepUp(int time){ // time controls how long it takes start with 200
  TIMSK2 = _BV(OCIE2B); // Output Compare Match B Interrupt Enable
  for(int i = 0x500; i< 0x1300; i+=0x1){
    increment = i;
   delayMicroseconds(time);
 }
 TIMSK2 = 0; // Output Compare Match B Interrupt Disabled
}

void sweepDown(int time){ // time controls how long it takes start with 200
  TIMSK2 = _BV(OCIE2B); // Output Compare Match B Interrupt Enable
  for(int i = 0x500; i< 0x1300; i+=0x1){
    increment = 0x1300 - i;
   delayMicroseconds(time);
 }
 TIMSK2 = 0; // Output Compare Match B Interrupt Disabled
}

void notes(int length){
  TIMSK2 = _BV(OCIE2B); // sound
  for(int i=0; i<length; i++){
    increment = random(300,0x1500);
    delay(100);
  }
  TIMSK2 = 0; // hush
}