Greetings all,
I recently bought the Tiny FX kit and have it lighting my Crib.
I was thinking of using the speaker to play a Christmas Carol “away in a manger” but I’m not sure how to programme music via micropython. I found an example but don’t quite understand the tone numberings:
audio example
Any help or examples greatly appreciated.
Josey
The numbers I presume are note frequencies, rounded up to whole numbers.
2 Likes
Thanks for that. I’m cobbling a tune together using that table now.
Was wondering though is it p[ossible to play a “WAV” file on the TinyFX and output it to the speaker?
The answer is “yes”. I have not tried it yet. You need to explore the GitHub examples and look for the photon_sword.py file in examples > tiny_fx > examples > audio.
The code around line 42 shows the syntax for playing a wav file.
I know this is not ideal but I suspect it is all Pimoroni has the resources to offer at the moment. They make great boards with excellent, supportive MicroPython builds so it is worth persisting.
If I could copy and paste a link for you I would. The GitHub app gets in the way.