|
Forum Index : Microcontroller and PC projects : read out carolling christmas bells
| Author | Message | ||||
| Frank N. Furter Guru Joined: 28/05/2012 Location: GermanyPosts: 1021 |
@zeitfest: I still have a doorbell like that somewhere in my collection. Michael, I have to agree with you—I feel the same way! I'm excited and hope that my tubes sound better. Frank |
||||
| twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1702 |
Hi Frank, Hi Frank, I’m glad that we agree. My point was simply that you shouldn't put all your work into the project and then realize too late that the concept has flaws. I'm learning a lot about music and MIDI from your project. For example: First, I saved the sheet music for "Hark! - The Herald Angels Sings" as a CSV file (s. screenshot) from a MIDI file for comparison (D4, G4, G4, F#4, G4,...). In addition, the formulas (or functions) for Transpose SPN, Convert SPN -> Frequency, SPN -> MIDI(Number). ![]() By the way, before you posted your project, I was also working on ding/dong doorbells – as a PicoMite project. The reason was a faulty CR2032 battery in my wireless doorbell. I discovered that CR2032 batteries are perfectly suited for real-time clock (RTC) chips, but are often a frustrating source of errors in many other applications. But I digress ... Have a good evening ... Michael causality ≠ correlation ≠ coincidence |
||||
| twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1702 |
Hi Frank, I'm sure you can figure it out yourself, but maybe RTTTL can give you some inspiration? I have a small RTTTL playback program that I could send you via PM for testing. https://de.wikipedia.org/wiki/Ring_Tones_Text_Transfer_Language Kind regards Michael I found examples of RTTTL sound here: e.g., Rudolph the Red-Nosed Reindeer: https://1j01.github.io/rtttl.js/#Postman%20Pat EDIT: I should perhaps clarify that I only mean the storage format adapted for PicoMites as DATA lines: e.g., Tune1: Data "Jingle Bells:d=4,o=5,b=170" Data "B,B,B,P,B,B,B,P,B,D6,G.,8A,2B.,8P,C6,C6,C6." Data "8C6,C6,B,B,8B,8B,B,A,A,B,2A,2D6" Data "" encodes this: B 5 987.77Hz 353ms B 5 987.77Hz 353ms B 5 987.77Hz 353ms B 5 987.77Hz 353ms B 5 987.77Hz 353ms B 5 987.77Hz 353ms B 5 987.77Hz 353ms D 6 1174.66Hz 353ms G 5 783.99Hz 529ms A 5 880.00Hz 176ms B 5 987.77Hz 1059ms C 6 1046.50Hz 353ms C 6 1046.50Hz 353ms C 6 1046.50Hz 529ms C 6 1046.50Hz 176ms C 6 1046.50Hz 353ms B 5 987.77Hz 353ms B 5 987.77Hz 353ms B 5 987.77Hz 176ms B 5 987.77Hz 176ms B 5 987.77Hz 353ms A 5 880.00Hz 353ms A 5 880.00Hz 353ms B 5 987.77Hz 353ms A 5 880.00Hz 706ms D 6 1174.66Hz 706ms Edited 2025-12-05 06:41 by twofingers causality ≠ correlation ≠ coincidence |
||||
| Frank N. Furter Guru Joined: 28/05/2012 Location: GermanyPosts: 1021 |
Yes, it's unfortunate that I won't know how it sounds until everything is set up. Today I got the materials to install the electromagnets... What kind of system do you have the program for? MMBASIC? In the past, I have played RTTTL on µCs with GCB. I have a lot of RTTTL files. Unfortunately, GCB did not play many files to the end but stopped in the middle... Frank |
||||
TassyJim![]() Guru Joined: 07/08/2011 Location: AustraliaPosts: 6397 |
I have a program to convert Nokia ring tomes (and QB sounds) to MMBasic tones JingleBells: 'd=4,o=5,b=125 data "JingleBells:d=4,o=5,b=125:8g,8e6,8d6,8c6,2g,8g,8e6,8d6,8c6,2a,8a,8f6,8e6" data "8d6,8b,8g,8b,8d6,8g.6,16g6,8f6,8d6,2e6,8g,8e6,8d6,8c6,2g,16f#,8g,8e6" data "8d6,8c6,2a,8a,8f6,8e6,8d6,8g6,16g6,16f#6,16g6,16f#6,16g6,16g#6,8a.6" data "16g6,8e6,8d6,c6,g6,8e6,8e6,8e.6,16d#6,8e6,8e6,8e.6,16d#6,8e6,8g6,8c.6" data "16d6,2e6,8f6,8f6,8f.6,16f6,8f6,8e6,8e6,16e6,16e6,8e6,8d6,8d6,8e6,2d6" data "" play_QB.zip It plays fast on MMB4W It may be of some use Jim VK7JH MMedit |
||||
| phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2873 |
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 imagine a modified RTTTL could accept an interval of 0 to indicate more than one note at a time. eg. in the line below ,0B,0C,D, would indicate B, C & D are to be played together for 353mS. Data "8C6,C6,B,0B,0C,D,8B,8B,B,A,A,B,2A,2D6" |
||||
| twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1702 |
Hi Frank, 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 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 causality ≠ correlation ≠ coincidence |
||||
| Frank N. Furter Guru Joined: 28/05/2012 Location: GermanyPosts: 1021 |
Hi Michael, I won't need your player for this project (thank you very much for it) – but I have other ideas where your player would definitely come in handy! Frank |
||||
| phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2873 |
I think the only issue would be the polyphonic tracks might not be playable on a standard RTTTL player, though some might try to play the notes one after the other. Playing regular monophonic RTTTL tracks on the polyphonic player should not be an issue as notes without a leading 0 are played as normal. Notes with a leading 0 are are played with the next one without a 0. In my previous example ",0B,0C,D," B and C are played with D for the time defined in the header. If it was ",0B,0C,2D," the only difference would be the duration of the 3 notes. For the actual bells Frank's current track format does what the original unit does so perhaps keep that and use another program to convert RTTTL tracks to that format for playing on the bells. Another feature of Frank's format is that it can vary how hard the bells are struck via the solenoid pulse duration. Some of Frank's tracks make use of that but I don't see that in RTTTL. The version I last posted, Random Player can select individual tracks on a play-list so could be adapted to play the converted RTTTL tracks. Edit. One thing that may be worth changing is to make provision to add more bells in the future. Currently it skips C#6, D#6, G#6, C#7 and D#7. It should be easy enough to extend the range to 2 full octaves from A6 to G#7 on Pico Port GP0 to GP23. You probably will never need them all but the Pico has plenty of pins and you have flexibility in adding bells. The track files would need to be reprocessed to use the appropriate pins. EDIT 2. Just realized a standard Pico doesn't have GP23 available so G#7 will need to be redirected to GP28. Audio will be on GP26 and GP27. I have been using a "RP2040 16MB Purple" module which has all pins available. Edited 2025-12-07 20:16 by phil99 |
||||
| twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1702 |
Hi Frank, Everything's fine. It was just a collection of ideas. Sorry if it distracted you. I won't be writing anything more about the RTTTL topic here. @Phil, See above. I'm out of this discussion for now. I only mentioned RTTTL because it offers the possibility to simply play many existing songs to then decide which ones are suitable for Chimes. Kind regards Michael causality ≠ correlation ≠ coincidence |
||||
| Frank N. Furter Guru Joined: 28/05/2012 Location: GermanyPosts: 1021 |
@twofingers: Hi Michael, no, no — everything's fine!!! Thank you very much for your player. It's really very interesting for other projects! I'm currently wondering how to drill 14 mm holes in a beech wood strip. I only have a 13 mm drill bit and a 15 mm Forstner drill bit here... Frank |
||||
| twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1702 |
Hi Frank, everything's fine, I just want to avoid distracting you too much. I'm curious about your results. But no stress! It's not the last Christmas. (I hope so, but I could be wrong.) Kind regards Micheal causality ≠ correlation ≠ coincidence |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |