User:Contribution/Chanofreq Project: Difference between revisions
Contribution (talk | contribs) |
Contribution (talk | contribs) |
||
| Line 18: | Line 18: | ||
* '''X:''' An integer ≥ 1, representing the MIDI channel. | * '''X:''' An integer ≥ 1, representing the MIDI channel. | ||
* '''Y:''' An integer ≥ 0, representing the note number. | * '''Y:''' An integer ≥ 0, representing the note number. | ||
* '''Z:''' A decimal number within the range '''minfreq''' ≤ Z < '''maxfreq''', representing the frequency in Hertz. This value is encoded as a positive integer by the parser with a bit depth defined by '''bitfreq''', using the formula: parser_frequency = int(((Z - minfreq) * (2 ** bitfreq) / (maxfreq - minfreq)) + 0.5). Original default settings are set to: minfreq = 0 Hz, maxfreq = 18446.744073709551616 Hz, bitfreq = 64. Thus, Z has a precision of fifteen decimal places. Parsers designed for 32-bit hardware and software should adopt the alternative default settings: minfreq = 0 Hz, maxfreq = 21474.83648 Hz, and bitfreq = 32. By doing so, the Z frequencies specified by users for the original default mode remain compatible, and maintain a precision of five decimal places with an additional sixth decimal place rounded to either 0 or 5, offering a convenient solution. | * '''Z:''' A decimal number within the range '''minfreq''' ≤ Z < '''maxfreq''', representing the frequency in Hertz. This value is encoded as a positive integer by the parser with a bit depth defined by '''bitfreq''', using the formula: parser_frequency = int(((Z - minfreq) * (2 ** bitfreq) / (maxfreq - minfreq)) + 0.5). Original default settings are set to: minfreq = 0 Hz, maxfreq = 18446.744073709551616 Hz, and bitfreq = 64. Thus, Z has a precision of fifteen decimal places. Parsers designed for 32-bit hardware and software should adopt the alternative default settings: minfreq = 0 Hz, maxfreq = 21474.83648 Hz, and bitfreq = 32. By doing so, the Z frequencies specified by users for the original default mode remain compatible, and maintain a precision of five decimal places with an additional sixth decimal place rounded to either 0 or 5, offering a convenient solution. | ||
Commands can be separated by a semicolon (';') or a newline. | Commands can be separated by a semicolon (';') or a newline. | ||