Composing my own composing software
Composing my own composing software
For kicks, I wanted to write some programs to allow me to play my whistle and have the computer write the music. In preparation for this, I'm looking into alternatives, but the only thing I've found is Sibelius, which seems to allow this, but only through a midi synthesized instrument. Is there anyone here who uses Sibelius who can comment on this feature? Alternately, anyone know about similar software, or has interest in this?
Now...time to learn about Fourier transforms, pitch detection, and general Whistle Analysis!
Now...time to learn about Fourier transforms, pitch detection, and general Whistle Analysis!
Last edited by Trurl on Wed Jul 23, 2008 1:54 am, edited 1 time in total.
-
- Posts: 146
- Joined: Tue Mar 25, 2008 10:29 pm
- Please enter the next number in sequence: 1
- Location: Arizona
I use Sibelius 4, but am by no means an expert. The basic edition has a bunch of extra instruments in the Kontakt music bundle, but it doesn't include a whistle. However, the DLS sound on my Mac does have a whistle, but it sounds pathetic.
However, I really like the note input abilities and the options for grace notes which can be used for "crude" whistle ornamentation.
I hope this helps,
Charlie
However, I really like the note input abilities and the options for grace notes which can be used for "crude" whistle ornamentation.
I hope this helps,
Charlie
- MTGuru
- Posts: 18663
- Joined: Sat Sep 30, 2006 12:45 pm
- antispam: No
- Please enter the next number in sequence: 8
- Location: San Diego, CA
Google "Music Recognition Software" for some audio to MIDI / score packages.
Vivat diabolus in musica! MTGuru's (old) GG Clips / Blackbird Clips
Joel Barish: Is there any risk of brain damage?
Dr. Mierzwiak: Well, technically speaking, the procedure is brain damage.
Joel Barish: Is there any risk of brain damage?
Dr. Mierzwiak: Well, technically speaking, the procedure is brain damage.
...
(Status Summary as of 07/23: I have written my own version of a single note tuner that can detect and classify any SINGLE note.)
Thanks for the info so far. As far as I can tell, commercial programs only do this for MIDI music, which is fine but it requires a MIDI synthesized instrument.
After playing around for a few hours, I can see why. It's pretty hard to handle raw music, mainly on the timing side.
So far, I've essentially written my own version of any of the millions of software tuners out there, so I can detect any single note played. Primitive but fun to write and encouraging. At present, I'm recording a sound clip from my whistle into a .wav file and analyzing that. I hope to try real time analysis at some point but I'm working with MATLAB and I'm not sure how to input my microphone data.
Here's my current issue: I'm trying to determine how to detect multiple notes played in sequence. To those of you with any interest or familiarity...I fourier transform the waveform (i.e. a waveform of low D) and then search for the strongest frequency response, which I then match to a note and a degree of sharp/flatness.
However, this method essentially eliminates time data, meaning that if I have two notes in the clip, I can detect them correctly, but I lose the data concerning note order and note duration (whole note, half note, etc.). I'm also going to run into trouble, I think, if I don't include some way to set the time signature ahead of time since note timings are relative...My current plan calls for a frequency vs. time data set which should make this possible...Any thoughts/advice/insults/etc?
I'll keep playing around and if I get something working I'll definitely share it. I realize this isn't the most useful thing (why not just use paper), but it's fun to work on.
Thanks for the info so far. As far as I can tell, commercial programs only do this for MIDI music, which is fine but it requires a MIDI synthesized instrument.
After playing around for a few hours, I can see why. It's pretty hard to handle raw music, mainly on the timing side.
So far, I've essentially written my own version of any of the millions of software tuners out there, so I can detect any single note played. Primitive but fun to write and encouraging. At present, I'm recording a sound clip from my whistle into a .wav file and analyzing that. I hope to try real time analysis at some point but I'm working with MATLAB and I'm not sure how to input my microphone data.
Here's my current issue: I'm trying to determine how to detect multiple notes played in sequence. To those of you with any interest or familiarity...I fourier transform the waveform (i.e. a waveform of low D) and then search for the strongest frequency response, which I then match to a note and a degree of sharp/flatness.
However, this method essentially eliminates time data, meaning that if I have two notes in the clip, I can detect them correctly, but I lose the data concerning note order and note duration (whole note, half note, etc.). I'm also going to run into trouble, I think, if I don't include some way to set the time signature ahead of time since note timings are relative...My current plan calls for a frequency vs. time data set which should make this possible...Any thoughts/advice/insults/etc?
I'll keep playing around and if I get something working I'll definitely share it. I realize this isn't the most useful thing (why not just use paper), but it's fun to work on.
...
Glad to hear you're interested! I may pester you once the nitty gritty stuff is out of the way (which is starting to look feasible). Are you familiar with coding at all?
In the meantime, would someone with a high quality recording set-up be so kind as convey to me a .wav file containing any 3 notes of your choice so long as they are in the same octave? I've only got my built in microphone which picks up a fair bit of noise. I'm working on filtering and removing outliers, but I'd like to see what a higher class recording set-up produces. Please PM me if you'd like to help. For your troubles I'll send you the analytical graphs I get from your music! Exciting, no?
In the meantime, would someone with a high quality recording set-up be so kind as convey to me a .wav file containing any 3 notes of your choice so long as they are in the same octave? I've only got my built in microphone which picks up a fair bit of noise. I'm working on filtering and removing outliers, but I'd like to see what a higher class recording set-up produces. Please PM me if you'd like to help. For your troubles I'll send you the analytical graphs I get from your music! Exciting, no?
I've been thinking about this sort of thing as well. I wonder if you can
use a Goertzel Filter, and apply it to a fixed window size (which is a buffer
of samples that is shifted every time a new sample comes in). That way,
whenever the detected frequency drops past your note threshold, that's
the start of a new note.
Here's some inspiration if you need it: this guy's software converts
monophonic WAV files into MIDI:
http://www.akoff.com/music-composer.html
Make sure to check out the samples.
Also, there was a lot of buzz about Melodyne's Direct Note Access, which
lets you make a lot of changes to individual notes in a polyphonic sample:
http://www.youtube.com/watch?v=jFCjv4_jqAY
use a Goertzel Filter, and apply it to a fixed window size (which is a buffer
of samples that is shifted every time a new sample comes in). That way,
whenever the detected frequency drops past your note threshold, that's
the start of a new note.
Here's some inspiration if you need it: this guy's software converts
monophonic WAV files into MIDI:
http://www.akoff.com/music-composer.html
Make sure to check out the samples.
Also, there was a lot of buzz about Melodyne's Direct Note Access, which
lets you make a lot of changes to individual notes in a polyphonic sample:
http://www.youtube.com/watch?v=jFCjv4_jqAY
...
What hoh! A host of new replies that all concern software that's prettier than mine. Well, I did ask for it, so thanks for the info! Finale does look pretty complex and well made, although AKoff seems like it would provide the main feature for much less cost. What follows is rather longer than I intended, so apologies in advance...
Still, I am having fun working on it, and, man hours aside, it's free so far.
Pyroh, it's strange but those mp3 files don't export as waves properly from Audacity. They play fine but the exported .wav has a wave form that most closely resembles the shapes of the Ghostbuster lightning guns. In other words, it goes all over the place. However, if I play the mp3 and record the output back into the mic port, I get a normal signal. Very odd, but thanks for sending them. I can tell you that you are 'more-or-less' in tune. Helpful no?
Fearfaoin: Those look like great resources! I'm a mechanical engineer by training, so I missed out on DSP. I thought I was doing something clever by calculating the optimum frame size and then taking FFTs of each frame. However..."A simplistic way is to take an FFT (Fast Fourier Transform) of the signal and check whether the desired frequency is present." Easy for him/her/it to say. Simplistic my foot.
Still, looks clever and efficient. Right now I work with pre-recorded waves as I figured they would be easier to analyze. My main problem with real-time encoding is that I'm not sure how to do it in Matlab as I don't think I have access to the Data Acquisition Toolbox. Still, by hook or by crook, real-time processing was going to come next after I got the basic algorithm down, but that filter looks promising. I suspect that if I dissected any of the many software tuners available, I'd find something like that which allows them to quickly detect different notes.
I can now clearly detect multiple notes in sequence in an output graph, so now it's a matter of getting the computer to recognize note transitions, for which I am currently using an amplitude threshold for the FFT power-spectrum (i.e. low amplitude frames are considered silence between notes). It's not great, and it doesn't work reliably yet, but it's a start.
Still, I am having fun working on it, and, man hours aside, it's free so far.
Pyroh, it's strange but those mp3 files don't export as waves properly from Audacity. They play fine but the exported .wav has a wave form that most closely resembles the shapes of the Ghostbuster lightning guns. In other words, it goes all over the place. However, if I play the mp3 and record the output back into the mic port, I get a normal signal. Very odd, but thanks for sending them. I can tell you that you are 'more-or-less' in tune. Helpful no?
Fearfaoin: Those look like great resources! I'm a mechanical engineer by training, so I missed out on DSP. I thought I was doing something clever by calculating the optimum frame size and then taking FFTs of each frame. However..."A simplistic way is to take an FFT (Fast Fourier Transform) of the signal and check whether the desired frequency is present." Easy for him/her/it to say. Simplistic my foot.
Still, looks clever and efficient. Right now I work with pre-recorded waves as I figured they would be easier to analyze. My main problem with real-time encoding is that I'm not sure how to do it in Matlab as I don't think I have access to the Data Acquisition Toolbox. Still, by hook or by crook, real-time processing was going to come next after I got the basic algorithm down, but that filter looks promising. I suspect that if I dissected any of the many software tuners available, I'd find something like that which allows them to quickly detect different notes.
I can now clearly detect multiple notes in sequence in an output graph, so now it's a matter of getting the computer to recognize note transitions, for which I am currently using an amplitude threshold for the FFT power-spectrum (i.e. low amplitude frames are considered silence between notes). It's not great, and it doesn't work reliably yet, but it's a start.