Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Micro:bit music format #1

Open
mpapec opened this issue Aug 1, 2017 · 5 comments
Open

Micro:bit music format #1

mpapec opened this issue Aug 1, 2017 · 5 comments

Comments

@mpapec
Copy link

mpapec commented Aug 1, 2017

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'?

@dhylands
Copy link
Owner

dhylands commented Aug 2, 2017

Do you have a pointer to the documentation of the format you're looking for?

@mpapec
Copy link
Author

mpapec commented Aug 2, 2017

@scruss
Copy link

scruss commented Jun 29, 2020

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.

@mpapec
Copy link
Author

mpapec commented Jun 30, 2020

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

@davehylands
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants