microsoft / pxt-adafruit

Microsoft MakeCode editor for Adafruit Circuit Playground Express
https://makecode.adafruit.com
Other
81 stars 77 forks source link

Can't play or create a custom string of notes in blocks #1130

Open V2man opened 5 years ago

V2man commented 5 years ago

I can create a custom string of notes in Java then switch to blocks to continue. I cannot directly create a custom string of notes in blocks.

Example: [code] input.buttonB.onEvent(ButtonEvent.Click, function () { music.playTone(523, music.beat(BeatFraction.Double)) music.playTone(131, music.beat(BeatFraction.Double)) music.playTone(262, music.beat(BeatFraction.Double)) music.playTone(220, music.beat(BeatFraction.Double)) music.playTone(988, music.beat(BeatFraction.Double)) music.playTone(392, music.beat(BeatFraction.Whole)) }) input.buttonA.onEvent(ButtonEvent.Click, function () { music.playSoundUntilDone(notes) }) let notes = "" notes = "C:High:8 C:Low:8 C:Middle:8 A:Low:8 B:High:8 G:Middle:4" [/code]

PlayingHMLStringOfNotes