microsoft / microsoft/pxt-microbit
Unite all of the melody/sound string representations
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 804
- Forks
- 721
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 2
Description
Across pxt-common-packages and pxt-microbit, we currently have four different ways of representing sounds/melodies
- The MicroPython format of arrays of strings (detailed here)
- The melody format used in pxt-arcade (detailed here)
- The SoundExpression string format used by microbit-codal (detailed here)
- The simplified melody format used by the playMelody block
None of these formats are compatible/interchangeable and there is a lot of overlap between them. It would be nice to come up with one format to rule them all, so to speak. I believe the requirements look something like this
- Ability to specify a string of note/octave/duration in a human readable way
- Ability to specify a custom sound/instrument with:
a. Waveform
b. Envelopes for different parameters (e.g. pitch, volume)
c. Duration
d. Effects (e.g. interpolation curves, tremolo/vibrato)
e. Chains of all of the above (e.g. multipart sounds to simulate complex envelopes like ADSR)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the existing melody and sound representations across pxt-common-packages and pxt-microbit, using the linked MicroPython, pxt-arcade, and SoundExpression format documentation. Determine whether a unified format can cover the listed note, waveform, envelope, duration, effect, and chaining requirements; done requires an agreed design rather than a single localized code change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100