Improve sound of alert

This commit is contained in:
2020-03-15 18:39:51 +01:00
parent 61e7793f24
commit db7d99dba7

View File

@@ -15,7 +15,10 @@ function alert(melody: string = "beep") {
throw "Unknown melody with name of '" + melody + "'"; throw "Unknown melody with name of '" + melody + "'";
} }
true ^ midi({ bpm -> 400 }, melodies.get(melody)); A = melodies.get(melody);
B = transpose(6, melodies.get(melody));
true ^ midi({ bpm -> 400 }, A, B);
} }
function alert(cycles: int, melody: string = "beep") { function alert(cycles: int, melody: string = "beep") {
@@ -29,5 +32,9 @@ function alert(cycles: int, melody: string = "beep") {
if(not melodies.containsKey(melody)) { if(not melodies.containsKey(melody)) {
throw "Unknown melody with name of '" + melody + "'"; throw "Unknown melody with name of '" + melody + "'";
} }
cycles ^ midi({ bpm -> 400 }, melodies.get(melody));
A = melodies.get(melody);
B = transpose(6, melodies.get(melody));
cycles ^ midi({ bpm -> 400 }, A, B);
} }