Note onset detection

Here is a graphic that illustrates the threshold approach to note onset detection: This image shows a typical WAV file with three discrete notes played in succession. The red line represents a chosen signal threshold, and the blue lines represent note start positions returned by a simple algorithm that marks a start when the signal … Read more

How is audio represented with numbers in computers?

Physically, as you probably know, audio is a vibration. Typically, we’re talking about vibrations of air between approximitely 20Hz and 20,000Hz. That means the air is moving back and forth 20 to 20,000 times per second. If you measure that vibration and convert it to an electrical signal (say, using a microphone), you’ll get an … Read more

What do the bytes in a .wav file represent?

You will have heard, that audio signals are represented by some kind of wave. If you have ever seen this wave diagrams with a line going up and down — that’s basically what’s inside those files. Take a look at this file picture from http://en.wikipedia.org/wiki/Sampling_rate You see your audio wave (the gray line). The current … Read more

Detecting when head phones are plugged in

In Windows Vista and beyond, you can use the device arrival and removal notifications and retrieve the endpoint formfactor to determine if the manufacturer of your audio solution considers a particular endpoint a “headphone”. Before Vista there was no way of determining this information.

How to overlay/downmix two audio files using ffmpeg

stereo + stereo → stereo Normal downmix Use the amix filter: ffmpeg -i input0.mp3 -i input1.mp3 -filter_complex amix=inputs=2:duration=longest output.mp3 Or the amerge filter: ffmpeg -i input0.mp3 -i input1.mp3 -filter_complex amerge=inputs=2 -ac 2 output.mp3 Downmix each input into specific output channel Use the amerge and pan filters: ffmpeg -i input0.mp3 -i input1.mp3 -filter_complex “amerge=inputs=2,pan=stereo|c0<c0+c1|c1<c2+c3” output.mp3 mono … Read more

What is the best way to merge mp3 files? [closed]

David’s answer is correct that just concatenating the files will leave ID3 tags scattered inside (although this doesn’t normally affect playback, so you can do “copy /b” or on UNIX “cat a.mp3 b.mp3 > combined.mp3” in a pinch). However, mp3wrap isn’t exactly the right tool to just combine multiple MP3s into one “clean” file. Rather … Read more