Hot answers tagged

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 ...


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 ...


12

At the core of MIDI is a representation of music as discrete note events, each of those having a static pitch. This is perfect for representing music as played on keyboard instruments. You can convert any frequency corresponding to a note on the tempered scale into a MIDI note number, using: $69 + 12 \times \log_2 \frac{frequency}{440}$ Under the ...


12

That really depends on your definition of "enevelope" and what you need it for. The Hilbert transform calculates the "analytic" signal, i.e. it calculates a matching imaginary part to a real signal by shifting the phase by 90 degrees in the frequency domain. It's reputation of calculating the "envelope" comes mainly from communication technology. It works ...


10

First, grab Sonic Visualizer, it is much better than Audacity for looking at sounds. What you see here is probably the result of the sum of two simple and stationary sounds at fundamental frequencies close to each other. This causes beating of their fundamental, causing the amplitude modulation (tremolo) you observe. Two important factors make a synthetic ...


9

The AM / FM category is a bit strange for effects - true, you can get some interesting effects by modulating the amplitude of an input signal ; but what does "frequency modulation" mean for a complex input signal for which you don't even have an accurate frequency representation? You could very well say that every effect is an amplitude modulation, by the $\...


9

DAFX is a pretty good one. Harmony Central used to have a surprisingly good knowledgeable base for algorithms but that seem to have disappeared since Guitar Center took them over. A lot of source code can be found at http://www.musicdsp.org/, but it's fairly varied in quality.


9

In designing such transformations, one should take into account competing interests: fidelity to the human auditory system (that varies with people), including non-linear or even chaotic aspects (tinnitus) easiness of the mathematical formulation for the analysis part possibility to discretize it or allow fast implementations existence of a suitable stable ...


8

The very first thing to try would be to implement a rough speech/music classifier to detect a radio host/DJ; and to extract the amplitude envelope to detect fade outs and fade ins. Once you have implemented that and/or if this doesn't solve your problem because your stream is continuous (DJ-style mix), you'll certainly run into the song boundary / song ...


8

a. What is the rate I have to sample the song? Chords are usually played by instruments with f0s in the 100 - 1kHz range, so if your algorithm can work with only the fundamental of each note, a sampling rate of 2kHz is enough. You can't go lower. There is absolutely no point sampling above 16kHz for such a recognition task; and pretty much all the ...


7

Your equations are correct (as a first order approximation). The phon is an attempt to establish a perceptual loudness measurement. Perceived loudness is rather complicated since it needs to take into account what happens in the human auditory system and in the human brain. Here is is how it works: First you measure the sound energy at the listener's ...


7

Step 1 Compute the STFT $S(m, k)$ of the signal using a frame size smaller than the pulse duration. I assume that this frame size will still offer sufficient frequency discrimination between f1, f2, f3 and f4. $m$ is the frame index, $k$ is the FFT bin index. Step 2 For each STFT frame, compute the dominant fundamental frequency using something like YIN, ...


6

MIDI is a protocol that allows (primarily) synthesizers to control or be controlled by other synthesizers or computers. It's a serial protocol that allows to exchange messages such as "key C1 up" "key D4 down" "key velocity, "sound change", etc. Many controllers have a "pitch wheel" that's a joystick or am modulation wheel. These allow the player to ...


6

The matlab codes that implemented D. Ellis's algorithm are on their website: http://labrosa.ee.columbia.edu/projects/beattrack/


6

Depends to some degree on the instrument: electronic versus mechanical, string versus reed versus pipe, etc. Typical electronic keyboards have no coupling between keys, and the DSP mixer is usually very close to linear (other than quantization effects, etc., unless the level is high enough to cause clipping, or kick in an AGC). But guitars and pianos do ...


5

Some accordions have multiple reeds per note, with the reeds not precisely in tune with other. So you see beats. You also see some odd harmonics unhidden during lower frequency beat cancellation.


5

