GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ymic9963/mix2mono: Tool for converting multi-channel audio files to a single channel (mono) file.

BranchesTags
Open more actions menu

Latest commit

 

History

25 Commits
25 Commits

Folders and files

NameName
Last commit message
Last commit date
install
install
 
 
tests
tests
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
main.c
main.c
 
 
mix2mono.c
mix2mono.c
 
 
mix2mono.h
mix2mono.h
 
 

Repository files navigation

Mix2Mono - Multi-channel to Single-channel Audio Files

badge coverity

Mix your multi-channel audio file to a single-channel (mono) audio file. Mix2Mono also preserves the input file extension and encoding.

Originally created to be used internally within my Discrete Fourier Transform Tool but ended up being something useful as a standalone tool. Reason for making this is that single channel data is easier to process in certain cases.

To mix the multi-channel data into one channel, the equation below is used,

$$ x_{mono} = \sum_{n = 0}^{N}\sum_{c = 0}^{C} x_{in}[n * C + c] / C $$

where,

  • $x_{mono}$ is the output buffer with the mono data
  • $x_{in}$ is the input buffer of the inputted audio file.
  • $C$ is the number of channels present.
  • $N$ is the number of samples present in the input buffer.

Installing

Currently an automatic installation exists only for Windows, and binaries are built only for Windows. For other Operating Systems you need to build from source.

Windows

To install automatically, use the install script located in install/ by executing the command below in a PowerShell terminal with Admin rights,

irm "https://raw.githubusercontent.com/ymich9963/mix2mono/refs/heads/main/install/mix2mono-windows-install.ps1" | iex

The script downloads the executable, moves it to C:\Program Files\mix2mono\, and adds that path to the system environment variable. If you do not want the automated script feel free to download the executable or build from source. In case your organisation doesn't allow you to install from the script due to protected paths, download the script and change the $MIX2MONO_install_path variable to a location that suits you.

macOS & Linux

Please the Building section. Use make to build from source.

Usage

To use mix2mono it is done by executing,

mix2mono <audio file>

With optionally adding a --info flag for some more info about the audio file.

The --help option is listed below,

Mix2Mono options,

Basic usage, `mix2mono <audio file>`.

        -i,     --input <file>  = Path or name of the input file.
        -o,     --output <file> = Path or name of the output file.
                --info          = Output to stdout some info about the input file.
                --version       = Output version number.

Building

Only dependency is libsndfile. Clone the repository and go to this directory. Using make simply run in a command line,

make

And mix2mono should be build in a new build/ directory.

Tests and Coverage

Running the tests or coverage can be done by running,

make test
make coverage

Testing suite used is Unity and LLVM-COV for coverage.

About

Tool for converting multi-channel audio files to a single channel (mono) file.

Topics

audiodsp

Resources

Readme
GPL-3.0 license
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.