microsoft / microsoft/pxt-microbit

"play tone" and "play sound effect" produce different tones

Open
#5,799 2 comments 0 reactions 1 assignee View on GitHub

@riknoll is already working on this.

Since Aug 7, 2024.

music P2
Dominant language
TypeScript
Stars
804
Forks
721
Avg merge
2d 9h
Merged PRs (30d)
2

Description

Describe the bug
Something that @jaustin noticed. When the play tone block and play sound effect are configured to play the same tone, in this case middle C, they don't produce the same tone.

To Reproduce
Steps to reproduce the behavior:

  1. Flash this programme to a micro:bit V2
  2. The change in tone can be easily heard on the speaker
image

Using a phone app sound analyser with headphones and it detects the “play tone” block output at around 255 Hz and SoundEffect around 264 Hz. Middle C should be 261.626 Hz.

Expected behavior
Both blocks to produce the same tone.

Screenshots
N

micro:bit version (please complete the following information):

Tested with a V2.00

Desktop (please complete the following information):
N/A

Smartphone (please complete the following information):
N/A

Additional context
Add any other context about the problem here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.