User:Contribution/Chanofreq Project
Chanofreq Project
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
Format Name: Chanofreq
Etymology: Derived from Channel, Note, and Frequency.
File Structure
A Chanofreq file is a text file containing commands with the following structure:
channel X note Y frequency Z
- X: An integer ≥ 1, representing the MIDI channel.
- Y: An integer ≥ 0, representing the note number.
- Z: A 64-bit floating-point number > 0, representing the frequency in Hertz.
Commands can be separated by a semicolon (';') or a newline.
Examples:
channel X1 note Y1 frequency Z1; channel X2 note Y2 frequency Z2 channel X3 note Y3 frequency Z3
Syntax
File identification and version declaration
The first line of a Chanofreq file must declare the format and version to ensure compatibility:
chanofreq version ?.?.?
Metadata support
Metadata is optional but should be declared on the second line if included. This allows software to quickly identify metadata without scanning the entire file. All metadata fields are optional and should be enclosed in either single (') or double (") quotation marks:
/*@meta Title: 'Your Title Here' Author: 'Author Name' Date: 'YYYY-MM-DD' Description: 'Brief description of the tuning.' Usage: 'Instructions on how to use this tuning file.' */
Tuning control
To define tuning for instruments controlled via MIDI, use:
channel X note Y frequency Z
For instruments with internal notes not controlled by MIDI (such as those with built-in sequencers or keyboards), use:
internal note Y frequency Z
To set a fallback frequency for any unspecified note Y across all channels and internal settings, use:
default note Y frequency Z
Comments
Inline comment:
/* Inline comment */
Multiline comment:
/* Multiline comment */
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.
Validation Rules
| Todo: Case sensitivity
Ensure the format is explicit about whether commands are case-sensitive or not. |
Development Roadmap
- File Format Specification: Draft a detailed file format specification document. This should involve stakeholders to ensure all use cases are covered.
- Research Phase: Explore existing formats, gather user requirements, and establish a foundation for design decisions.
- Prototyping Stage: Develop a minimal viable product (MVP) of the
.cnffile parser and validator for early testing and feedback. - Set up a GitHub repository: Engage initial contributors and stakeholders to participate in the development process and foster open collaboration.
- Feedback Loop: Refine the MVP parser and validator through extensive user testing and iterative improvements.
- Web Interface: Develop an online tool for easily creating
.cnffiles. - Virtual Synthesizer: Build a basic virtual synthesizer supporting
.cnfformat to serve as a reference implementation for developers. - Compatibility Testing: Ensure the format's compatibility with both MIDI 1 and MIDI 2 standards, as well as with common DAWs and MIDI hardware.
- Beta Testing and Feedback: Open a phase for musicians, developers, and other stakeholders to test the
.cnfformat and provide feedback. - Diverse Test Group: Gather feedback not only on the format itself but also on its intuitiveness and usability for a wide range of users, including those unfamiliar with microtuning, advanced microtonal musicians, plugin developers, and hardware developers.
- Tools for developers: Provide ready-to-use open-source libraries in multiple languages, a simple SDK with comprehensive documentation, and reference plugins. Create tools for automatic code generation and an API for parsing
.cnffiles. Provide automated test suites that developers can use to verify that their implementations correctly adhere to the.cnfformat. - Performance Benchmarks: Ensure that both software and hardware can parse
.cnffiles as efficiently and quickly as possible, especially when dealing with large files or real-time tuning changes. - Documentation and Tutorials: Write comprehensive documentation and tutorials, including a technical reference for developers and a user guide for musicians and other end-users.
- Presentation Video: Produce a compelling video to introduce the
.cnfformat and demonstrate the synthesizer, showcasing its utility for developers and users. - Integration Testing: Perform integration testing with various free virtual instruments to ensure smooth interoperability.
- Collaboration with Scale Workshop: Work with Scale Workshop to incorporate
.cnffile creation into their web interface. - Collaboration with Oddsound: Partner with Oddsound to integrate the
.cnfformat into their MTS-ESP Mini and MTS-ESP Master plugins. - Update Xen Wiki: Add a "Multi-Channel Tuning Ability" column to the List of Microtonal Software Plugins, highlighting developers who properly implement the
.cnfformat or MTS-ESP Multi-Channel. - Advocacy: Promote the adoption of the
.cnfformat and MTS-ESP Multi-Channel among tuning-friendly companies. - Partnerships with DAW Developers: Collaborate with leading DAW developers to enable native integration of
.cnffiles within the DAW environment.
Long-Term Strategy and Maintenance
Chanofreq version 1.0.0 must be fully compatible with both MIDI 1 and MIDI 2 standards. It should also support tuning an unlimited number of channels and notes, ensuring future adaptability with potential new formats and technologies.