pitch

FFT for Pitch Detection

喜你入骨 提交于 2019-12-08 03:56:43
问题 Ive been recently using FFT for Pitch Detection and I notice that, although the notes are correct (e.g. C, D#, etc.), there are a lot of notes that are in the wrong octave (e.g. E2 is categorized as E3, C3 is categorized as C4, always an octave up). Why is this the case? My algorithm is after calculating the FFT bins, I get the bin with the greatest intensity and calculate which frequency it is. Any help on this? Thanks! 回答1: two thoughts :- if your input and your algorithm are always exactly

Autocorrelation returns random results with mic input (using a high pass filter)

霸气de小男生 提交于 2019-12-08 01:48:44
问题 Sorry to ask a similar question to the one i asked before (FFT Problem (Returns random results)), but i've looked up pitch detection and autocorrelation and have found some code for pitch detection using autocorrelation. Im trying to do pitch detection of a users singing. Problem is, it keeps returning random results. I've got some code from http://code.google.com/p/yaalp/ which i've converted to C++ and modified (below). My sample rate is 2048, and data size is 1024. I'm detecting pitch of

How should I implement accurate pitch-detection in Java for Android phones?

亡梦爱人 提交于 2019-12-07 16:02:26
问题 I want to develop an application that would require accurate pitch-detection for musical instruments through the Android phone's microphone. Most suggestions I read of involve using Fast Fourier Transforms (FFT), but they mentioned it having issues with accuracy and processing power (considering it should run smoothly on a smartphone). One answer suggested a 5Hz error margin, which would be quite noticeable in the low frequency tone range. If the error is logarithmic rather than static in

Xcode 8 Swift 3 Pitch-altering sounds

寵の児 提交于 2019-12-07 14:52:31
问题 So, I asked this question before on the Apple Developer Forums but never got a proper answer, so I thought I'd ask it here: I'm trying to make a simple game with a hit sound that has a different pitch whenever you hit something. I thought it'd be simple, but it ended up with a whole lot of stuff (most of which I completely copied from someone else): func hitSound(value: Float) { let audioPlayerNode = AVAudioPlayerNode() audioPlayerNode.stop() engine.stop() // This is an AVAudioEngine defined

Autocorrelation returns random results with mic input (using a high pass filter)

怎甘沉沦 提交于 2019-12-06 07:21:46
Sorry to ask a similar question to the one i asked before ( FFT Problem (Returns random results) ), but i've looked up pitch detection and autocorrelation and have found some code for pitch detection using autocorrelation. Im trying to do pitch detection of a users singing. Problem is, it keeps returning random results. I've got some code from http://code.google.com/p/yaalp/ which i've converted to C++ and modified (below). My sample rate is 2048, and data size is 1024. I'm detecting pitch of both a sine wave and mic input. The frequency of the sine wave is 726.0, and its detecting it to be

PCM Data Pitch Change in C#

大憨熊 提交于 2019-12-06 05:20:51
I have a program that downloads PCM data from a Web Server, which it uses later to play through a standard PCM player. I want to be able to allow users to change the pitch of the PCM data while its being played. Does anyone know how to do this? I don't know any digital signal processing library for C#, but this seems to be a complete source sample for pitch shifting in .net.: http://sites.google.com/site/mikescoderama/pitch-shifting The simplest solution is to play back the sound at a higher sampling rate than it was recorded - playing a 22 kHz file at 44 kHz will double the pitch. You can

Is pitch and speed the same thing in audio programming context?

浪子不回头ぞ 提交于 2019-12-06 04:52:58
问题 Pitch means "perceived frequency". Nice. But when I make pitch very low in OpenAL, sound plays a lot of times longer. If I make it very high, sound plays very short but with high frequency. For me, logically the consequence of making slower or faster. Or is pitch != speed? 回答1: Paul R has a pretty good answer, but I'd like to expand on it a bit. If you think of the sound as a series of pulses (and it kind of is), then a higher pitch will have more pulses per second (higher frequency) and a

How should I implement accurate pitch-detection in Java for Android phones?

☆樱花仙子☆ 提交于 2019-12-05 22:36:45
I want to develop an application that would require accurate pitch-detection for musical instruments through the Android phone's microphone. Most suggestions I read of involve using Fast Fourier Transforms (FFT), but they mentioned it having issues with accuracy and processing power (considering it should run smoothly on a smartphone). One answer suggested a 5Hz error margin, which would be quite noticeable in the low frequency tone range. If the error is logarithmic rather than static in nature, the error margin from each note should be less than 10 Cents (1 Cent=100th root of a semitone, 1

Xcode 8 Swift 3 Pitch-altering sounds

▼魔方 西西 提交于 2019-12-05 19:03:14
So, I asked this question before on the Apple Developer Forums but never got a proper answer, so I thought I'd ask it here: I'm trying to make a simple game with a hit sound that has a different pitch whenever you hit something. I thought it'd be simple, but it ended up with a whole lot of stuff (most of which I completely copied from someone else): func hitSound(value: Float) { let audioPlayerNode = AVAudioPlayerNode() audioPlayerNode.stop() engine.stop() // This is an AVAudioEngine defined previously engine.reset() engine.attach(audioPlayerNode) let changeAudioUnitTime = AVAudioUnitTimePitch

Is pitch and speed the same thing in audio programming context?

拟墨画扇 提交于 2019-12-04 10:03:08
Pitch means "perceived frequency". Nice. But when I make pitch very low in OpenAL, sound plays a lot of times longer. If I make it very high, sound plays very short but with high frequency. For me, logically the consequence of making slower or faster. Or is pitch != speed? Paul R has a pretty good answer, but I'd like to expand on it a bit. If you think of the sound as a series of pulses (and it kind of is), then a higher pitch will have more pulses per second (higher frequency) and a lower pitch will have fewer (lower frequency). To lower the pitch of an existing sound, you have to spread