microsoft / microsoft/pxt-microbit
ability to send faster Serial / ASYNC on physical pin
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 804
- Forks
- 721
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 2
Description
Is your feature request related to a problem? Please describe.
Serial transmission over a physical pin is slow, specifically it takes a long time between messages sent. For me personally this creates problems when sending MIDI messages directly to physical synths via a physical pin. It can take 10ms between sending notes which leads to staggered notes when attempting to play a chord, or trigger multiple drums simultaniously.
Describe the solution you'd like
The ability to send midi messages faster. The microbit dal serial drivers can send ASYNC:
https://github.com/lancaster-university/microbit-dal/blob/master/source/drivers/MicroBitSerial.cpp#L294
It would be great if this was accessible via javascript in the makecode editor.
Describe alternatives you've considered
Use i2c between the microbit and a second microcontroller that in turn then sends MIDI messages to synths.
Additional context
Not sure if this is related, but when receiving serial data at MIDI baudrate I the microbit loses so many bytes that it becomes inpractical to use (therefore i have resorted to using i2c here too).
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 with MicroBitSerial.cpp at the referenced ASYNC implementation and trace how serial APIs are exposed to JavaScript in the MakeCode editor. The requested result is a JavaScript-accessible faster asynchronous send path for MIDI over a physical pin; the separate receive-at-MIDI-baudrate concern may need scope clarification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript
- Domain
- developer-experience, embedded-iot
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100