<?xml version="1.0"?><rss version="0.91"><channel><title>Onderstekop Weblog</title><description>A blog covering a broad range of topics such as: music, web development, coding, artificial intelligence, nature, games, jazz and much, much more.</description><language>en-us</language><copyright>Copyright 2006-2009, Onderstekop.nl</copyright><webMaster>bart@onderstekop.nl</webMaster><link>http://www.onderstekop.nl/</link><item><title>mingus, mingus, mingus 0.4!</title><description>Finally, after almost five months, version 0.4 of &lt;a href='http://mingus.googlecode.com/'&gt;mingus&lt;/a&gt; the &lt;strong&gt;music package for Python&lt;/strong&gt; has been released. A lot has happened since version 0.3:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;A separate &lt;strong&gt;midi&lt;/strong&gt; sub-package for playing, reading and writing midi data was added; The reading part is still buggy and should not be relied upon, but the rest works like a charm.&lt;/li&gt;&lt;li&gt;The fluidsynth module now uses the &lt;strong&gt;pyFluidSynth&lt;/strong&gt; bindings instead of depending on a running server to play notes.&lt;/li&gt;&lt;li&gt;A new module named value was added to make dealing with note durations easier.&lt;/li&gt;&lt;li&gt;Added &lt;strong&gt;chord substitution&lt;/strong&gt; algorithms in the progressions module.&lt;/li&gt;&lt;li&gt;More functions, updates and bugfixes in the existing packages (see the &lt;a href='http://code.google.com/p/mingus/source/browse/trunk/CHANGELOG'&gt;change log&lt;/a&gt; for detailed information).&lt;/li&gt;&lt;li&gt;Up to date documentation, tutorials and exercises.&lt;/li&gt;&lt;li&gt;Packages for &lt;strong&gt;Ubuntu&lt;/strong&gt; and &lt;strong&gt;Arch&lt;/strong&gt; (NB. these packages are not maintained by me and may not always be up to date).&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
Furthermore, the mailing list and bug tracker have been seeing some activity in the past couple of months, which has been great for finding and squashing bugs and getting a sense of what people are doing with mingus. I hope this will continue in the future and I would like to thank everybody who contributed. &lt;br /&gt;
&lt;br /&gt;
&lt;a href='http://mingus.googlecode.com/'&gt;mingus' homepage&lt;/a&gt;</description><link>http://www.onderstekop.nl/articles/131/</link></item><item><title>Qt Frontend for Music Generation Program</title><description>Last vacation I did a lot of work on the improviser program, which is called Improviser, because I have a lot of imagination. The program has a new Qt frontend, better control over macro and micro structure, produces MIDI files and can switch from black metal to blues to dance without blinking. Here some new demos, recorded this afternoon:&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Swinging Boogie Woogie&lt;/h3&gt;&lt;object width=&quot;360&quot; height=&quot;280&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/WJqkLpME-Aw&amp;hl=nl&amp;fs=1&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/WJqkLpME-Aw&amp;hl=nl&amp;fs=1&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;360&quot; height=&quot;280&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Modern Dance&lt;/h3&gt;&lt;object width=&quot;360&quot; height=&quot;280&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/g63f0jJG-qw&amp;hl=nl&amp;fs=1&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/g63f0jJG-qw&amp;hl=nl&amp;fs=1&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;360&quot; height=&quot;280&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
&lt;br /&gt;
A download is available at &lt;a href='http://pypi.python.org/pypi/improviser/'&gt;PyPi&lt;/a&gt;. More simulations can be found at &lt;a href='http://www.youtube.com/user/Onderstekop'&gt;YouTube&lt;/a&gt;.</description><link>http://www.onderstekop.nl/articles/130/</link></item><item><title>Write Your Own Musician!</title><description>I got a bit carried away with the improvisation program I started writing yesterday, because it was only meant as a simple example application, but turned out way too complicated. &lt;br /&gt;
&lt;br /&gt;
I started writing a new, better program from scratch today so I could do some more experiments, compose some songs, etc. and I think the resulting music is much better than before.&lt;br /&gt;
&lt;br /&gt;
This time you can write your own musicians and plug them into the song, which is following a progression in a structure. Sounds vague? Yeah, it's pretty vague, alright, and I won't waste everybody's time explaining it because the system is pure magic. Magic, I tell you!&lt;br /&gt;
&lt;br /&gt;
Let me just tell you that a collection of musicians has been written today that you can throw in any song you want. It's hilarious -they don't even know what's happening-.&lt;br /&gt;
&lt;br /&gt;
I wrote myself a stride pianist, some soloists and a couple of drummers and let them play together in my computer. They are pretty cool guys:&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Catchy Computer Improvisation&lt;/h3&gt;&lt;br /&gt;
&lt;object width=&quot;320&quot; height=&quot;220&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/K3lpZV-ZaWc&amp;hl=nl&amp;fs=1&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/K3lpZV-ZaWc&amp;hl=nl&amp;fs=1&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;320&quot; height=&quot;220&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
&lt;br /&gt;
You can find more examples on my &lt;a href='http://www.youtube.com/Onderstekop'&gt;YouTube channel&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
I need some sleep now.</description><link>http://www.onderstekop.nl/articles/129/</link></item><item><title>Automated Improvising</title><description>I've added another example application to the &lt;a href='http://mingus.googlecode.com/'&gt;mingus&lt;/a&gt; library today, which will generate drums, arrangements and solos for a given chord progression in real-time. &lt;br /&gt;
&lt;br /&gt;
The program can be found under &lt;code&gt;mingus_examples/improviser&lt;/code&gt; and knows how to swing as well. Check these example runs:&lt;br /&gt;
&lt;h3&gt;Test: Algorithmic Rock&lt;/h3&gt;&lt;object width=&quot;360&quot; height=&quot;220&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/PflDwRrx0VU&amp;hl=nl&amp;fs=1&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/PflDwRrx0VU&amp;hl=nl&amp;fs=1&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;360&quot; height=&quot;220&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Test: Modern Jazz&lt;/h3&gt;&lt;object width=&quot;360&quot; height=&quot;220&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/KHh4BbRsxuA&amp;hl=nl&amp;fs=1&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/KHh4BbRsxuA&amp;hl=nl&amp;fs=1&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;360&quot; height=&quot;220&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Nice Song&lt;/h3&gt;&lt;object width=&quot;360&quot; height=&quot;220&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/3wKkFf96Tl4&amp;hl=nl&amp;fs=1&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/3wKkFf96Tl4&amp;hl=nl&amp;fs=1&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;360&quot; height=&quot;220&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
&lt;br /&gt;
You can find some more examples on my &lt;a href='http://www.youtube.com/Onderstekop'&gt;YouTube channel&lt;/a&gt;.</description><link>http://www.onderstekop.nl/articles/128/</link></item><item><title>The mingus Drum Computer</title><description>I just finished the next example application for the python music package &lt;a href='http://mingus.googlecode.com/'&gt;mingus&lt;/a&gt;. Yesterday I presented &lt;a href='http://www.onderstekop.nl/articles/126/'&gt;a piano&lt;/a&gt;, today it's a drum computer with simple recording and playback functionality:&lt;br /&gt;
&lt;br /&gt;
&lt;object width=&quot;360&quot; height=&quot;220&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/FDdcz873tUQ&amp;hl=nl&amp;fs=1&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/FDdcz873tUQ&amp;hl=nl&amp;fs=1&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;360&quot; height=&quot;220&quot;&gt;&lt;/embed&gt;&lt;/object&gt;</description><link>http://www.onderstekop.nl/articles/127/</link></item><item><title>Piano-ex-machina: mingus Keyboard</title><description>My US-keyboard technique could use some work, but here goes:&lt;br /&gt;
&lt;br /&gt;
&lt;object width=&quot;360&quot; height=&quot;220&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/J-Yq9s2u51k&amp;hl=nl&amp;fs=1&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/J-Yq9s2u51k&amp;hl=nl&amp;fs=1&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;360&quot; height=&quot;220&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
&lt;br /&gt;
This program will soon be available in a new example program directory in the &lt;a href='http://mingus.googlecode.com/'&gt;mingus&lt;/a&gt; repository and is the first application demonstrating mingus' new &lt;a href='http://www.fluidsynth.org/'&gt;fluidsynth&lt;/a&gt; support. The program is controlled by the keyboard (that is - the one you use to type) and chords get recognized while you play (not shown in this version). The graphical stuff and event handling is done by pygame for now.&lt;br /&gt;
&lt;br /&gt;
The video was recorded with gtk-recordmydesktop. Audio was channeled through Jack Rack for a little (TOO MUCH!?) reverb using jack, which I finally got working. YouTube messed up the synching a bit, but I was happy they could handle ogg at all. &lt;br /&gt;
&lt;br /&gt;
/shuffles of stage.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Update @ Dec 5, 2008: &lt;/b&gt; &lt;br /&gt;
&lt;br /&gt;
/shuffles back on stage.&lt;br /&gt;
&lt;br /&gt;
Today another example application was made (&lt;a href='http://www.onderstekop.nl/articles/127/'&gt;a drum computer&lt;/a&gt;) that was added together with this piano to the new &lt;a href='http://code.google.com/p/mingus/source/browse/trunk/#trunk/mingus_examples'&gt;mingus_examples&lt;/a&gt; directory in the repository. </description><link>http://www.onderstekop.nl/articles/126/</link></item><item><title>mingus + MIDI sequencer = awesome!</title><description>Just a short post to let you know that I've added &lt;a href='http://www.fluidsynth.org/'&gt;fluidsynth&lt;/a&gt; support and a simple MIDI sequencer to the mingus package, which means there is now cross platform realtime MIDI playback to use with all the theoretical goodness.&lt;br /&gt;
&lt;br /&gt;
This little example requires a fluidsynth server running at port 9800:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&gt;&gt;&gt; from mingus.extra import fluidsynth&lt;br /&gt;
&gt;&gt;&gt; from mingus.container import *&lt;br /&gt;
&gt;&gt;&gt; fluidsynth.init_fluidsynth()&lt;br /&gt;
&gt;&gt;&gt; fluidsynth.play_Note(Note(&quot;A&quot;))&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
This only plays an A on the piano, but playing chords, bars and tracks with other instruments is just as simple.&lt;br /&gt;
&lt;br /&gt;
See &lt;a href='http://mingus.googlecode.com'&gt;mingus.googlecode.com&lt;/a&gt; for documentation, tutorials, downloads and the svn repository. &lt;br /&gt;
&lt;br /&gt;
PS. I've also added bash tab completion to the &lt;a href='http://www.onderstekop.nl/articles/124/'&gt;directory bookmark tool&lt;/a&gt; I released earlier. I will try to upload that as soon as possible to another googlecode site - Update: &lt;a href='http://code.google.com/p/cdbm/'&gt;see here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Update @ Dec 4, 2008: &lt;/b&gt; A first demo program using this new features - a software keyboard - was made. &lt;a href='http://www.onderstekop.nl/articles/126/'&gt;See here&lt;/a&gt;</description><link>http://www.onderstekop.nl/articles/125/</link></item><item><title>Command Line Bookmarks</title><description>Update &lt;b&gt;Dec 2, 2008&lt;/b&gt;: The 1.0 release can be found at &lt;a href='http://code.google.com/p/cdbm/'&gt;google code&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
bm is a program that can make life at the terminal a little easier when you often have to deal with a couple of directories at the same time. It can be used to keep bookmarks of directories you use regularly, but are a drag to type and switch between.&lt;br /&gt;
&lt;br /&gt;
Of course, there are the popd, pushd and dirs commands, but a stack is often not sufficient to work fast. That's why I wrote bm.&lt;br /&gt;
&lt;br /&gt;
bm is a tiny program written in C that reads from a simple, clear text bookmark file to generate an index. All you need to do to set it up is type the following in a terminal:&lt;br /&gt;
&lt;br /&gt;
	&lt;code&gt;wget http://cdbm.googlecode.com/files/bm-1.0.tar.gz&lt;br /&gt;
	tar -xvf bm-1.0.tar.gz&lt;br /&gt;
	cd bm-1.0&lt;br /&gt;
	make &amp;&amp; sudo make install&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Now you can type the bm command and it will show you nothing, because you haven't added any bookmarks yet. Lets add the current directory:&lt;br /&gt;
