Tag Info

Hot answers tagged audio

90

The sampling rate of a real signal needs to be greater than twice the signal bandwidth. Audio practically starts at 0 Hz, so the highest frequency present in audio recorded at 44.1 kHz is 22.05 kHz (22.05 kHz bandwidth). Perfect brickwall filters are mathematically impossible, so we can't just perfectly cut off frequencies above 20 kHz. The extra 2 kHz is ...

72

44,100 was chosen by Sony because it is the product of the squares of the first four prime numbers. This makes it divisible by many other whole numbers, which is a useful property in digital sampling. 44100 = 2^2 * 3^2 * 5^2 * 7^2 As you've noticed, 44100 is also just above the limit of human hearing doubled. The just above part gives the filters some ...

32

It is true that, like any convention, the choice of 44.1 kHz is sort of a historical accident. There are a few other historical reasons. Of course, the sampling rate must exceed 40 kHz if you want high quality audio with a bandwidth of 20 kHz. There was discussion of making it 48.0 kHz (it was nicely congruent with 24 frame/second films and the ostensible ...

30

Consider the following: clam-project.org: CLAM (C++ Library for Audio and Music) is a full-fledged software framework for research and application development in the Audio and Music Domain. It offers a conceptual model as well as tools for the analysis, synthesis and processing of audio signals. MARF: MARF is an open-source research platform and a ...

29

FFT is actually not a great way of making a tuner. FFT has inherently a finite frequency resolution and it's not easy to detect very small frequency changes without making the time window extremely long which makes it unwieldy and sluggish. Better solutions can be based on phase-locked loops, delay-locked loops, auto correlation, zero crossing detection ...

26

This is the classic problem of speech detection. First thing to do would be to Google the concept. It is widely used in digital communication and there's been a lot of research conducted on the subject and there are good papers out there. Generally, the more background noise you have to deal with the more elaborate your method of speech detection must be. ...

26

What you really want to do is essentially called as Voice Activity Detection or speech detection. Basically any pure speech signal (which contains no music) has three parts. The voiced sound - which is basically caused by Vowels The unvoiced sound - which contains consonants. The characteristic of human sound is such that while a lot of energy is used ...

24

One approach that I have used in the past is to maintain a phase accumulator which is used as an index into a waveform lookup table. A phase delta value is added to the accumulator at each sample interval: phase_index += phase_delta To change frequency you change the phase delta that is added to the phase accumulator at each sample, e.g. phase_delta = N * ...

21

First of all, how the data is encoded in a mp3 file is irrelevant to the question unless you aim at doing compressed-domain processing (which would be quite foolish). So you can assume your algorithm will work with decompressed time-domain data. The sum / difference is a very, very basic trick for vocal suppression (not extraction). It is based on the ...

18

The physically "correct" way to do this is summing the samples. However when you add two arbitrary samples, the resulting value could be up to twice the maximum value. ... The naive solution here is to divide by N, where N is the number of channels being mixed. That's not the "naive" solution, its the only solution. That's what every analog and digital ...

17

I fear that all answers here are irrelevant to the question. What is called a vocoder in the music production world has little to do with the phase vocoder used in signal processing. To make matters worse the Songify app referenced by the original post is not an example of vocoder. Let us sort this out! 1. Phase vocoder The phase vocoder referenced by the ...

17

What you are trying to do has been tried over and over by hundreds of researchers and there is quite a large body of work about this. Check the proceedings of the ISMIR conference. Even if it is not up to date, read Elias Pampalk's thesis : http://www.ofai.at/~elias.pampalk/publications/pampalk06thesis.pdf To quickly orient you on the right track: Music ...

17

What your distortion box does is apply a non-linear transfer function to the signal: output = function(input) or y = f(x). You're just applying the same function to every individual input sample to get the corresponding output sample. When your input signal is a sine wave, a specific type of distortion is produced called harmonic distortion. All of the ...

17

I recommend having a look at Prof. Julius O. Smith III's Physical Audio Signal Processing. It's available online, or can be purchased through Amazon's print-on-demand service. In particular, the description in the Book Series Overview might be worthwhile.

17

The closest example I can think of is the beginning of Suzanne Vega's "Tom's Diner" which has been used for the mpeg-1 layer 3 development, and is still occasionally used to demo audio codecs.

16

pichenettes is right, of course. The FFT implements a circular convolution while the xcorr() is based on a linear convolution. In addition you need to square the absolute value in the frequency domain as well. Here is a code snippet that handles all the zero padding, shifting & truncating. %% Cross correlation through a FFT n = 1024; x = randn(n,1); % ...

16

The first step is to verify that both your starting sample rate and your target sample rate are rational numbers. Since they are integers they are automatically rational numbers. If one of them wasn't a rational number it would still be possible to make the sample rate change, but it is a much different process and more difficult. The next step is to ...

16

Audio processing is a large field, but specifically in speech processing, an open database of samples known as Harvard Sentences is widely used. Harvard sentences are phonetically balanced collections of sentences in American English. Many equivalent databases exist for other languages as well. Actual files with Harvard Sentences speech can be found here.

15

It's very hard to point you to relevant techniques without knowing any context for your problem. The obvious answer would be to tell you to adjust the gain of each sample so that clipping rarely occurs. It is not that unrealistic to assume that musicians would play softer in an ensemble than when asked to play solo. The distortion introduced by A + B - AB ...

15

If the spectrogram was computed as the magnitude of short time fourrier transforms from overlapping windows, then the spectrogram contains implicitly some phase information. The following iterations do the job : $$x_{n+1} = \text{istft}(S\cdot\exp(i\cdot\text{angle}(\text{stft}(x_n))))$$ $S$ is the spectrogram, $\text{stft}$ is the forward-short time ...

15

By long shot it is doable - to what extend? You will see. This task of environmental sound classification is not very well studied. Also choice of machine learning paradigm is crucial - statistical approach or maybe binary classifier? You can start with GMM's, ANN's and SVM's - I opt for GMM's and ANN's. Yes, most of people are using MFCC's because they are ...

13

One method that works if there's a relatively strong drum beat is to take the magnitude of the STFT of the waveform, and then auto-correlate it in only the time dimension. The peak of the auto-correlation function will be the beat, or a submultiple of it. This is equivalent to breaking up the signal into a lot of different frequency bands, finding the ...

13

In my answer to your that question, I had mentioned that Voice Activity Detection is a standard feature for codecs like G.729 and such others. You should look for reference encoders and decoders for algorithms that applies this. One such example is - http://www.voiceage.com/openinit_g729.php Another possible source is Speex codec. Which implements VAD ...

13

LPC voice coders (starting with the old LPC10 standard, which seems to be the one you refer to here) are based on the source-filter model of speech production. Speech can be characterized by the following properties: The raw sound emitted by the larynx (through vibration of the vocal folds, or just air flowing through it, the vocal folds being opened). The ...

13

First, you will have to correct for differences in timing. For example, if one utterance is "--heeelloooo---" and the other "hellooooooo----" (- representing silence), a direct pairwise comparison of MFCC frames will show differences simply because the two samples are not aligned. You can use Dynamic Time Warping to find the best alignment between the two ...

13

Basically it's all about breaking down the information into several 'bits'. The actual audio signal is a time varying 'value', however often it is useful to consider it in a different form. As an analogy, consider the number 256: depending on what you're doing with your numbers, it might be useful to treat the number as 200 + 50 + 6, or 16 + 240, or 16*16,...

13

DSP is indeed a very mathematical discipline, but not completely. The amount of mathematical knowledge you need to operate DSP concepts comfortably is luckily limited to a particular fairly small subset. I would say that you need the following: Complex variables. DSP deals with oscillating signals and systems, and those are very conveniently represented ...

13

This is a well-studied problem, dating back from the mid 90s (DARPA/NIST broadcast transcription challenges). Search for "speech/music segmentation" or "audio segmentation" and you'll find thousands of research papers. There are two broad approaches to solve this problem: Supervised classification Train a speech/music classifier, using a standard machine ...

13

The Nyquist rate is above twice the bandlimit of a baseband signal that you want to capture without ambiguity (e.g. aliasing). Sample at a lower rate than twice 20kHz, and you won't be able to tell the difference between very high and very low frequencies just from looking at the samples, due to aliasing. Added: Note that any finite length signal has ...

12

One of the best ways to create a sine wave is to use a complex phasor with recursive updating. I.e. $$z[n+1] = z[n]\Omega$$ where z[n] is the phasor, $\Omega = \exp(j\omega)$, with $\omega$ being the angular frequency of the oscillator in radians and $n$ the sample index. Both real and imaginary part of $z[n]$ are sine waves, they are 90 degrees out of ...

Only top voted, non community-wiki answers of a minimum length are eligible