Friday, May 21, 2010

Weird KMetronome

After a long development cycle focused almost exclusively on KMid, it's time to give some love to other projects. I've been working lately on KMetronome, a MIDI metronome for KDE and ALSA. It is the oldest project of my little family.

The only issue in KMetronome's tracker is this one year old request, which has suggested the title of this post. The "Weird Metronome" is a popular simple MIDI metronome for Windows, which is the origin of "Open Metronome".

The major advantage of Weird / Open Metronome is the definition of rhythm patterns. The drawback is that it only works on Windows. It may be a good idea to make a Linux port. His definition of patterns is very simple and elegant, if somewhat limited. It has two branches: one producing MIDI events, and the other producing digital audio.

Although I can't rule out porting Open Metronome to Linux in the future, I've decided to implement the pattern editor differently. Here are some screenshots of the upcoming version 0.10 of KMetronome, dressed in Skulpture style.

Settings

Like KMidimon and VMPK, now KMetronome also uses an instrument definition file in .INS format, the same format as Qtractor, TSE3, Cakewalk and Sonar. I've added an "Output instrument" drop-down list in order to choose one among the standard General MIDI, Roland GS and Yamaha XG drum maps. You can add more definitions creating a file named "drums.ins" at $HOME/.kde4/share/apps/kmetronome. The options "Bank", "Program", "Weak note" and "Strong note" are now drop-down lists as well.

Main Window

There is a new button "Patterns" opening the rhythm pattern editor, and a drop-down list to choose the pattern. The default "Automatic" value means that the program generates the pattern as usual, using the notes set in the configuration dialog (Strong / Weak) and the rhythm definition provided by "Beats / Bar" and "Rhythm figure". The same drop-down list contains also the names of the user-defined patterns.

Pattern Editor

This is a new dialog box. You may edit, test and select patterns with it. To create new patterns, you simply save the current definition under a new name. Patterns are represented by a table. The rows in the table correspond to the percussion sounds. You can remove and add rows from a list of sounds defined by the instrument settings in the configuration dialog. The number of columns in the table determine the length of the pattern, between 1 and 99 elements of any rhythm figure.

Each table cell accepts values between N = 1 and 9, corresponding to the MIDI velocity (N * 127 / 9) of the notes, or 0 to cancel the sound. Valid values are also "f" (forte) and "p" (piano) corresponding to variable velocities defined by the rotary knobs (Strong / Weak) in the main window. The cell values can be selected and modified using either the keyboard or the mouse. No need to press the stop button before modifying the cells ...

This version is not ready yet, but will be probably published by the middle of next month. For now, you can get the sources from the Subversion repository. You need to install Drumstick before compiling it.

By the way, I'm planning to stop distributing binaries for all programs. If you like them and your favorite Linux distribution does not include Drumstick or KMetronome, it would be a good idea to start opening bug reports in its  enhancement request system, or sending messages to the distribution's mailing lists or web forum.

7 comments:

  1. Your posts are very interesting, even that I am not musician at all and I do not know almost anything about MIDI (I only played around with MIDI piano and devices with Atari ST in the end of 80's.) but the basic idea.

    "I'm planning to stop distributing binaries for all programs. If you like them and your favorite Linux distribution does not include Drumstick or KMetronome, it would be a good idea to start opening bug reports in its enhancement request system, or sending messages to the distribution's mailing lists or web forum."

    That is good plan. I believe developer should only focus to the software and not to distribute it to others as binaries. Let the distributors do their job and package the software your behalf and distribute it to users.

    ReplyDelete
  2. I thought you were using the OBS for cross-distro packaging? Any problems with that?

    ReplyDelete
  3. @Bille: yes, it is correct. I'm using the openSUSE build service. The problem is not the tool, it is that I'm not a packager, and I don't want to wear that hat. Making packages for several distros means learning and testing the packages on each distro for each release, and this requires time and is not very interesting for me.

    ReplyDelete
  4. Hey!

    Great stuff that you're back on KMetronome development, have been using that for some months now...

    But well there's one thing I have to complain about :D: the UI seems to be a bit "unstandard", imo the "Exit" and "Config" actions should only be accessible through the menu...

    Except that i've been using it happily :)

    Lukas

    ReplyDelete
  5. @boom1992: thanks!

    The set of buttons in the main window are a "fake toolbar", including a set of actions that in the new release will also be included in the (configurable) standard toolbar. I've added an option to hide this fake toolbar as well, hoping to make you even happier :)

    ReplyDelete
  6. @Pedro: Ok great :) I will give it a try when it's released :)

    Lukas

    ReplyDelete
  7. I am a beginner and KMetronome is huge help for me.
    Thank you.

    ReplyDelete