read out carolling christmas bells


Author Message
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1769
Posted: 06:03pm 06 Dec 2025      

Hi Frank,
  Frank N. Furter said  What kind of system is the program for? MMBASIC?

Yes, for Picomites.

play_rtttlv02.zip
(For a nicer bell sound, you could use Play Array, available from version 6.010 onwards. Not yet implemented.)

I imagine it can be easily adapted for the bells by replacing the notes with the bell numbers or pin numbers. Of course, only songs corresponding to the bells can be played.

@Jim:
Thanks for your contribution, it works! But it could still be improved: The "trick" of the RTTTL format is the default values ​​of the header. This makes it very efficient.
I simply use ChatGPT to convert notes and durations from CSV files into the RTTTL format (data lines) for the Pico.
I'm still hesitant to develop a program for this because there are many different input formats.

@Phil
  phil99 said  As far as I can see, RTTTL can only play one note at a time (monophonic ringtone), but most of the tracks on the original Christmas Bells unit can play two notes at a time, and some up to four.

I hadn't considered or noticed that. Your idea has advantages, but also the disadvantage that existing RTTTL files cannot be played back unchanged.

For songs with multiple tracks, if the only concern is sound output via the Pico, I would consider using multiple tracks with RTTTL data and playing them back with the Play Sound function. Controlling the digital outputs (bells) would also be easy to adapt. Unfortunately, I can't test this.

Ultimately, Frank will decide which approach he wants to take.

Regards
Michael