title: Scala - Playing a Sound -Beeping
body: <p>I am tryig to do something in order that to have a <code>beep</code> or <code>sound</code> for 2-3 minutes when a proces is done in my app. Currently I have this:</p>
  
  <pre><code>object SoundPlay {
  import scala.collection.mutable.ListBuffer
  val bb = new ListBuffer[Any]
  
  def main(args: Array[String]) {
  
     val beep = java.awt.Toolkit.getDefaultToolkit.beep
     for (i &lt;- 1 to 100) {
       bb += beep
     }
  
     bb.foreach(println(_))
  
    }
  }
  </code></pre>
  
  <p>but this one makes only one sound and I can't make it repeated moe than Once.?!</p>
  
  <h2>My UPDATE</h2>
  
  <p>I wrote this and is a kind of:</p>
  
  <pre><code>object SoundPlay {
  def main(args: Array[String]) {
     for(i &lt;- 1 to 10) {
       Thread.sleep(1000)
       java.awt.Toolkit.getDefaultToolkit.beep()
      }
    }
   }
  </code></pre>