Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Musical-scale/Scala/musical-scale.scala
Normal file
12
Task/Musical-scale/Scala/musical-scale.scala
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import net.java.dev.sna.SNA
|
||||
|
||||
object PlayMusicScale extends App with SNA {
|
||||
|
||||
snaLibrary = "Kernel32"
|
||||
val Beep = SNA[Int, Int, Unit]
|
||||
|
||||
println("Please don't shoot the piano player, he's doing the best that he can!")
|
||||
List(0, 2, 4, 5, 7, 9, 11, 12).
|
||||
foreach(f => Beep((261.63 * math.pow(2, f / 12.0)).toInt, if (f == 12) 1000 else 500))
|
||||
println("That's all")
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue