Merge pull request #206 from sgk/music-changeTempo-fix
Fix changeTempo() calculation
This commit is contained in:
commit
7089aa9c54
@ -162,7 +162,8 @@ namespace music {
|
|||||||
//% help=music/change-tempo weight=39
|
//% help=music/change-tempo weight=39
|
||||||
//% blockId=device_change_tempo block="change tempo by (bpm)|%value" blockGap=8
|
//% blockId=device_change_tempo block="change tempo by (bpm)|%value" blockGap=8
|
||||||
export function changeTempoBy(bpm: number): void {
|
export function changeTempoBy(bpm: number): void {
|
||||||
setTempo(beat(BeatFraction.Whole) + bpm);
|
init();
|
||||||
|
setTempo(beatsPerMinute + bpm);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user