mingus 0.4.1.0 released

14 views
Skip to first unread message

char*

unread,
Jun 25, 2009, 10:46:23 PM6/25/09
to mingus
Hi all,

This release took a little bit longer than I promised, but here it is.
I haven't written any new tutorials yet, so I will just provide you
with some small code examples like the last time.

== midi/Sequencer.py ==

This is the new general purpose sequencer that can play the
mingus.containers. I doesn't make any sound, but instead makes some
event callbacks and notifies observers when something needs to be
played (observer pattern). For the most part it takes care of all the
icky timing algorithms, which nobody wants to reimplement everytime.

== midi/fluidsynth.py ==

This module now uses the new Sequencer class and has become a lot
simpler by doing so, because it now only needs to take care of
reacting to the events.

So what's the advantage of this new Sequencer?
1. The timing code is abstracted away, making it a lot easier to
support different back-ends (like portaudio, timidity, w/e) and MIDI
streaming for example.
2. You can now attach as many observers as you like. In previous
versions, when you called eg. fluidsynth.play_Bar , you couldn't know
when what note was being played and lost control for as long as the
Bar was playing. Now you can attach an observer and receive status
updates + parameters callbacks. I will add a basic SequencerObserver
class and a tutorial for this later; to make this as easy as possible.

== containers/NoteContainer.py ==

Added consonance and dissonance tests as methods. These functions test
each note against the other for consonance/dissonance.

>>> NoteContainer().from_chord("Am").is_consonant()
True
>>> NoteContainer().from_chord("Am").is_perfect_consonant()
False
>>> NoteContainer().from_chord("Am").is_imperfect_consonant()
False
>>> NoteContainer().from_chord("Am").is_dissonant()
False

== extra/fft.py ==

This is the new audio analysis module which can be used to find the
frequencies and Notes of raw audio data. I posted a rough version of
this before, but this one should be nicer, faster and better. In the
unit test folder you can find a pair of wav files to test with:

>>> import mingus.extra.fft as fft
>>> fft.find_melody("440_880_clean.wav")
[('A-4', 86), ('A-5', 86), ..]

find_melody is an experimental function, which is probably not that
useful 'in the wild'. It does great with these super clean sine waves,
but mostly fails when trying to decipher complex or noisy polyphonic
music. All the functions that give you fine grain control over the
frequencies and amplitudes and their analysis are there though so some
cool things should be possible. Check the source for more details.

That's it for now. I will try to update the wiki a bit in the
following couple of weeks, so hopefully the tutorials should also be
up soon.

Best regards,
Bart Spaans

James McDermott

unread,
Jun 26, 2009, 3:51:37 AM6/26/09
to mingus...@googlegroups.com
This looks really good -- especially the sequencer sounds like it will
make my life much easier!

Re FFT and pitch-detection -- instead of reimplementing the wheel (I
have spent some time doing research in this area and there are a lot
of semi-functioning wheels, including a square one I wrote myself), it
might be better to out-source this work. One option is Aubio, which
has a python binding and is already used by Pure Data and packaged for
Ubuntu:

http://aubio.org/

James
--
James McDermott
Natural Computing Research & Applications Group,
UCD CASL,
Belfield Business Park,
Dublin 14, Ireland.
http://www.skynet.ie/~jmmcd

char*

unread,
Jun 26, 2009, 10:49:12 AM6/26/09
to mingus
Hi James,
Thanks for the Aubio recommendation; hadn't heard of that one before.
I see they use it in Audacity so I have used this indirectly. Sounds
like a great lib. I'll check this out and see if we can integrate this
into mingus.
Thanks,
Bart Spaans

On Jun 26, 9:51 am, James McDermott <jamesmichaelmcderm...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages