Pitch Detection In Mac OS X [closed] - macos

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I don't suppose anyone is aware of any libraries that allow you to detect the current pitch (that is, in notes) received by the microphone in Mac OS X? I'm assuming it'd be a mixture of Objective-C and some provided lib. Or else in Java for multi-platform goodness?

There are some code snippets here that describe auto-correlation for pitch.
http://www.iwillapps.com/wordpress/?p=212
http://www.iwillapps.com/wordpress/?p=214
Also, this is a great "explanation" on two types of pitch detection
http://cnx.org/content/m11714/latest/):
time-domain
autocorrelation
frequency-domain harmonic product spectrum.

musical DSP solutions are difficult. finding something particularly GOOD and packed in a library and for free is very optimistic. (the music software industry being as competitive as it is...)
a useful repository of source code can be found at http://www.musicdsp.org/
otherwise, Miller Puckette's Fiddle~ code does pretty much exactly what you describe. it is not a library, though (it is an extension to PD). but the source is available AFAIK.

Well, you could use Aubio after recording a sample from the mic, or find a way to pipe to it.

Don't know of any specific liibraries but Praat does do pitch analysis, runs on OS X and can be scripted.

Transcribe is excellent. It will show you the pitch of a recording, and show you which piano keys.
If you are looking to write this yourself, have a look at FFT (Fast fourier transform) algorithms. Its actually quite easy to implement. Id do the FFT (which converts a signal into its frequency components) and then just pick out the top one.

Related

Google-like Calculator Program for Windows [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 7 years ago.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I love using Google for quick back-of-the-envelope calculations. For instance, if I want to know the approximate weight of a carbon-12 ion with charge state 4, I search for
12 u -4*electron mass in u
and get the answer 11.9978057 atomic mass units. More complex things, such as the cyclotron frequency of this ion in some magnetic field, are just as easy:
1/(2*pi)*4* (elementary charge)/(12 u - 4*(electron mass)) * 5.1125 Tesla
This returns the correct answer 26.174171 MHz. The fact that I can enter 12u - 4*(electron mass) and Google converts the units on the fly, is really helpful to me. WolframAlpha can do even more, but Google is a lot quicker and does not ask for a subscription after my nth query.
As an offline solution, I used a Matlab script in which I had most constants defined, but Matlab takes 30 sec to 1 min to start up, which is frustrating. Mathematica is not much faster to start up, either. Also, for technical reasons I have to use network licenses, so these programs are not offline solutions anymore. I switched to Excel (which loads quite fast), where I have a sheet that used named ranges. This is semi-convenient, but it just feels wrong.
Is there any lightweight Windows program that provides this functionality offline?
You can use the Units program that was originally developed for UNIX. There is a native Windows port that is based on version 1.87 (2008). The current version of the UNIX tool is 2.01 (2012).
Units was originally designed to do simple unit conversion, but it also supports evaluating mathematical expressions. It requires you to specify the unit of the output and gives you two lines as a result: The result that you want is the first line, the second line is the inverse of the result.
This program has three major shortcomings when compared to the Google math expression evaluation:
You have to know the unit that you want to get in advance. (I don't always know it, and sometimes I just don't care. Often this unit is "1", as for the result of the calculation sin(pi).)
It does not tell you how it interpreted the units that you entered. Google always returns a parsed version of the input string, so that you can see where Google misunderstood you.
It is quite strict when it comes to variable names. Multi-word names are not permitted, so electron mass is called electronmass (m_e also works).
The installer.exe is easy enough to use, but on my Windows XP machine it did not set the path variables of the command line correctly. I set up a simple shortcut on my Desktop that points to: C:\Programs\GnuWin32\bin\units.exe.
Overall, Units is a nice and quick calculator that starts up a few thousand times faster than Matlab or Mathematica - but the user interface has some shortcomings.

Where are the C++ implementations of the advanced ellipse detection algorithms? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 months ago.
Improve this question
I'm a novice in the field of ellipse detection/extraction. But I know this topic has a long history. Although there are tons of papers addressing ellipse detection, I can hardly find any C++ implementations of these advanced algorithms such as Straight Line HT (SLHT), Fast Ellipse Hough Transform (FEHT), and Randomized HT (RHT). I'm curious Why the researchers don't put their code online such that more people can benefit from them? Can anyone kindly tell me where I can find any of the C++ implementations? Thanks.
(PS: I'm familiar with OpenCV. I know OpenCV has few implementations such as fitEllipse and HoughCircle.)
A lot of image processing research is done in Matlab, there are generally implementations available in that language. The reason you don't see any C++ implementations is because they would be much more about the details of implementation (memory management, performance, etc) rather than the actual algorithm; Matlab is much more succinct about this.
If you really want to get to learn about image processing algorithms, you'll probably want to learn to read Matlab code.

Need to convert human voice into musical notes [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
A human sings a musical tone and wants to convert into a musical instrument playing the same. On processing the .wav file of the recorded human voice using aubio.org, I am able to get the pitch/frequency at different time intervals. But how to get the notes of musical instruments to be played from this data or Is there some tuner that can help me do this ?
For pitch, use the formula that MIDI 69 = 440hz, so (python/pseudo code)
midiNote = round(12 * (log(freq/440.0), 2))) + 69
But you'll find that things can actually be more complex than this for rhythm because. I'd use an already made rhythmic "quantization" package (that's the Google search term you'll want) because determining both the tempo and whether something that is 1.125 beats long should be transcribed as a quarter note or a quarter note tied to a 32nd note will depend a lot on context and it's a big programming job. There are several preexisting toolkits that will do it for you. My own python framework music21 has an audioSearch module that should do the trick for simple pieces -- at least you could take the code there and put it into your own package, since it's pretty standard FFT sample conversion techniques.

Building and animating fractals [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Can anyone recommend any software/books required to learn and build fractal patterns? I want to also be able to animate the fractal patterns too. Like something off of winamp.
For book on animated fractal Fractals: An Animated Discussion with Edward Lorenz and Benoît Mandelbrot could be what you want.
You might like: The Computational Beauty of Nature
http://mitpress.mit.edu/books/flaoh/cbnhtml/
I am working on a project in java for creating fractals (flame fractals).
The user provides a script file in javascript, that takes care of the interpolation between fractals. Also, as input, one can provide a file that affects an animation in some way,
so this is the way to make an animation change to some music,
see for example
http://www.youtube.com/watch?v=imDPqR9cDL8
I can send you the source code if you provide me with an address.
There's lots of fractal programs out there.
I know that Ultrafractal is pretty popular, but not free.
As far as free ones go, there are programs such a ChaosPro and others. A quick google search will find them for you.

Real-time audio visualisation in Cocoa? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Are there any frameworks or open-source code that would simplify the process of implementing a real-time oscilloscope (time-domain audio visualisation) in OSX?
Ideally, I want to display a simple animated view representing the audio signal being input by the microphone input.
The easiest way to do this is to use a QCView. It's pretty easy to find QC compositions that display a bar graph display of the audio output.
Look at a language called Pd (Pure Data). It's the free version of Max/MSP. It's the easiest way to do anything with audio. One of the classes is in fact an oscilloscope. Simply draw a line from the output of your sound source (it can be your mic, a sound file, or a live oscillator) to the oscilloscope and bathe in the visual output glory!
http://puredata.info/
the SurfaceVertexProgram example is a nice demonstration of how to do an oscilloscope using OpenGL. the example is a bit out-dated (you have to build up a new xcode project), but functions and demonstrates very useful techniques.

Resources