We should have a common format for describing tunes (series of beeps) across the different implementations in this repository. Extensive searching was done, a simple widespread standard was not found.
Following is proposed:
- Simple text file
- Each line represents a beep or a pause
- Column one is a positive integer number of milliseconds
- Column two is a positive integer frequency in Hz, or
0 which represents silence
- Columns are separated by a space
- Line ending is unix format (
\n, but \r\n should not cause an error when reading file)
- File extension is
.tune
- Consider adding a silence at the end so that looped playback sounds good :-)
Example for mary_had_a_little_lamb.tune:
400 2673
400 2349
400 2093
400 2349
400 2673
400 2673
790 2673
400 2349
400 2349
790 2349
400 2673
400 3136
790 3136
400 2673
400 2349
400 2093
400 2349
400 2673
400 2673
400 2673
400 2673
400 2349
400 2349
400 2673
400 2349
790 2093
400 0
Work plan:
Related: #1
We should have a common format for describing tunes (series of beeps) across the different implementations in this repository. Extensive searching was done, a simple widespread standard was not found.
Following is proposed:
0which represents silence\n, but\r\nshould not cause an error when reading file).tuneExample for
mary_had_a_little_lamb.tune:Work plan:
tunes/folder.tunefile on the command line / stdin or however elseRelated: #1