frequency

Explain the FFT to me

I want to take audio PCM data and find peaks in it. Specifically, I want to return the frequency and time at which a peak occurs. My understanding of this is that I have to take the PCM data and dump it into an array, setting it as the real values with the complex parts set to 0. I then take the FFT, and I get an array back. If each ...

Tf-idf: Is this approach correct?

Hello! I would like to calculate the term frequency using Tf-idf. I've drafted an equation where you should get the Tf-idf value on the left side. Is this correct? Tf-idf for DOCUMENT: tf-idf(WORD) = occurrences(WORD,DOCUMENT) / number-of-words(DOCUMENT) * log10 ( documents(ALL) / ( 1 + documents(WORD, ALL) ) ) occurrences(WORD,DOCU...

Indexing text files in PHP

I have been set a challenge to create an indexer that takes all words 4 characters or more, and stores them in a database along with how many times the word was used. I have to run this indexer on 4,000 txt files. Currently, it takes about 12-15 minutes - and I'm wondering if anyone has a suggestion for speeding things up? Currently...

Frequency Analyzer in C#

Hi, I'm looking for a C# source code that performs a frequency analysis on a WAV file and displays the results in a graph, similar to the one displayed in apps like WavePad. Do you know where I can find such a code? Thanks! ...

MySQL SELECT most frequent by group

How do I get the most frequently occurring category for each tag in MySQL? Ideally, I would want to simulate an aggregate function that would calculate the mode of a column. SELECT t.tag , s.category FROM tags t LEFT JOIN stuff s USING (id) ORDER BY tag; +------------------+----------+ | tag | category | +-------...

DirectShow API for analog tuning to put a frequency?

I'm looking for the interfaces in DirectShow that will let me push a frequency only. The IAMTVTuner interface allows you to 'put_channel' but this requires pretuning your card. I want to just specify the frequency to tune to. Is this possible with analog? (you can do it easy with the interfaces for digital streams however). ...

How to generate a lower frequency version of a signal in Matlab?

With a sine input, I tried to modify it's frequency cutting some lower frequencies in the spectrum, shifting the main frequency towards zero. As the signal is not fftshifted I tried to do that by eliminating some samples at the begin and at the end of the fft vector: interval = 1; samplingFrequency = 44100; signalFrequency = 440; sample...

Assistance with Find and Replace Regex

I have a text file, and each line is of the form: TAB WORD TAB PoS TAB FREQ# Word PoS Freq the Det 61847 of Prep 29391 and Conj 26817 a Det 21626 in Prep 18214 to Inf 16284 it Pron 10875 is Verb 9982 to Prep 9343 was Verb 9236 I Pron 8875 for Prep 8412 that Conj 7308 you Pron 6954 Would one of you regex wizards kindly assist me in is...

Fundamental Frequency + Voice Detection in c#

I'm trying to detect voice throught input from the microphone in real-time. I allready receive the input, execute FFT algorithm and have the result in dB. I have a frequency domain, a time domain and a spectogram. How can I get the fundamental frequency? If I get the fundamental frequency can I specify that if the frequency is between ...

Mel Frequency Cepstrum Coefficients algorithm

I want to get the timbre of some audio. To use that I will make the Mel Frequency Cepstrum Coefficients algorithm. The implementation looks simples (I allready made step 1): 1. Take the Fourier transform of (a windowed excerpt of) a signal. 2. Map the powers of the spectrum obtained above onto the mel scale, using triangular overla...

How do we calculate the filters in Mel-Frequency Cepstrum Coefficients Algorithm?

After calculating the FFT and with the frequency we need to do something like this: http://instruct1.cit.cornell.edu/courses/ece576/FinalProjects/f2008/pae26%5Fjsc59/pae26%5Fjsc59/images/melfilt.png We filter the frequency spectrum with those triangles. I saw that we can use distint ways to calculcate the triangles. I will make the size...

When calculating the fast fourier tranform..?

If we get the sound from microphone with two channels, to calculate the frequency spectrum we: calculate the fast fourier transform of all the data input? calculate the fast fourier transform of each left and right channel and then make a average of both? calculate the fast fourier transform of each left and right channel and get the b...

How to detect sound frequency / pitch on an iPhone?

Hi I'm trying to find a way to detect sound frequency being recorded by iPhone's Microphone. I'd like to detect whether the sound frequency is going up or down. ...

Which time-frequency coefficients does the Wavelet transform compute?

The Fast Fourier Transform takes O(N log N) operations, while the Fast Wavelet Transform takes O(N). But what, specifically, does the FWT compute? Although they are often compared, it seems like the FFT and FWT are apples and oranges. As I understand it, a more appropriate comparison would be the STFT (FFTs of small chunks over time) ...

How to Calculate Frequency & Amplitude in Flash AS3 with Flash Player 9

How can I calculate Frequency & Amplitude in As3 with FP9. I got the all raw byte using SoundMixer.computeSpectrum(_testbytes, false, 0); var g:Graphics = this.graphics; g.clear(); g.lineStyle(0, 0x6600CC); g.moveTo(0, PLOT_HEIGHT); var m:Number = 0; for (var i:int = 0; i < 256; i++) { m = (_testbytes.readFloat...

frequency analysis algorithm

Hello everyone. I want to write a java program that searches through a cipher text and returns a frequency count of the characters in the cipher, for example the cipher: "jshddllpkeldldwgbdpked" will have a result like this: 2 letter occurrences: pk = 2, ke = 2, ld = 2 3 letter occurrences: pke = 2. Any algorithm that allows me to ...

How to output a frequency 1kHz and power/volume = 60% in Linux (Ubuntu)?

How to output a frequency 1kHz and power/volume = 60% in Linux (Ubuntu)? I need sample code in C/C++. Thanks! ...

Extending Karplus-Strong with low pass filter

I have implemented a basic Karplus-Strong algorithm. Ringbuffer, filling with white noise, output a sample from the front and append the average of first two elements to the end and delete the first element. Repeat last to steps. For better results and control over them I tried to implement a extended version of the algorithm. Therefor...

How to implement frequency of attack in game?

In a RPG game,suppose there are role A and B. A will conduct x attacks per second B will conduct y attacks per second If we suppose A initiates the attack and the final attacks may be : A A B A B ... How to calculate the sequence of attacks? ...

Android soundpool rate range?

Android's soundpool.play [documentation][1] says "The playback rate allows the application to vary the playback rate (pitch) of the sound. A value of 1.0 means play back at the original frequency. A value of 2.0 means play back twice as fast, and a value of 0.5 means playback at half speed.". However, when I set the rate to 1.49f, I hea...