..this is a simple java code w/c allows to produce a beep sound.
timer also is being applied here.
hope it will help for any reason it may serve.
:-)

import java.awt.*;
import java.io.*;

public class timer_beep {

    public static void main(String args[])throws IOException
    {
            try{
                
                System.out.println("Countdown started!");
                    Thread.sleep(1000);
                for(int x=10;x>=0;x--)
                {
                        System.out.println(x);
                        Toolkit.getDefaultToolkit().beep();
                        Thread.sleep(600);
                }
                    Thread.sleep(2000);
                Toolkit.getDefaultToolkit().beep();
                    System.out.println("beep testing!");
               
            
            
        }
        catch(InterruptedException e) { }
             
    }
    
    
}