User:Contribution/Chanofreq Project: Difference between revisions

Contribution (talk | contribs)
No edit summary
Contribution (talk | contribs)
No edit summary
Line 1: Line 1:
== Chanofreq Project ==
== Chanofreq Project ==


'''Objective:''' To develop a standardized file format that enables precise tuning of each note on every MIDI channel to a specific frequency, utilizing a minimalistic data structure.
'''Objective:''' The Chanofreq project aims to develop a standardized file format that allows precise tuning of each note on every MIDI channel to a specific frequency, using a minimalistic data structure.


'''File Extension:''' .cnf
'''File Extension:''' .cnf
Line 7: Line 7:
'''Format Name:''' Chanofreq
'''Format Name:''' Chanofreq


'''Etymology:''' Derived from '''''Chan'''nel'', '''''No'''te'', and '''''Freq'''uency.''
'''Etymology:''' Derived from '''''Chan'''nel'', '''''No'''te'', and '''''Freq'''uency''.


== File Structure ==
== File Structure ==
A Chanofreq file is a text file containing commands formatted as follows:
A Chanofreq file is a text file containing commands with the following structure:


  channel X note Y frequency Z
  channel X note Y frequency Z


* '''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 64-bit floating-point number > 0 (representing the frequency in Hertz).
* '''Z:''' A 64-bit floating-point number > 0, representing the frequency in Hertz.


Commands can be separated by either a semicolon or a newline.
Commands can be separated by a semicolon (';') or a newline.


Examples:
Examples:
Line 25: Line 25:


== Syntax ==
== Syntax ==
To specify tuning for MIDI-controlled instruments, use:
To define tuning for instruments controlled via MIDI, use:
  channel X note Y frequency Z
  channel X note Y frequency Z
For instruments with internal notes not controlled via MIDI (like those with built-in sequencers or keyboards), use:
For instruments with internal notes not controlled by MIDI (such as those with built-in sequencers or keyboards), use:
  internal note Y frequency Z
  internal note Y frequency Z
To set a fallback frequency for any unspecified note Y across all channels and internal settings:
To set a fallback frequency for any unspecified note Y across all channels and internal settings, use:
  default note Y frequency Z
  default note Y frequency Z
Comments:
Comments:
Line 38: Line 38:


== Behavior on Loading ==
== Behavior on Loading ==
When a Chanofreq file is loaded, all notes are initially set to an inactive state. As the file is processed, each channel and internal command activates the corresponding note and assigns it a specified frequency. If a command specifies a frequency for a note that is already active, the note's frequency is updated to the new value. The same process applies to any default settings specified in the file. Once the file has been fully processed, any notes that remain unspecified are set to the default frequency, if one is provided. If no default frequency is defined, the unspecified 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.


== Planned Projects ==
== Planned Projects ==