As I commented on a previous post, the time-frequency analysis method known as "short term Fourier transform" $X$ is equivalent to a filter bank, analysing your signal $x$. For a given analysis window $w_n$, of size $N$, the filter at frequency $k/N$ is : $$ h_n=w_{−n}e^{j2\pi\frac{nk}{N}}$$ For usual analysis windows (Hann, Hamming, or even rectangle), ...


5

First, with the classic short-term Fourier transform approach, there are alternative to interpolation - in particular techniques making use of phase information to recover the instantaneous frequency (See this question) which can give you very accurately the position of a spectral peak without an increase of FFT size. The drawback, as you correctly said, is ...


5

You probably need more than one algorithm for an accurate detection. Work on frequency domain (mostly via DFT and spectrogram) is the most often used initial transform. After that sophisticated probabilistic models originally used in speech recognition are applied, such as hidden Markov models, dynamic Bayesian networks, and conditional random fields. The ...


5

The two concepts are related to two different dimensions or aspects of music which might or might not be correlated. Onset detection is concerned with finding the points in time at which sounds start. Doing this does not require prior knowledge of the particular pitch (or fundamental frequency) of the sound. It may indeed rely on the property that at the ...


5

Since the notes from a guitar are no pure sinusoids, you should expect to see some harmonics, even when analyzing the dry signal without effects. E.g., the note E is the perfect fifth of the note A, i.e., it is the second harmonic. If you use distortion or modulation effects (chorus, flanger, and phaser) you get even more additional frequencies due to the ...


5

Yeah some of us can do it, you can speed up or slow down without affect the pitch, some guys call this applications of Time Stretch, there different ways to do it, you can do in frequency domain or time domain, you will need choose what is best for you, you will find some advantages and disadvantages of each. Time Domain: In Time Domain you can try some ...


4

Consider trying an upsampled or interpolated ASDF, AMDF, autocorrelation or other similar periodicity estimation algorithm. There in an information theoretic time versus frequency resolution versus noise trade-off. At a sample rate of 44100, estimating 440 Hz +-2 Hz might require somewhere in the range of 2 to 6 times 44100/440 samples (to determine the ...


4

Quick answers a. At least 32 kHz b. no c. finite but large. 1000s. If you factor in inversions and "over" notations, tens of 1000s. This is actually a really hard problem. Chords are made of individual notes. However these notes have fundamentals and harmonics. They are not pure sinusoid. Let's say you play C7/#9 chord (C seven sharp nine) on a guitar ...


4

A pluck might produce significantly more broadband noise than a free string. An FFT of such noise would show more relative energy outside of all the FFT result bins that are related to (F0 or overtones of) a single pitch. Also, a free string has a more predictable decay rate in any FFT magnitudes related to the pitch across successive offset FFT frames ...


4

The Hilbert transform does NOT calculate an analytic signal. If we have a real-valued sequence $x(n)$, and the Hilbert transform of $x(n)$ is $x_H(n)$, the analytic signal, $a(n)$, associated with $x(n)$ is: $$a(n) = x(n) + jx_H(n)$$ Computing the magnitude of $a(n)$ will give you the instantaneous envelope of the original $x(n)$ sequence. This works ...


4

Frequency or pitch? There are already tons of research papers and books on human pitch perception. But, IIRC, humans tend to be bad at accurately "extracting" frequencies unless they happen to be a pitch fundamental. And multiple frequency peaks within a "critical band" tend to be perceived as noise. So any method with "near human accuracy" may also have ...


4

A few things: Not all instruments have partials neatly defined by the $h_n = nf$. Kettle drums would be an obvious example, but bells are another. In this case, you will be way off looking in the "usual places" +/- 5%. Many instruments have only even or odd harmonics. Others are designed to omit some harmonics. The piano, for example, is designed to have ...


4

The up-sampling process will always change the signal in some measurable way. However, if it's done properly the changes are negligible and don't result it any audible difference. Most commercially sample rate converters (hardware or software implementations), do a really good job at this. Off course, if done badly, upsampling can result in clearly audible ...


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