User:Contribution/Chanofreq Project: Difference between revisions

Contribution (talk | contribs)
Contribution (talk | contribs)
No edit summary
Line 36: Line 36:
  YAML content
  YAML content
  </meta>
  </meta>
=== Comments ===
Inline comment:
# Inline comment
Multiline comment:
/* Multiline
comment */
Nota bene: YAML metadata only supports inline comment.


=== Tuning control ===
=== Tuning control ===
Line 87: Line 96:
Practical example of shorthands:
Practical example of shorthands:
  @alias channel: c, note: n, frequency: f, internal: i, default: d, minfreq: min, maxfreq: max, bitfreq: bit
  @alias channel: c, note: n, frequency: f, internal: i, default: d, minfreq: min, maxfreq: max, bitfreq: bit
=== Comments ===
Inline comment:
# Inline comment
Multiline comment:
/* Multiline
comment */
Nota bene: YAML metadata only supports inline comment.


== Behavior on Loading ==
== Behavior on Loading ==
Upon loading a Chanofreq file, all notes start in an inactive state. As the file is read, each channel and internal command activates the specified note and assigns it the corresponding frequency. If a note that is already active is specified again, its frequency is updated to the new value provided. The same process applies to any default settings defined in the file. After processing the entire file, any notes that remain unspecified are assigned the default frequency if one is set. If no default frequency is provided, these notes remain inactive.
Upon loading a Chanofreq file, all notes start in an inactive state. As the file is read, each channel and internal command activates the specified note and assigns it the corresponding frequency. If a note that is already active is specified again, its frequency is updated to the new value provided. The same process applies to any default settings defined in the file. After processing the entire file, any notes that remain unspecified are assigned the default frequency if one is set. If no default frequency is provided, these notes remain inactive.
The parser encodes frequencies according to the formula: parser_frequency = int(((FREQUENCY - minfreq) * (2 ** bitfreq) / (maxfreq - minfreq)) + 0.5). Once a frequency setting is changed, it stays effective throughout the entire file until a new modification replaces it.


Once an alias is assigned to a keyword, it stays effective throughout the entire file until a new alias replaces it. The original keyword can still be used alongside the alias.
Once an alias is assigned to a keyword, it stays effective throughout the entire file until a new alias replaces it. The original keyword can still be used alongside the alias.
The parser encodes frequencies according to the formula: parser_frequency = int(((FREQUENCY - minfreq) * (2 ** bitfreq) / (maxfreq - minfreq)) + 0.5). Once a frequency setting is changed, it stays effective throughout the entire file until a new modification replaces it.


Comments are ignored by the parser and do not affect the file's execution. They can be used to provide explanations or annotations within the file.
Comments are ignored by the parser and do not affect the file's execution. They can be used to provide explanations or annotations within the file.