Questions tagged [frequency]

The rate at which a thing occurs or is found.

The rate at which a thing occurs or is found.

2858 questions
39
votes
1 answer

Android audio FFT to retrieve specific frequency magnitude using audiorecord

I am currently trying to implement some code using Android to detect when a number of specific audio frequency ranges are played through the phone's microphone. I have set up the class using the AudioRecord class: int channel_config =…
user723060
  • 393
  • 1
  • 4
  • 4
39
votes
4 answers

Python frequency detection

Ok what im trying to do is a kind of audio processing software that can detect a prevalent frequency an if the frequency is played for long enough (few ms) i know i got a positive match. i know i would need to use FFT or something simiral but in…
MatijaG
  • 818
  • 1
  • 9
  • 12
36
votes
3 answers

Graphing the pitch (frequency) of a sound

I want to plot the pitch of a sound into a graph. Currently I can plot the amplitude. The graph below is created by the data returned by getUnscaledAmplitude(): AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(new…
Amy B
  • 17,874
  • 12
  • 64
  • 83
35
votes
4 answers

Setting a relative frequency in a matplotlib histogram

I have data as a list of floats and I want to plot it as a histogram. Hist() function does the job perfectly for plotting the absolute histogram. However, I cannot figure out how to represent it in a relative frequency format - I would like to have…
user1278140
  • 353
  • 1
  • 3
  • 5
34
votes
5 answers

Bash script to find the frequency of every letter in a file

I am trying to find out the frequency of appearance of every letter in the english alphabet in an input file. How can I do this in a bash script?
SkypeMeSM
  • 3,197
  • 8
  • 43
  • 61
34
votes
5 answers

How to generate a frequency table in R with with cumulative frequency and relative frequency

I'm new with R. I need to generate a simple Frequency Table (as in books) with cumulative frequency and relative frequency. So I want to generate from some simple data like > x [1] 17 17 17 17 17 17 17 17 16 16 16 16 16 18 18 18 10 12 17 17 17 17…
eloyesp
  • 3,135
  • 1
  • 32
  • 47
33
votes
8 answers

Java equivalent of C# system.beep?

I am working on a Java program, and I really need to be able to play a sound by a certain frequency and duration, similarly to the c# method System.Beep, I know how to use it in C#, but I can't find a way to do this in Java. Is there some…
Glen654
  • 1,102
  • 3
  • 14
  • 18
25
votes
12 answers

Python - Is a dictionary slow to find frequency of each character?

I am trying to find a frequency of each symbol in any given text using an algorithm of O(n) complexity. My algorithm looks like: s = len(text) P = 1.0/s freqs = {} for char in text: try: freqs[char]+=P except: …
psihodelia
  • 29,566
  • 35
  • 108
  • 157
24
votes
8 answers

Sort list by frequency

Is there any way in Python, wherein I can sort a list by its frequency? For example, [1,2,3,4,3,3,3,6,7,1,1,9,3,2] the above list would be sorted in the order of the frequency of its values to create the following list, where the item with the…
user2592835
  • 1,547
  • 5
  • 18
  • 26
22
votes
5 answers

Show frequencies along with barplot in ggplot2

I'm trying to display frequencies within barplot ... well, I want them somewhere in the graph: under the bars, within bars, above bars or in the legend area. And I recall (I may be wrong) that it can be done in ggplot2. This is probably an easy…
aL3xa
  • 35,415
  • 18
  • 79
  • 112
21
votes
3 answers

NLTK tokenize - faster way?

I have a method that takes in a String parameter, and uses NLTK to break the String down to sentences, then into words. Afterwards, it converts each word into lowercase, and finally creates a dictionary of the frequency of each word. import…
user3280193
  • 450
  • 1
  • 6
  • 13
20
votes
1 answer

Plot Histogram in Python

I have two lists, x and y. x contains the alphabet A-Z and Y contains the frequency of them in a file. I've tried researching how to plot these values in a histogram but has had no success with understanding how to plot it. n, bins, patches =…
PythonAlex
  • 241
  • 2
  • 4
  • 8
20
votes
1 answer

ValueWarning: No frequency information was provided, so inferred frequency MS will be used

I try to fit Autoregression by sm.tsa.statespace.SARIMAX. But I meet a warning, then I want to set frequency information for this model. Who used to meet it, can you help me ? fit1 = sm.tsa.statespace.SARIMAX(train.Demand, order=(1, 0, 0), …
Lê Ngọc Thạch
  • 201
  • 1
  • 2
  • 5
20
votes
3 answers

android getting sound frequencies real time?

I have been trying to get the sound frequency(number) in real time using fft and i am having run time errors. can any one help? package com.example.recordsound; import edu.emory.mathcs.jtransforms.fft.DoubleFFT_1D; import…
Prerak Diwan
  • 207
  • 1
  • 2
  • 10
19
votes
10 answers

Detecting the fundamental frequency

There's this tech-festival in IIT-Bombay, India, where they're having an event called "Artbots" where we're supposed to design artbots with artistic abilities. I had an idea about a musical robot which takes a song as input, detects the notes in the…
ameya warty