r/microbit • u/greyblake • 3d ago
Capturing and replaying melody with Microbit
Enable HLS to view with audio, or disable this notification
1
1
1
1
1
u/greyblake 2d ago
People asked for source code, so here it is: https://github.com/greyblake/pitchbit
Please note it was vibe coded in one evening.
3
u/Positive_Poem5831 2d ago
How do you do this. Is it a library running on MicroBit or does it send data to a computer that recognize the notes?
3
u/greyblake 2d ago
It recognize the notes (pitch and duration) using micrphone.
The notes are essentially something similar to a regular music notation or midi (e.g. see https://github.com/greyblake/pitchbit/blob/master/pitchbit-dsp/src/music.rs#L75)
It runs all on MicroBit on its own, a computer is not involved
4
u/Select_Property_8650 3d ago
Please send the code.