David,
It's been a while, but I finally got around to thinking about how I would
properly implement something like MagicBaton in Python, and I've got a
prototype that essentially works the way you describe.
If you're interested, here's how to install and run the new code:
- Install the latest version of MidiKinesis, available at
http://www.math.tu-berlin.de/~brinkman/software/midikinesis/
Once you've unpacked the tarball, say 'make' in the midikinesis
directory.
- Install the Python Midi package. There's a link on the MidiKinesis
page. I guess the easiest (but not the nicest) way to make this work
is to simply dump the contents of the Python Midi package in the
midikinesis directory.
- Save the attached boaconductor.py in the midikinesis directory.
Now find a MIDI file that you want to experiment with. I like Matthias
Nagorni's MIDI files, available at
http://sourceforge.net/project/showfiles.php?group_id=69130&package_id=…
Just to make sure that your setup works, see whether you can play a MIDI
files with the midiplayer.py, by saying
python midiplayer.py file.mid
After starting this program, you need to hook up the MIDI output ports of
midiplayer.py to some synthesizer(s). I simply plug it into my digital piano.
When that's done, hit return, and you should hear the piece.
Now, to experiment with BoaConductor, you essentially do the same thing:
python boaconductor.py file.mid
Once again you need to hook up the MIDI output ports to some synthesizer(s),
and then you can start directing by tracing out circles in the GUI of
BoaConductor.
Since this is just a proof of concept at this point, I have spent a lot
of time on the user interface. In particular, right now any configuration
has to be done in the code itself. Here are the parameters you may want
to play with:
- self.gain: This one lets you increase or decrease the number of
quarters that one full revolution of the mouse corresponds to.
- self.tempo and self.volume: These are objects that use an
averaging process of sorts in order to remove the wobble that
imprecise mouse motions tend to cause. They have some parameters
that can be tweaked in order to make them more or less responsive.
I put a comment in the code to this effect. (In case you're
mathematically inclined, I'm using Kalman filters in order to
remove wobble without incurring too much latency.)
I'm also generating MIDI Master Volume messages based on the average
radius of the circles you're drawing, but my piano seems to ignore
them. It would be interesting to know whether they work on your
side.
I'd be interested to hear how you like the new gadget. As I said,
it's very rough around the edges at the moment, but I think it shows
that the general idea works. I'm also having a lot of fun with it.
Any thoughts would be appreciated!
Best,
Peter
On Thu, Jan 20, 2005 at 09:39:07AM +0200, David Baron wrote:
On Wednesday 19 January 2005 19:02,
linux-audio-user-request(a)music.columbia.edu wrote:
So how
would Raton-Conductor work? Again, not as simple as it sounds.
Minimally, one would move the mouse in a ecliptic (or circular) motion
(as suggested by MagicBaton's instructions for beginners). The size of
the vertical diameter (or average diameter) would be the
volume/expression and tempo or time-codes set by the change in vertical
direction from down to up. Real conducting patterns are more complex but
these two principals would more or less remain.
I started tinkering after I read your message, and I created a little
gadget that traces mouse motions and recognizes fairly general conducting
patterns. One can extract timing and intensity information for the purpose
of generating MIDI clock events as well as MIDI controller values. I'm
tentatively calling it Boa Conductor.
Cool!
I've got a few questions:
1. Is anyone interested in a tool like Boa Conductor? What I've done so
far was just for kicks; I now have to decide how much time and effort
to put into polishing it.
I, of course, would be interested.
2. Are there any MIDI sequencers/players for
Linux that can be driven
by external clock messages? My understanding is that Rosegarden does
not currently work as a slave but that may change in the future.
MusE can work as a slave, but I never used it before (has anyone
tried driving MusE with clock messages?). I don't think timidity
expects to be driven by a MIDI clock. How about other MIDI players?
3. Would it make sense to have a feature that uses JACK Transport
rather than MIDI clock?
There are a few alternatives. Not much that I have on Windows or Linux support
clock messages. MagicBaton was a MIDI-player that added events based on the
mouse-conducting.
Alternatives:
1. Run the Boa in Parallel with whatever sequencer or player is going through
jack or such. Boa would then put out simply omni/overall level and tempo
events.
2. Run Boa as a plug-in Rosegarten, Muse or other such program. In this case,
it would work on one track/channel and insert expression (and tempos) or in
an omni mode as above. For rehearsing (MagitBaton's parlance) one track, one
would probably want to disable tempo changes and conduct expression.
Omin/overall would do level and tempo.
3. Controlling another software via midi-clock and some volume control device.
This assume, naturally, that this software is available :-)
--