&lt;br /&gt;
	&lt;code&gt;$ bm -a&lt;br /&gt;
	0. /home/bspaans/bm-1.0&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
The directory has been added! Lets add another one:&lt;br /&gt;
&lt;br /&gt;
	&lt;code&gt;$ bm -a /var/log/apache2/&lt;br /&gt;
	0. /home/bspaans/bm-1.0&lt;br /&gt;
	1. /var/log/apache2/&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
As you can see we have built up a very small index. Using the index as the only argument we can now get the data out and use it with cd, for instance.&lt;br /&gt;
&lt;br /&gt;
	&lt;code&gt;$ bm 0&lt;br /&gt;
	/home/bspaans/bm-1.0&lt;br /&gt;
	$ bm 1&lt;br /&gt;
	/var/log/apache2/&lt;br /&gt;
	$ cd `bm 1`&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
This works, but the backticks get a little tiring. It would be nicer if we could just type something like:&lt;br /&gt;
&lt;br /&gt;
	&lt;code&gt;$ cdbm 1&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
And be done with it. &lt;span style='text-decoration:line-through'&gt;This is possible by adding a tiny function to your ~/.bashrc script: [...].&lt;/span&gt;  &lt;b&gt;Update @ Oct 17, 22:24&lt;/b&gt;: The last version automatically adds the commands cdbm and lsbm to the global bashrc file, so you can use them right after you have restarted your terminal.&lt;br /&gt;
&lt;br /&gt;
You can see more options by using the --help switch or by reading README.txt.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;UPDATE @ Oct 17, 21:22&lt;/b&gt;: I added tags to the program to make it more usable. When you add a directory you can now give a third argument that specifies the tag (use '.' or './' to add the current directory as a tag in this mode). The remove and list commands support tags as well, as you can see in this little example:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;$ bm -a /var/log/apache2 aplogs&lt;br /&gt;
0. /var/log/apache2 [aplogs]&lt;br /&gt;
$ bm aplogs&lt;br /&gt;
/var/log/apache2&lt;br /&gt;
$ cdbm aplogs&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
:wq</description><link>http://www.onderstekop.nl/articles/124/</link></item><item><title>Ah Um: mingus 0.3</title><description>Version 0.3 of &lt;a href='http://code.google.com/p/mingus/'&gt;mingus&lt;/a&gt;, the music theory package for Python &lt;a href='http://www.onderstekop.nl/articles/122/'&gt;I started working on a while back&lt;/a&gt; has been released. This new release contains a couple of new features since the last time I posted something:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;The structures for notes (bars, tracks, compositions, etc.) are ready and allow you to express a truck load of musical concepts from within Python.&lt;/li&gt;&lt;li&gt;A lot of time went into building and refining chord, scale, progression and interval recognition (more about this later), but it all works now.&lt;/li&gt;&lt;li&gt;A LilyPond generator to create sheet music (as suggested by &lt;a href='http://www.onderstekop.nl/article/122/#comment1038'&gt;rahul&lt;/a&gt;) has been added to the &lt;code&gt;extra&lt;/code&gt; sub-package.&lt;/li&gt;&lt;li&gt;Up to date, complete documentation and tutorials in the wiki. &lt;span class='sub'&gt;(Good documentation is crucial for packages like this, so don't hesitate to be a pedant in the wiki comment section.)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
A complete, up to date feature list and download can be found at &lt;a href='http://code.google.com/p/mingus/'&gt;mingus' google code page&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Since this library is mostly aimed at developers, I will now take some time to discuss some of the things I ran into while working on this release, that you may find interesting.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Searching Problems&lt;/h3&gt;&lt;h4&gt;Interval Recognition&lt;/h4&gt;This new release contains a couple of functions that let you analyze groups of notes. This begun relatively simple, with a function that could recognize intervals between notes. For instance, &lt;code&gt;intervals.determine('E', 'F')&lt;/code&gt; would return &lt;code&gt;'minor second'&lt;/code&gt;, and &lt;code&gt;intervals.determine('E',  'Ebb')&lt;/code&gt; would return &lt;code&gt;'diminished unison'&lt;/code&gt;. &lt;br /&gt;
&lt;br /&gt;
I started out naively; treating this as a counting problem.  To determine the interval between E and F I simply counted the steps between them (1) and used that number as an index in a simple ordered list to get the proper naming. This works for the E and F example, but fails horribly in the E-Ebb case (which would probably return a minor seventh, instead of a diminished unison). Music notation and theory is pretty elegant in itself, but it doesn't really play well with the list processing stuff I usually pull to get stuff done. So I added some unit tests, knocked myself over the head a couple of times and eventually whipped out the cycle of fifths again to fix that function. &lt;br /&gt;
&lt;br /&gt;
The trick is to count the steps of fifths in the note names and compare this to the measured half note steps. For example: the steps of fifths in the interval F-C# is 1 (F-C), however, there are 8 half note steps in the interval F-C#. 8 is bigger then 7 (which is the expected number of half note steps in a fifth), so the interval must be augmented and the function can happily return an augmented fifth. This method still chokes on unisons though (eg. E-Ebb: 0 fifth steps, 10 half note steps...augmented unison?? No.), so I added them as a little side case. The actual function is a little bit more complicated, but this is the gist of it.&lt;br /&gt;
&lt;br /&gt;
Once the interval recognition was working as it should, I could build another underestimated part of the library on top of it: &lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;The Chord Recognizer&lt;/h4&gt;The chord recognizer would have to be able to recognize all kinds of triads (chords of three notes), sevenths (a triad + a seventh), extended chords (a seventh chord + a ninth, eleventh or thirteenth), altered chords (every chord mentioned before, but in a slightly changed version (flat five, flat ninth, etc)), and the very lovable polychords (chords with other chords above them; eg. Gm|C is a C major triad with a G minor triad above it). Already this has become a huge task. The task becomes even bigger when you also have to recognize every inverted chord (eg. 'C', 'E', 'A' is still an A minor triad) and when you realize that a chord made of notes 'A', 'C' and 'G' is also a valid seventh chord, even when the fifth ('E') is missing. &lt;br /&gt;
&lt;br /&gt;
So yeah; the chord module turned out to be a lot of work and lines of code, but in the current release it does all the things mentioned above and can recognize almost every chord in the universe (missing chords should immediately be reported). It can probably do with a bit of refactoring and memoization (planned for the next release), but it's pretty fast already - all unit tests run within a second on my machine.&lt;br /&gt;
&lt;br /&gt;
The way it works is a bit hard to explain, but I'll give it a generalized shot. The &lt;code&gt;chords.determine&lt;/code&gt; function first measures the length of the note list and delegates the request to the right function for the job. Eg. a call to &lt;code&gt;chords.determine&lt;/code&gt; with a list of three notes will be redirected to &lt;code&gt;chords.determine_triad&lt;/code&gt;. Then the function looks at the intervals and figures out if it's a chord; every hit will be added to a list, other things will be ignored. This will find a lot of chords already, but can't really find inversions by itself (you would have to manually enter every possible inversion; an error prone process). That's why the function gets recursively called again, inverting the list of notes each time until it's at its last inversion. The function keeps track of the number of inversions performed so far and adds the results accordingly. &lt;br /&gt;
&lt;br /&gt;
Finding polychords is separated from this process and the function responsible for this will just be called before returning the results, because once you can determine chords of size 3-7, it turns out you can easily find chords made of a combination of them. The actual &lt;code&gt;determine_polychord&lt;/code&gt; function is only about 15 lines of actual code and a nice example of the aforementioned &lt;i&gt;list processing stuff&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;Scales and Progressions&lt;/h4&gt; mingus is also equiped with a scale and progression recognizer, which are a lot cleaner and easier to grasp from reading the source code. The scale.determine function basically starts out with all the good answers in a list and then removes (sieves out) all the wrong ones. I thought it was an interesting approach to pattern matching and it works much faster than 'brute forcing' it with endless `if` statements. &lt;br /&gt;
&lt;br /&gt;
&lt;span class='sub'&gt;The scales.determine function will be altered however, because it's quite useless for automatic recognition in ie. a single bar, since it needs all the notes in the scale to find the scale. The plan is to alter the behaviour so that it will return all the scales that you could possibly play within, using the notes passed as an argument. ie. ['A', 'C', 'E'] could be played in one of the minor scales, or in a plain diatonic C, etc. The more notes are given, the more precise you can determine the scale (your ear does the same thing, so I like this).&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Contributing to mingus&lt;/h3&gt; There are a couple of things that would be very nice to have: alsa, csound and midi support (in extra) and more analytic tools for containers are just a few of them. I can imagine people having their own ideas of cool extras or other things that would be nice to have and that's why I'm trying to open up the development process. &lt;br /&gt;
&lt;br /&gt;
I have transferred all my stuff from my own repository into &lt;a href='http://code.google.com/p/mingus/source/browse/trunk/'&gt;google's&lt;/a&gt; and also added my bugzilla entries into their &lt;a href='http://code.google.com/p/mingus/issues/list'&gt;issue tracker&lt;/a&gt;, so the development can take place over there. Building and distributing a new version and its reference documentation is 98% automated as well, so almost everything is in place. &lt;br /&gt;
&lt;br /&gt;
The only thing that's missing now is a proper way to communicate about the project using a mailing list, google group or forum, but that will be coming soon (I'm open for suggestions). I will also add some new pages to the wiki aimed at people who may want to contribute to mingus. &lt;br /&gt;
&lt;br /&gt;
&lt;a href='http://code.google.com/p/mingus/'&gt;mingus' downloads, docs and tutorials are here&lt;/a&gt;</description><link>http://www.onderstekop.nl/articles/123/</link></item><item><title>mingus: Music Theory for Python</title><description>	&lt;a href='http://www.onderstekop.nl/articles/121/'&gt;Last time&lt;/a&gt; I posted a rather chaotic and not-very-to-the-point journal of some of the things that are wrong with the use of naive algorithms to represent the ideas in music theory. I couldn't get this thing out of my head and decided to start working on a fundamental music theory and notation package for Python to make writing open source music applications easier. &lt;br /&gt;
&lt;br /&gt;
	Today I'm happy to announce that &lt;b&gt;mingus&lt;/b&gt;, as the package was dubbed, is currently at version 0.1.7.5 and encapsulates most of the things I set out to make (and much more). The features, so far:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt; Work with notes, intervals, chords, progressions, scales, keys and meters in a simple and theoretically sound way.&lt;/li&gt;&lt;li&gt; Generate natural diatonic intervals (seconds, thirds, fourths, etc) and absolute intervals (minor seconds, perfect fifths, etc.)&lt;/li&gt;&lt;li&gt; Generate natural diatonic triads and seventh chords, and absolute chords (min7, m/M7, etc). mingus also knows about inverted chords.&lt;/li&gt;&lt;li&gt; Refer to chords by their diatonic function (tonic, subtonic, etc. or I, ii, iii, IV, etc).&lt;/li&gt;&lt;li&gt; Work with diatonic scales and their modes (ionian, mixolydian, etc.),&lt;/li&gt;&lt;li&gt; generate the minor (natural, harmonic and melodic) and chromatic or whole note scales.&lt;/li&gt;&lt;li&gt;Recognize intervals and chords from lists of notes. &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
	Here are some simple examples:&lt;br /&gt;
