Tag Info

Hot answers tagged pitch

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

10

I've never seen the word "Formula" with "AMDF". My understanding of the definition of AMDF is $$Q_x[k,n_0] \triangleq \frac{1}{N} \sum\limits_{n=0}^{N-1} \Big| x[n+n_0] - x[n+n_0+k] \Big|$$ $n_0$ is the neighborhood of interest in $x[n]$. Note that you are summing up only non-negative terms. So $Q_x[k,n_0] \ge 0$. We call "$k$" the "lag". clearly if ...

9

I've tried to get the bin with greatest magnitude but that only give me right results for higher pitch signals, it doesn't matter which oversampling factor I use I still get bad data for low freq signals. That's because the harmonics are larger than the fundamental. Plot your spectrum and you'll see. A better method to find the true fundamental is ...

9

If you really insist on using FFT (rather than parametric methods, which wouldn't suffer from time/frequency trade-offs), you can fake a much better resolution by using the phase information to recover the instantaneous frequency for each FFT bin. Partials can then be detected by looking for plateaus in the function giving instantaneous frequency as a ...

9

You are right that the repetition is around 650 by how exactly do I compute that automatically? Seems like a peak-picking problem to me? Or is there some other methods that can be used? Yes, it's just peak-picking. Your period is the x value of the first strong peak: Your peaks are all similar in height, probably because you're doing the autocorrelation ...

9

"Is there a way to measure frequency (detect pitch) better than FFT, that is, with better resolution in less acquisition time?" yes there is. or are. there are multiple better ways to do musical pitch detection in real time that are far, far better than running an FFT. consider : Average Magnitude Difference Function (AMDF) $$Q_x[k] = \sum_n |x[n] - ... 9 This is what we call in the pitch-detection biz, the "octave problem". First of all, I would change the AMDF to ASDF. And I would not reduce the window size as the lag increases. (Also, I am changing notation to what I consider to be more conventional. "x[n]" is a discrete-time signal.) The Average Squared Difference Function (ASDF) of x[n] in the ... 8 From the (limited) description the uHz rotator algorithm sounds like one of the phase-weighted averages from this site, but it's not an algorithm I am familiar with. The Cramér–Rao lower bound^1 for estimating the frequency of sinusoid with amplitude A in white noise with variance \sigma^2 is given by:$$ \mathrm{var}(\hat{f}) \ge \frac{12}{(2\pi)^2\...

7

I don't think pitch information is relevant for what you want to do. The variation of pitch during speech is known as intonation, and can convey emotions, indicate if a sentence is a question etc. However, there is no universal rule as to how pitch variation patterns are mapped to meaning - this is quite language dependent ; and some languages sound "...

7

I'll take an orthogonal tack to answering this question from what Peter K has (validly) already proposed. I assert that the 8-significant-figure claim is little more than marketing-speak; while the software may be able to provide you an estimate with that many digits on it, that doesn't mean that they carry any real information! It appears that the software ...

7

From the ones I've been using I can recommend: YAAFE - very pleasant to work with in Python ESSENTIA - another one I like particularly due to Python integration aubio FEAPI Aquila - friend of mine used it extensively and he likes it a lot Recently I came across this paper and I believe that this should perfectly answer your question. Moffat D. et al - ...

7

Cons: Not as accurate This is just compared to the other methods. I was measuring frequency very accurately to look for clock drift, etc: 1000.000004 Hz for 1000 Hz, for instance. For guitar pitch detection it will be fine. doesn't work for inharmonic things like musical instruments I should have said "it can't find an accurate fundamental if there is ...

6

To answer the "how to shift the frequency of an audio signal up" bit: You could multiply the signal by a sine wave at a high frequency. This would shift and mirror the whole spectrum of the original signal into the high frequencies (multiplication by a sine in the time domain = convolution by a pair of symmetric Dirac in the frequency domain) - the mirror ...

6

Similar to this thread: Is there an algorithm for finding a frequency without DFT or FFT? FFT isn't a particular efficient way of building a tuner. Better (and cheaper) methods include auto-correlation, phased locked loops and delay locked loops, etc.. One example is to use tracking of local maxima and minima to roughly hone in on the fundamental ...

6

One would expect such a sequence to have a spectrum consisting of lines, as it is almost periodic (if it was periodic, it would have a Fourier series representation, even though it is not sinusoidal). As a quick example: load raw1.mat % calculate "unbiased" normalized cross-correlation; adjusted for % regions where there isn't full overlap corr = xcorr(...

6

Yes, using a peak frequency estimator for pitch is wrong. Pitch is a psychoacoustic phenomena, so pitch detection or estimation is different from frequency estimation. There have been plenty of pitch estimation methods given in previous answers to similar questions here. There's more than 1 to choose from. Here's one: https://stackoverflow.com/questions/...

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

What you are describing is very similar the the Harmonic Product Spectrum method of pitch estimation, as listed in this Stanford CCRMA paper. An FFT does not give you an "infinite sum of amplitudes", but a finite number of result bins depending on the length of the FFT. 5 mS is only 1 period of a 200 Hz note, and only a fraction of a period below 200 Hz. ...

6

This question (about "time-scaling" audio) is closely related to pitch shifting, which is time-scaling combined with resampling. But changing the speed without changing pitch is only time-scaling, so there is no resampling involved (contrary to what thomas has suggested). There are frequency-domain methods (phase-vocoder and sinusoidal modeling) that can ...

5

I have tried the following: Launch Audacity. Generate a 15000 Hz tone in the track created by default. Add a new track. Generate a 15400 Hz tone in the new track. A lower frequency tone appears during playback. The reason is that both tracks have high levels, so their sum exceeds 1.0; and Audacity applies clipping or limiting. This non-linear operation is ...

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

When I play A3 (220Hz) in my guitar, the fifth string which is A2 (110Hz) also vibrates a bit: it is what is called Sympathetic resonance. Besides other non-linear effects, this could be the case.

4

A frequency histogram is often used as part of the explanation of the harmonic product spectrum method of pitch estimation. A histogram that is a composite of several STFT frames over time may contain more of the harmonics of a note whose spectrum evolves over time (with various overtones appearing and/or disappearing, including even the fundamental), thus ...

4

It could have been Goertzel's algorithm, though it looks at a single frequency rather than a specific band. Another approach is to apply modulation techniques to shift the central frequency of your range of interest into the baseband, aka "zoom FFT". Your intuition about the max to average ratio is good. Another "peakedness" metric is the ratio of ...

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

Audiophiles don't hear anything unless they are told what to expect. Joke aside, this is equivalent to transposition by a bit less than a semitone. The effect won't be noticed on voices - this is way too low for any kind "chipmunk" effect to be observed. As for music, some people very familiar with the original music might detect the change of tonality and/...

4

Check out chapter 1.3 of this IRCAM paper on multi-F0 estimation. It discusses the difficulties in extracting multiple F0s from a recording, including the handling of overlapping partials, transients, and reverberation, as well as the modeling of domain-specific sources with varied spectral properties.

4

OK I did the two some time ago, TDHS in principle just apply time scale modification and to change the pitch do you need apply interpolation (resample) and it will shift the spectral envelope. For TDHS is hard to find some paper that teach how its really works, I learned the math and how it works in the Burazerovic Dzevdet paper: $N_p$ is defined as the ...

4

They may be referring to patent US3800088 by Harald Bode. I have a bunch of images from 15 years ago to explain a way to do frequency shifting so that it has the best chance of sounding good. I would call it single-sideband frequency shifting. Here the range of possible frequencies in the signal are drawn as two arrows each spanning half the circumference ...

4

Because guitar strings have non-zero stiffness, non-zero diameter, and non-zero displacement, the physical vibration frequency of the string's overtones can be slightly sharp. Thus inharmonic. But this slight inharmonicity might be part of what makes certain real stringed instruments sound more "interesting" than some simplistic additive and waveform ...

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