-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6ce865e
commit bc1bd1f
Showing
2 changed files
with
33 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bc1bd1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Melodies are separated by new line (\n).
loadRtttlFile(filepath, "example") would load the melody with title="example".
bc1bd1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great addition, I'm considering it! Do you know if RTTTL specs say if the melody can be split over multiple lines?
Since your update limits a melody to the line.
bc1bd1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had found a document (http://mines.lumpylumpy.com/Electronics/Computers/Software/Cpp/MFC/RingTones.RTTTL) with a lot of ringtone RTTTLs that were separated by new lines, and I wanted to be able to upload just that one file and select RTTTLs from it so I wrote this based on that file.
The official spec (I found it here https://panuworld.net/nuukiaworld/download/nokix/rtttl.htm) states that reader applications must ignore whitespace, which I think would include ignoring newlines. So, it seems like RTTTL was intended to support ringtones spanning multiple lines.
There are a few options for changing this so that it will continue to support multi-line melodies if you want to keep supporting those.
I think that having multiple ringtones in one file may already break away from the spec though, in which case using whitespace new line to separate ringtones may not matter so much other than perhaps decreasing human readability by not allowing each ringtone to be put on multiple lines
bc1bd1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the references. The specs are very clear:
So just one ringtone per file. However, I understand your point, and basically you are building a "database" of melodies within a single file. I propose to create a different method to load a file containing multiple melodies, one per single line. The prototype may be:
and for simplicity, I will constrain each melody to a single line. What do you think?
bc1bd1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that would work well. It will keep the original method compliant with the RTTTL reader specification, while still allowing for the convenience of loading melodies from this type of non-compliant file containing multiple melodies.
bc1bd1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly! I can't promise when, but I will integrate this idea as soon as possible
bc1bd1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HI @aaronkirschen, I have just pushed the modification. May you give it a try?