frequency
Java equivalent of C# system.beep?
You can use this: java.awt.Toolkit.getDefaultToolkit().beep(); EDIT If you are trying to play anything of duration and with different sounds you should really look into the Java MIDI library. The default beep won’t be able to meet your needs as you can’t change the length of the beep. http://www.oracle.com/technetwork/java/index-139508.html
Bash script to find the frequency of every letter in a file
My solution using grep, sort and uniq. grep -o . file | sort | uniq -c Ignore case: grep -o . file | sort -f | uniq -ic
Setting a relative frequency in a matplotlib histogram
Because normed option of hist returns the density of points, e.g dN/dx What you need is something like that: # assuming that mydata is an numpy array ax.hist(mydata, weights=np.zeros_like(mydata) + 1. / mydata.size) # this will give you fractions
Graphing the pitch (frequency) of a sound
Frequency (an objective metric) is not the same as pitch (a subjective quantity). In general, pitch detection is a very tricky problem. Assuming you just want to graph the frequency response for now, you have little choice but to use the FFT, as it is THE method to obtain the frequency response of time-domain data. … Read more
Android audio FFT to retrieve specific frequency magnitude using audiorecord
First you need to ensure that the result you are getting is correctly converted to a float/double. I’m not sure how the short[] version works, but the byte[] version only returns the raw byte version. This byte array then needs to be properly converted to a floating point number. The code for the conversion should … Read more
Python frequency detection
The aubio libraries have been wrapped with SWIG and can thus be used by Python. Among their many features include several methods for pitch detection/estimation including the YIN algorithm and some harmonic comb algorithms. However, if you want something simpler, I wrote some code for pitch estimation some time ago and you can take it … Read more
How can I compute a histogram (frequency table) for a single Series?
Maybe .value_counts()? >>> import pandas >>> my_series = pandas.Series([1,2,2,3,3,3, “fred”, 1.8, 1.8]) >>> my_series 0 1 1 2 2 2 3 3 4 3 5 3 6 fred 7 1.8 8 1.8 >>> counts = my_series.value_counts() >>> counts 3 3 2 2 1.8 2 fred 1 1 1 >>> len(counts) 5 >>> sum(counts) 9 >>> … Read more
Python library for playing fixed-frequency sound
PyAudiere is a simple cross-platform solution for the problem: >>> import audiere >>> d = audiere.open_device() >>> t = d.create_tone(17000) # 17 KHz >>> t.play() # non-blocking call >>> import time >>> time.sleep(5) >>> t.stop() pyaudiere.org is gone. The site and binary installers for Python 2 (debian, windows) are available via the wayback machine e.g., … Read more