microsoft / microsoft/pxt-microbit

Note() enum not persistent

Open
#3,912 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

DESCRIPTION

Making any edits anywhere wipes away previous Note() enums and substitutes the actual frequencies in Hz as integer literals.

EXPECTED BEHAVIOR

For demonstrating to others, it would be nice if the enums were persistent: "Note.C4" should stay "Note.C4" in Python and "Middle C" should stay "Middle C" in Blocks instead of switching to 262 at the drop of a hat, as the later has no meaning to people who don't know the physics of music. One can always print or display the actual numeric value if needed.

HARDWARE

micro:bit version 2.0

DESKTOP

  • OS: Linux (Ubuntu Studio 20.04)
  • Browser: Chromium (Version 88.0.4324.182) and Firefox (Version 86.0)

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.

Research direction

No source files or tests are named. Start by reproducing the edit flow on the Blocks and Python views described in the issue, then trace how Note.C4 and Middle C are converted to numeric frequencies; done means edits preserve the symbolic enum names while numeric values remain available when displayed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.