bbcmicrobit / PythonEditor

A MicroPython editor for the BBC micro:bit that works with browsers.
https://python.microbit.org/
MIT License
196 stars 130 forks source link

Music music.pitch(440) plays only on pin0 after music.play(...pin=pin_speaker) #352

Closed martinwork closed 3 years ago

martinwork commented 3 years ago

With the code below, the first call to music.pitch(440) plays on both speaker and pin0.

But after music.play(music.BLUES, pin=pin_speaker), the second call to music.pitch(440) plays only on pin0.

from microbit import *
import music

while True:
    music.pitch(440)
    sleep(1000)
    music.stop()
    sleep(1000)
    music.play(music.BLUES, pin=pin_speaker)
    music.stop()
microbit-carlos commented 3 years ago

Hey Martin, as this is a MicroPython for V2 issue I've created this issue over there: https://github.com/microbit-foundation/micropython-microbit-v2/issues/24