frequency

android getting sound frequencies real time?

六月ゝ 毕业季﹏ 提交于 2019-11-29 23:09:09
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 ca.uol.aig.fftpack.RealDoubleFFT; public class MainActivity extends Activity implements OnClickListener{ int audioSource = MediaRecorder.AudioSource.MIC; // Audio source is the device MIC int channelConfig = AudioFormat.CHANNEL_IN_MONO; // Recording in mono int audioEncoding = AudioFormat.ENCODING_PCM_16BIT; // Records in 16bit private DoubleFFT_1D fft; // The fft double

How to detect sound frequency / pitch on an iPhone? [closed]

眉间皱痕 提交于 2019-11-29 19:02:46
问题 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. 回答1: you can try to use SCListener. It's a small open-source class and very easy to use EDIT: The formatter does not like the _ in the name. Here is the link. http://github.com/stephencelis/sc_listener 回答2: To detect frequency you should check out the fast Fourier transform (FFT) algorithm. 回答3: Note that the SC_listener does not work on

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

北战南征 提交于 2019-11-29 16:59:33
问题 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 arranged in descending order of frequency as shown above. 回答1: Python2.7+ >>> from collections import Counter >>> L=['a','b','a','b'] >>> print(Counter(L)) Counter({'a': 2, 'b': 2}) >>> print(Counter(L).items()) dict_items([('a', 2), ('b', 2)]) python2.5/2

Guitar tuner frequency

北城以北 提交于 2019-11-29 15:48:21
问题 I'm making a guitar tuner for iOS with Objective-C .Due to the fact I'm Beginner I'm struggling a bit to gather all the resources and information about it. I know the theory like ( correct me if I'm wrong ) :- First I need to get the input from microphone. Then need to apply apply FFT algorithm to get the frequency Then compare the frequency with the fundamental frequency of notes . while searching on stack and google I found people are talking a lot about AurioTouch example soo I take a look

Frequency of values per column in table

守給你的承諾、 提交于 2019-11-29 15:22:53
What is a good way to get the independent frequency counts of multiple columns using dplyr ? I want to go from a table of values: # A tibble: 7 x 4 a b c d <int> <int> <int> <int> 1 1 2 1 3 2 1 2 1 3 3 2 2 5 3 4 3 2 4 3 5 3 3 2 3 6 5 3 4 3 7 5 4 2 1 to a frequency table like so: # A tibble: 5 x 5 x a_n b_n c_n d_n <int> <int> <int> <int> <int> 1 1 2 0 2 1 2 2 1 4 2 0 3 3 2 2 0 6 4 4 0 1 2 0 5 5 2 0 1 0 I'm still trying to get my head around dplyr , but it seems like this is something it could do. If it is easier to do with an add-on library, that is fine too. JasonWang library(dplyr) library

Plot weighted frequency matrix

痞子三分冷 提交于 2019-11-29 09:24:18
This question is related to two different questions I have asked previously: 1) Reproduce frequency matrix plot 2) Add 95% confidence limits to cumulative plot I wish to reproduce this plot in R: I have got this far, using the code beneath the graphic: #Set the number of bets and number of trials and % lines numbet <- 36 numtri <- 1000 #Fill a matrix where the rows are the cumulative bets and the columns are the trials xcum <- matrix(NA, nrow=numbet, ncol=numtri) for (i in 1:numtri) { x <- sample(c(0,1), numbet, prob=c(5/6,1/6), replace = TRUE) xcum[,i] <- cumsum(x)/(1:numbet) } #Plot the

Include zero frequencies in frequency table for Likert data

随声附和 提交于 2019-11-29 02:05:13
I have a dataset with responses to a Likert item on a 9pt scale. I would like to create a frequency table (and barplot) of the data but some values on the scale never occur in my dataset, so table() removes that value from the frequency table. I would like it instead to present the value with a frequency of 0 . That is, given the following dataset # Assume a 5pt Likert scale for ease of example data <- c(1, 1, 2, 1, 4, 4, 5) I would like to get the following frequency table without having to manually insert a column named 3 with the value 0 . 1 2 3 4 5 3 1 0 2 1 I'm new to R , so maybe I've

frequency table with several variables in R

☆樱花仙子☆ 提交于 2019-11-29 00:11:33
I am trying to replicate a table often used in official statistics but no success so far. Given a dataframe like this one: d1 <- data.frame( StudentID = c("x1", "x10", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9"), StudentGender = c('F', 'M', 'F', 'M', 'F', 'M', 'F', 'M', 'M', 'M'), ExamenYear = c('2007','2007','2007','2008','2008','2008','2008','2009','2009','2009'), Exam = c('algebra', 'stats', 'bio', 'algebra', 'algebra', 'stats', 'stats', 'algebra', 'bio', 'bio'), participated = c('no','yes','yes','yes','no','yes','yes','yes','yes','yes'), passed = c('no','yes','yes','yes','no','yes',

How to get CPU frequency in c#

我们两清 提交于 2019-11-28 23:56:08
How can I get in c# the CPU frequency (example : 2Ghz) ? It's simple but I don't find it in the environnement variables. Thanks :) var searcher = new ManagementObjectSearcher( "select MaxClockSpeed from Win32_Processor"); foreach (var item in searcher.Get()) { var clockSpeed = (uint)item["MaxClockSpeed"]; } if you wish to get other fields look at class Win32_processor Try this code using System.Management; uint currentsp , Maxsp; public void CPUSpeed() { using(ManagementObject Mo = new ManagementObject("Win32_Processor.DeviceID='CPU0'")) { currentsp = (uint)(Mo["CurrentClockSpeed"]); Maxsp =

How to get the number of the most frequent value in a column?

拟墨画扇 提交于 2019-11-28 20:50:32
问题 I have a data frame and I would like to know how many times a given column has the most frequent value. I try to do it in the following way: items_counts = df['item'].value_counts() max_item = items_counts.max() As a result I get: ValueError: cannot convert float NaN to integer As far as I understand, with the first line I get series in which the values from a column are used as key and frequency of these values are used as values. So, I just need to find the largest value in the series and,