Friday, September 3, 2010

Drumstick Time

A new Drumstick version is in the oven, with two tasty novelties:

1. OVE file parsing support (files created by the Overture program).
The code for this feature has been contributed by Rui Fan. This file format can be played by the included program drumstick-guiplayer, in addition to the SMF and WRK formats. There is also a new drumstick-dumpove CLI utility to inspect the file contents as text.

2. Acquisition of real-time priority, using RealtimeKit.
Until now, the thread processing MIDI input from ALSA tried to acquire real-time priority using the RLIMIT_RTPRIO mechanism, which requires some configuration and administration work. If the above mechanism is not available, now Drumstick tries to acquire real-time priority from RealtimeKit.

This release is scheduled for sometime during next week.

What's next?

At this moment there are two libraries: drumstick-alsa (Linux) and drumstick-file. There will be two more: drumstick-win and drumstick-mac. The foundations of these two new libraries are already implemented in KMid2. On the other hand, it is desirable to unify all the backends for all platforms and file formats under a single set of multiplatform interfaces: drumstick-simple. VMPK will benefit from this, because replacing RtMIDI by Drumstick will be easier to implement features like MIDI file recording, playback and arpeggiator.

Friday, August 6, 2010

Electronic Music Stands

We are in full swing of electronic books, bubbles that are likely to explode into a new phase of the war between the old and new generations of publishers, content providers and consumers. It is likely that sheet music enter the battlefield.

Before proceeding I must warn you about two facts. One: despite the name of the blog, I am a Trekkie. Two: I am not a neutral observer. In my opinion traditional books publishing, as well as media labels, are going to lose. Those not able to adapt to changing times will disappear. Resistance is futile.

The musicians are going to adopt electronic lecterns sooner rather than later. The electronic scores begin to replace the editions printed on dead trees, as is already happening with books. There are some solutions on the market, more or less primitive.

MusicPad: Hardware and software.
How could you describe it? It is like a Kindle with legs. There is a "Master" version with twice the surface. Among its outstanding features: it is completely silent. Great virtue, because silence is also music.

MusicReader: Software only.
"The facto MusicPad Killer", they say. It is a program with Windows and Mac versions, which has more than just a page viewer. There is an optional accessory for turning pages with the foot. It can display half pages enlarged, as an aid to accessibility. Integrated additional functions: recorder, player, metronome and tuner.

eStand: Software for Windows, page viewer.

All of them are readers for electronic formats such as PDF or similar, showing pages, sections or page sets. MusicReader seems the most complete, yet is far from perfect. Some desirable features for an electronic music stand:
  • Pages no, thanks. The pages have no musical function and are mainly a nuisance. No pedal to turn pages, automatic scrolling is much better. Bookmarks, notes, sections, movements, labels, individually numbered bars. Everything indexed and easily searchable.
  • Size does matter. The musicians are supposed to have good ear, but nothing is said about sight. So it is better if the size of the staves is adjustable. For this reason, PDF is not very well suited for scores, it may be necessary to adjust the layout depending on the available area of representation. In this sense, the graphical representation of music resembles the visual organization of the widgets in graphical user interfaces.
  • Content indexing, cross referenced, not only metadata but all the data resulting from semantic content analysis. For example: tessitura of the parts (lowest and highest notes used by each voice and instrument in the composition) for each one of the scores in the library. With this data available, it may be possible to filter the appropriate pieces for different levels of students. Publishers must provide rich metadata, MIDI sequences, critical texts, and musicological analysis. It is not just changing the medium of the product, it is about changing the cellulose based mindset, into another way of thinking based on information.
  • Metronome. Probably many of the users will be students, so it will be convenient to have a metronome at the same place, taking the rhythm meter and the speed automatically from the values in the score. And of course, in addition to the optional audio reference, each bar should be highlighted while playing, keeping the current bar clearly visible in a central position, taking control of the scroll function, even when the metronome is quiet. Something like this.
  • Pitch tuner, recorder, playback. Computer: add an accompaniment. Computer: change the clarinet by an oboe. Computer: pause recording ...

Star Trek TNG 6/8: "A Fistful of Datas"
  • High connectivity: USB, Bluetooth, WiFi, Ethernet ...
  • If there is a small or large group of musicians, they may want to synchronize the electronic stands, loading and unloading documents and synchronizing the timers/metronomes.
We already have almost all the required technology as free software:
  • Music Typesetting, engraving PDF or PostScript scores: Lilypond.
  • Programs, libraries and components to display these documents: Okular.
  • Sequencers, synthesizers and MIDI players: KMid.
  • Free content: www.mutopiaproject.org

We have the opportunity to occupy a niche in musical education, and from here future musicians shall develop the habit of using free software. Perhaps with time, even to generate free content.



Star Trek Voyager 5/22: "Someone to Watch Over Me"

Thursday, August 5, 2010

Diagramas de Venn de las tribus de software

A los calores propios de la temporada estival, se han unido hace poco los de la última polémica sobre los males del tribalismo. El artículo de Aaron se abre con una frase hecha, que significa que cuando tomas una decisión debes aceptar sus consecuencias. Algo así como nuestro "cosechar lo  sembrado". Supongo que se refiere a las decisiones de Canonical, y que el chorreo que le está cayendo es su consecuencia. También se puede traducir literalmente al castellano e interpretar como una metáfora: hemos construido nuestras camas, y ahora dormimos en ellas. Eso es lo que hacemos las comunidades humanas. Los del software libre también, pero en general los humanos vivimos en tribus de forma cómoda y natural, y lo difícil es superar ese tribalismo atávico e innato colaborando en metas comunes a toda la especie. Y el problema es que la rivalidad entre tribus degenera a menudo en sectarismo de la peor especie, y de ahí la amarga queja de Shuttleworth.

