Questions tagged [frequency]

The rate at which a thing occurs or is found.

The rate at which a thing occurs or is found.

2518 questions
37
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
  • 748
  • 1
  • 7
  • 11
35
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,377
  • 12
  • 61
  • 81
32
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
  • 2,653
  • 1
  • 26
  • 41
31
votes
3 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
  • 313
  • 1
  • 3
  • 5
30
votes
1 answer

How to use dplyr to generate a frequency table

I like to create a table that has the frequency of several columns in my data frame. I am copying part of my data frame below. The table is supposed to have frequency (both n and %) of "red" in Color and "F" in Gender. I think that the dplyr…
Rooz
  • 339
  • 1
  • 3
  • 6
30
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,012
  • 3
  • 13
  • 18
27
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
  • 2,876
  • 7
  • 40
  • 59
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
  • 26,430
  • 33
  • 104
  • 153
22
votes
7 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,201
  • 2
  • 14
  • 24
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
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
19
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
  • 32,399
  • 18
  • 76
  • 111
19
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
  • 197
  • 1
  • 1
  • 10
17
votes
1 answer

Most Efficient way to calculate Frequency of values in a Python list?

I am looking for a fast and efficient way to calculate the frequency of list items in python: list = ['a','b','a','b', ......] I want a frequency counter which would give me an output like this: [ ('a', 10),('b', 8) ...] The items should be…
demos
  • 2,504
  • 8
  • 33
  • 50
16
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
  • 161
  • 1
  • 1
  • 5