&lt;br /&gt;
	&lt;code&gt; &gt;&gt;&gt; from mingus.core import *&lt;br /&gt;
	&gt;&gt;&gt; chords.minor_seventh(&quot;C&quot;)&lt;br /&gt;
	['C', 'Eb', 'G', 'Bb']&lt;br /&gt;
	&gt;&gt;&gt; progressions.to_chords([&quot;I&quot;, &quot;IV&quot;, &quot;V&quot;], &quot;C&quot;)&lt;br /&gt;
	[['C', 'E', 'G'], ['F', 'A', 'C'], ['G', 'B', 'D']]&lt;br /&gt;
	&gt;&gt;&gt; intervals.minor_fifth(&quot;C&quot;)&lt;br /&gt;
	'Gb'&lt;/code&gt;&lt;br /&gt;
	&lt;br /&gt;
	You can download mingus, follow its development and learn more about the package at &lt;a href='http://mingus.googlecode.com/'&gt;mingus project's page on&lt;br /&gt;
googlecode&lt;/a&gt;. To give you a preview of what's to come, here is what a simple bar currently looks like:&lt;br /&gt;
&lt;br /&gt;
	&lt;img src='http://www.onderstekop.nl/dump/firstbar.png'&gt;&lt;br /&gt;
&lt;br /&gt;
	The representation is still missing a couple of things as you can see, but work continues.&lt;br /&gt;
&lt;br /&gt;
	&lt;a href='http://mingus.googlecode.com'&gt;More mingus here&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;UPDATE:&lt;/b&gt; &lt;a href='http://www.onderstekop.nl/articles/123/'&gt;Version 0.3 of mingus has been released.&lt;/a&gt;</description><link>http://www.onderstekop.nl/articles/122/</link></item></channel></rss>