Giter Club home page Giter Club logo

mixer's Introduction

Mixer

Ever thought of listening to 2 songs at the same time?? Well now you can.

Wav file can have multiple channels. If a wav file has 2 channels, & you are using headphones to listen to the audio, both the channels are played independently on the left & right side of the headphones.

mix.cpp takes 2 wav files as input and produces a third wav file as output. This output wav file has 2 channels. The first channel is composed of the the first input wav file & the 2nd channel is composed of the 2nd input wav file.

So when you listen to the output wav files, you can listen to 2 different songs (audio files) at the same time. One playing on the left side of the headphone & the other on the right side of the headphone.

Demo
Input File 1 demo / song1.wav
Input File 1
Wave diagram
Input File 2 demo / song2.wav
Input File 2
Wave diagram
Output File demo / song1 + song2.wav
Output File
Wave diagram



Stereo to Mono

stereo_to_mono.cpp is a C++ code which can convert a stereo Wav file to a mono Wav file.

Difference between mono & stereo - stackexchange.com

Wav file format

Data is stored in channels in a wav file. If a wav file has 2 channels, both the channels may have different content & it may sound different while using headphone as difference can be spotted through the left & right side of the headphone. On a single speaker device, both the channels are combined and played.

Virtual Barber Shop Haircut - soundcloud.com best example of how having 2 different channels can be beneficial and produce some great content.

But some people prefer mono over stereo. Stereo can be converted to mono by mixing both the channels of the stereo and forming a single mono channel. The data read from wav file has to be converted into Fractional Binary Fixed-Point Numbers[3] before mixing it into a single channel.

Demo
Input Stereo file demo / stereo_file.wav
Wave of input
stereo file
Output Mono file demo / mono_file.wav
Wave of ouput
mono file

References

1. Microsoft WAVE soundfile format - soundfile.sapp.org
2. Wav (RIFF) File Format Tutorial - topherlee.com
3. Number Systems for Digital Audio - dsprelated.com

mixer's People

Contributors

ashwek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.