El hecho de que existan dos tribus independientes, Gnome y KDE, en el mundo de los escritorios de software libre a mi me preocupa bastante poco. Cuando necesito un programa para solucionar un problema concreto suelo buscar entre las ofertas de opendesktop.org, que me presentan distintas opciones a elegir entre kde-aps.org, qt-apps.org, gtk-apps.org y otras. Hago aquí un inciso para decir que no me gusta demasiado esa organización, que sugiere alguna especie de guetos. Al final me quedo con la aplicación que me guste más, y a veces con más de una por el mismo precio, y ya elegiré con el tiempo. Otros no comparten la misma filosofía, y van de compras con el requisito irrenunciable de que los programas han de estar construidos con una única materia prima, pura y sin contaminación. Casi como una cuestión religiosa. Sus juguetes del Sect'R'Us, si se me permite el juego de palabras.

En este diagrama de Venn que es el Mundo, comparto una pequeña intersección con los habitantes de la tribu de los linux-audios. En algunos artículos recientes del planet.linuxaudio.org, alguien buscaba un reemplazo a su querido y viejo editor de textos NEdit de toda la vida para escribir programas. Gedit sería su alternativa natural, salvo que no satisface algunas características:
  • Buscar y reemplazar usando expresiones regulares o texto simple.
  • Buscar y reemplazar en todo el documento o solamente el área seleccionada.
  • Resaltado de parejas de llaves, paréntesis y corchetes.
  • Modos de edición específicos para lenguajes de programación, con auto-indentación.
  • Macros, como mecanismo de extensibilidad que permita una mayor personalización.
  • Atajos de teclado, por ejemplo para saltar a una línea concreta del documento.
Como el blog en cuestión no permite publicar comentarios, me he quedado con las ganas de recomendar Kate, que cumple de sobra con todos los puntos anteriores y no es muy diferente del reemplazo elegido: Geany. De hecho, Kate es el editor preferido por buena parte de mi tribu en esta otra intersección del diagrama de Venn. Pero a pesar de todas sus ventajas, algunos ni se plantearían su uso simplemente porque está basado en KDE.

Saturday, July 24, 2010

Future of KMid

The next version of KMid is in the kitchen right now, and it will have 2.4.0 as identifier. Tentatively, August 15th shall be the release date.

The main novelty is KMidPart, a component that implements the interface KMediaPlayer, playing MIDI/Karaoke files and using KMid infrastructure. The component shares the same configuration as the main program, so by default the MIDI port selection and Soft Synth will be common. This component by default shows only a play/stop combined button and a slider for the time position, in addition to the actions Play/Pause/Stop. Hidden, but selectable by means of KMediaPlayer::View interface methods, there are several additional controls: pause button, volume, pitch transpose and tempo (speed). The following pictures show the minimum and complete user interface respectively.



Once installed the new version of KMid, the KMidPart component is immediately available in Konqueror, either as file manager or web browser, since it is a simple standard KParts/ReadOnlyPart service. Examples of web sites that can benefit from this component can be anaigeon.free.fr and greekmidi.com.

Of course, this component is available to all fellow KDE developers so they can include MIDI playback in other programs. The programming API is quite simple, as demonstrated by two examples in C++ and Python included in the examples directory. If the KMediaPlayer interface is not enough, there are other methods and additional signals available through DBus.

From here, KMid will continue to evolve. I am considering further integration with KDE desktop technologies. For example, standard MIDI files are not scanned or indexed currently, but much of their metadata could be exploited with Nepomuk: tonality, rhythm, tempo, number of tracks and instruments. The settings of the songs, now stored in individual text files, may also be candidates for better integration. Another candidate for integration would be Solid, publishing system MIDI ports. Integrating KMid backends in Phonon can not be addressed at this time, but maybe in the future Phonon may evolve and such integration become possible.

Further integration into KDE unfortunately means less chance for KMid users of using it on Windows and Mac OSX. Although there are ports of KDE for those operating systems, both communities are not very active. I have received a suggestion that KMid does not need to depend on KDE, but only Qt4. This would make possible to distribute KMid binaries for Windows and Mac easily. I'm not especially interested in this option, followed for instance by the Rosegarden project, sacrificing both functionality and community by this way.

Wednesday, July 7, 2010

MIDI en las Jornadas

El pasado viernes 2 de Julio se celebraron en Barcelona las IX Jornades de Programari Lliure (jornadas de software libre). Este año han tenido un formato abreviado de un solo día, y han sido organizadas por la Politécnica de Catalunya. Los contenidos han girado en torno a dos ejes: el software libre y los contenidos libres en la educación, y el software libre en la empresa.



Al tratar de educación y software libre, lógicamente se ha hablado del programa eduCAT1x1 de la Generalitat, que básicamente consiste en entregar un ultraportátil a cada alumno e implantar el libro de texto digital; así como de Linkat, la distribución de Linux educativa del Departament d'Educació.

Mi intervención se ha titulado "MIDI en Linux". He presentado brevemente los programas KMid, KMetronome y VMPK con especial énfasis en las posibilidades didácticas en el ámbito musical de dichos programas y de la tecnología MIDI en general. Muchísimas gracias al público asistente y a la organización por su cálida acogida.

A pesar de su brevedad, el contenido de las mesas redondas y las conferencias ha sido interesante, ameno y en algunos casos no exento de polémica, lo cual también es enriquecedor. Espero con impaciencia las jornadas del próximo año.