Enable modifying default beats and accents of metronome in metronome preset

This commit is contained in:
2020-03-15 15:10:08 +01:00
parent 0a5a9a497a
commit 0b27844195

View File

@@ -11,5 +11,15 @@ if(typeOf(beats) != "int") {
throw "Expected 'beats' to be of int type";
}
metronome(bpm, beats);
accent = __param__.getOrDefault("accent", "@A#2").toNote();
if(typeOf(accent) != "note") {
throw "Expected 'accent' to be of note type";
}
beat = __param__.getOrDefault("beat", "@F#2").toNote();
if(typeOf(accent) != "note") {
throw "Expected 'beat' to be of note type";
}
metronome(bpm, beats, accent, beat);