Open mpapec opened 7 years ago
Do you have a pointer to the documentation of the format you're looking for?
Only this,
http://coderdojoscotland.com/wp-content/uploads/2016/04/Musical-Microbit.pdf (page 5)
micro:bit's music format is MML/SMX, aka Music Macro Language used in GWBASIC/QBasic/MSX BASIC/Linux speaker tunes. The standard parser library, MMLlib, is probably a little large for MicroPython.
I don't know how much of the rather baroque MML standard is supported by the micro:bit. RTTTL assumes a fixed tempo, MML can change tempo at any time.
I was looking for a way to translate RTTTL tune format into MML one; no need to do it on the fly using board itself. This should be possible as MML supports more features?
Support can be tried out without owning microbit ("edit code" to change tones) https://makecode.microbit.org/_F4CdWFVsohL8
I'm not familiar with MML, so I'm not sure. You can run this library on your host PC. It doesn't have code that is specific to the microcontroller.
The pc_test.py
shows a simple example of using the library from a PC: https://github.com/dhylands/upy-rtttl/blob/master/pc_test.py
Hello,
when I run pyb_test.py I've got values like
(587.4, 214.28571428571428) (622.2, 214.28571428571428) (659.2, 214.28571428571428) ...
Is there a way to output in microbit format eg. 'g4:1', 'c5', 'e', 'g:2', 'e:1', 'g:3'?