lancaster-university / codal-microbit-v2

CODAL target for the micro:bit v2.x series of devices
MIT License
41 stars 50 forks source link

Recording & playback: High pitch frequency after the first recording #379

Closed microbit-carlos closed 3 months ago

microbit-carlos commented 9 months ago

Can be tested with with this MakeCode programme:

input.onButtonPressed(Button.A, function () {
    record.setSampleRate(11000)
    basic.showString("?")
    record.startRecording(record.BlockingState.Blocking)
    basic.showLeds(`
        . # . . .
        . # # . .
        . # # # .
        . # # . .
        . # . . .
        `)
    record.setSampleRate(18000)
    record.playAudio(record.BlockingState.Blocking)
    basic.clearScreen()
})

Tested with MakeCode live running CODAL v0.2.57 makecode.microbit.org version: 6.0.18 Microsoft MakeCode version: 9.0.12 microbit runtime version: v2.2.0-rc6 codal-microbit-v2 runtime version: v0.2.57

And with a test deployment of MakeCode using CODAL v0.2.60-master.1: makecode.microbit.org version: 6.1.5 Microsoft MakeCode version: 9.1.11 microbit runtime version: v2.2.0-rc6 codal-microbit-v2 runtime version: v0.2.60-master.1

Hex to reproduce: microbit-Parrot-0260-master1 (1).hex.zip

microbit-carlos commented 8 months ago

I can still replicate this issue with current MakeCode Live:

makecode.microbit.org version: 6.0.19 Microsoft MakeCode version: 9.0.12 microbit runtime version: v2.2.0-rc6 codal-microbit-v2 runtime version: v0.2.61

microbit-carlos commented 4 months ago

Still replicable with MakeCode using CODAL v0.2.63.

JohnVidler commented 3 months ago

I've re-tested this on v0.2.66, and it now seems to be gone.

Can you confirm this please @microbit-carlos ?

microbit-carlos commented 3 months ago

I can confirm the high frequency noise is present in MakeCode live with CODAL v0.2.63, and fixed in the test deployment version of MakeCode with CODAL v0.2.66.