Musical scale: Difference between revisions

Content deleted Content added
Simple9371 (talk | contribs)
m Added Powershell
PureFox (talk | contribs)
Added Kotlin
Line 312:
 
0.25 is the duration of each note (in seconds).
 
=={{header|Kotlin}}==
This uses the same frequencies and duration as the Python entry and works fine on Windows 10.
 
When building win32.klib from windows.h, one needs to make sure NOT to filter out utilapiset.h because this is where the Beep function now resides, not in winbase.h as stated in the MSDN documentation.
<lang scala>// Kotlin Native v0.3
 
import kotlinx.cinterop.*
import win32.*
 
fun main(args: Array<String>) {
val freqs = intArrayOf(262, 294, 330, 349, 392, 440, 494, 523) // CDEFGABc
val dur = 500
repeat(5) { for (freq in freqs) Beep(freq, dur) }
}</lang>
 
=={{header|Lilypond}}==