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.
Related
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
Suppose I want to write an application to compose music.
I'd like to feed a set of musical scores of a composer - e.g. Bach's Well tempered clavier' - and the program should prepare new scores in a similar style.
Are algorithms or even libraries known for this task?
WikiPedia provides this page about algorithmic music composition.
You could make something basic using Markov chains. The principle is to first produce some unit of music (a single note, for example) and then, based on the last produced unit, randomly select the next unit.
First, pass through the input music. Each time you see a particular note/other unit of music, simply record in the table what came after it. When you have gone trough the entire input material, you will have a frequency table of which units follow which (After 'A', 'B' appeared 29 times, 'C' appeared 12 times and 'A' appeared twice; after 'B' ... etc).
Now select an initial note. Select the next one randomly according to the frequencies recorded in the table. Repeat until satisfied.
This will probably not yield good results if applied to individual notes, instead try short phrases. Also, the quality will improve if you have access to a large corpus of source music.
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
Does anyone know a good open-source library with detection of harmonic pitch class intensities (chroma) of audio signal? That is, for a given piece of audio, intensity of each of 12 musical pitches.
http://en.wikipedia.org/wiki/Harmonic_pitch_class_profiles
It can be in c, c++, or java as long as the speed (complexity) is good. I don't need it for real-time use, but would use it on hours of material, so speed is a bit more important than quality.
Have a look at the Chromagram plugin in the QM Vamp Plugin library. To make sure it's exactly what you want, you can download a binary and test it in Sonic Visualizer before compiling it yourself.
Take a look a this webpage. The Website of Dan Ellis has tons of sound-related MATLAB examples
http://www.ee.columbia.edu/~dpwe/resources/matlab/chroma-ansyn/
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.
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.
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.