Add tones, including a launch countdown sequence.
This commit is contained in:
parent
9623a4a869
commit
2601db8fd4
3 changed files with 39 additions and 1 deletions
32
lib/sound.ks
Normal file
32
lib/sound.ks
Normal file
|
@ -0,0 +1,32 @@
|
|||
|
||||
// An informational tone.
|
||||
function InfoTone {
|
||||
local v is GetVoice(0).
|
||||
set v:VOLUME to 0.75.
|
||||
set v:WAVE to "sine".
|
||||
set v:ATTACK to 0.1.
|
||||
set v:DECAY to 0.05.
|
||||
set v:SUSTAIN to 0.7.
|
||||
set v:RELEASE to 0.25.
|
||||
|
||||
v:Play(Note("C4", 1, 0.75)).
|
||||
}
|
||||
|
||||
function PlayCountdown {
|
||||
local v is GetVoice(0).
|
||||
set v:VOLUME to 0.9.
|
||||
set v:WAVE to "sine".
|
||||
set v:ATTACK to 0.05.
|
||||
set v:DECAY to 0.001.
|
||||
set v:SUSTAIN to 0.7.
|
||||
set v:RELEASE to 0.05.
|
||||
|
||||
local notes is List(
|
||||
Note("E4", 1, 0.25),
|
||||
Note("E4", 1, 0.25),
|
||||
Note("E4", 1, 0.25),
|
||||
Note("E4", 1, 0.25),
|
||||
Note("B5", 1, 0.45)
|
||||
).
|
||||
v:Play(notes).
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue