tag:blogger.com,1999:blog-69829251732281019532024-02-19T03:26:14.728+01:00Midichlorians in the bloodBlog about MIDI, software, music, Linux, KDE, light sabers and Jedi garmentsPedrohttp://www.blogger.com/profile/06773011931515405946noreply@blogger.comBlogger49125tag:blogger.com,1999:blog-6982925173228101953.post-76369425566527002132023-08-07T17:16:00.000+02:002023-08-07T17:16:15.991+02:00Summer releases 2023<p><code><b>Barcelona Trees</b></code> <a href="https://github.com/pedrolcl/barcelona-trees/releases/tag/v0.0.5">v0.0.5 has been released</a>. This is the third Beta release of this program, that was already <a href="https://midi-clorianos.blogspot.com/2022/03/spring-is-coming.html">mentioned here</a> some time ago. The new features are:</p>
<ul>
<li>Database updated using the 2023_2T datasets from Open Data BCN</li>
<li>Added Dutch translation by <span class="citation" data-cites="Vistaus">@Vistaus</span>: Thanks!</li>
<li>Window Client Side Decorations on all platforms (except Android)</li>
<li>Build system migrated to CMake</li>
<li>Git Submodules for android_openssl and libq7zip</li>
<li>Migrated to Qt 6.5.2</li>
</ul>
<p>The last one is interesting, because the Location Maps were removed from Qt 6.0, but they came again in 6.5 so the migration was possible. Another interesting point is the new Dutch translation contributed by Heimen Stoffels. The Window CSD feature is based on the work of <a href="https://www.qt.io/blog/custom-window-decorations">Johan Helsing</a>, and it is available for Windows and Linux. It has the advantage of saving some screen space for the application window, providing a similar experience for all operating systems, and also similar to the Android interface…</p>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTXQF1xMgOgO9759eYZoVdMGFXfryT8FQDHgUYlBBBjOB0wCCKrpaHV0ccUyYENylj_xGboTvumO1yT5dPcAaELEHtxDmqb7Pn98IDpNrzzmTJsAcvbHXiN5Nbigt3wsJZf_xU-fapkdIJYEb2XmGuR4oRlN6a2NkVGq8Cm5cNAa2Xl4mcv6LKHOB6J00/s1920/android_screenshot.png" style="display: block; padding: 1em 0px; text-align: center;">
<img alt="" border="0" data-original-height="1920" data-original-width="1080" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTXQF1xMgOgO9759eYZoVdMGFXfryT8FQDHgUYlBBBjOB0wCCKrpaHV0ccUyYENylj_xGboTvumO1yT5dPcAaELEHtxDmqb7Pn98IDpNrzzmTJsAcvbHXiN5Nbigt3wsJZf_xU-fapkdIJYEb2XmGuR4oRlN6a2NkVGq8Cm5cNAa2Xl4mcv6LKHOB6J00/s320/android_screenshot.png" /></a></div>
<p>But of course, the most important feature is the Database update from the Open Data BCN datasets. This time the number of catalogued trees is 232,260 and the number of species is 487. Impressive numbers! but you may think how accurate is this database. Well, I am somewhat disappointed in my personal experience. I’ve been testing the new version for some time, and discovered that a <i><a href="https://en.wikipedia.org/wiki/Ginkgo_biloba" target="_blank">Ginkgo biloba</a></i> supposedly at Taulat with Selva de Mar doesn’t exist anymore. Not even a stump! <br /></p>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0SldHy3GRfcaxGn_OHkxD9VXI0-ho97xdrT9i3uhqGQz0XtBL_D56SJEeCeyVSvl-8zIgu5kiV8NfHmCrLe5JI_SGdEmanG0Sijs6ZP7jBBHkxquTUbIYkTNK3BLEWbbKaOVX4nl133K4Vv8vgFQLzB1xXwScsa2VrskDZ0CGCwtGyZsYOyjpiBKIuHo/s860/Ginkgo_biloba_taulat.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="860" data-original-width="513" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0SldHy3GRfcaxGn_OHkxD9VXI0-ho97xdrT9i3uhqGQz0XtBL_D56SJEeCeyVSvl-8zIgu5kiV8NfHmCrLe5JI_SGdEmanG0Sijs6ZP7jBBHkxquTUbIYkTNK3BLEWbbKaOVX4nl133K4Vv8vgFQLzB1xXwScsa2VrskDZ0CGCwtGyZsYOyjpiBKIuHo/s320/Ginkgo_biloba_taulat.png" /></a></div>
<p>And when checking two <a href="https://en.wikipedia.org/wiki/Metrosideros_excelsa" target="_blank"><i>Metrosideros excelsa</i></a>, on the Mar Bella promenade, I’ve found them dry dead. So sad! 😧<br /></p>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0e165d2QlptlcFv0_lG0bds_AnyOgLSxpOVI96imNHLZO6e5v5RVjTlU8vxSsNVRd4EQboLzxPZdUgBnlfULhVIiXmcfG5JE_R7cU3vOSA9fjXZFcpcGS8X8lBSFgoM282njoBuNgDIKKJNHVnproo-xe3DEkZgMLPwcuUZfoMmKXZAF5aKBRC_5djJo/s4608/metrosideros_drydead.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="4608" data-original-width="3456" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0e165d2QlptlcFv0_lG0bds_AnyOgLSxpOVI96imNHLZO6e5v5RVjTlU8vxSsNVRd4EQboLzxPZdUgBnlfULhVIiXmcfG5JE_R7cU3vOSA9fjXZFcpcGS8X8lBSFgoM282njoBuNgDIKKJNHVnproo-xe3DEkZgMLPwcuUZfoMmKXZAF5aKBRC_5djJo/s320/metrosideros_drydead.png" /></a></div>
<p>There are three more Metrosideros not far away that look healthy. Live long and prosper, dear Pohutukawas!🖖</p>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBNvo3NIBiabTyYxBi-LxBCFcJ7kpRlaO_1iTRPgRrdyxOI83gZsku4amwDJxsJu7PXInpa39UtoaowMNP2VWF__YKIgZof3G9eYj284iSzUvFg-6zUfPElqgT1Ogo41ElLov9kAuWjpW6i49I0TynDK-JpYUEw4xBCrK7XXgA3PjAK081C0FfudTsCiY/s4608/metrosideros_excelsa.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="3456" data-original-width="4608" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBNvo3NIBiabTyYxBi-LxBCFcJ7kpRlaO_1iTRPgRrdyxOI83gZsku4amwDJxsJu7PXInpa39UtoaowMNP2VWF__YKIgZof3G9eYj284iSzUvFg-6zUfPElqgT1Ogo41ElLov9kAuWjpW6i49I0TynDK-JpYUEw4xBCrK7XXgA3PjAK081C0FfudTsCiY/s320/metrosideros_excelsa.png" width="320" /></a></div>
Pedrohttp://www.blogger.com/profile/06773011931515405946noreply@blogger.com0Barcelona, España41.3873974 2.16856813.077163563821152 -32.987682 69.697631236178836 37.324818tag:blogger.com,1999:blog-6982925173228101953.post-735246715293645462022-08-14T14:26:00.001+02:002022-08-14T14:26:09.190+02:00Drumstick Libraries 2.7.1 Released<p>Drumstick is a set of MIDI libraries using C++/Qt idioms and style. Includes a C++ wrapper around the ALSA library sequencer interface: ALSA sequencer provides software support for MIDI technology on Linux. A complementary library provides classes for processing SMF (Standard MIDI files: .MID/.KAR), RIFF MIDI (.RMI), and Cakewalk (.WRK) file formats. A multiplatform realtime MIDI I/O library and a GUI Widgets libraries are also provided for Linux, Windows, and Mac OSX.</p>
<p>This is another sonivox related release. Please see: <a href="https://github.com/pedrolcl/sonivox" target="_blank">https://github.com/pedrolcl/sonivox</a></p>
<p>I didn't want to make the sonivox dependency mandatory, because there may be good reasons for an user to avoid building drumstick with all its features. A final user may be interested in FluidSynth output only (which is also an optional feature) or even using ALSA sequencer only, without any soft-synth at all.</p>
<p>But what is a legitimate choice for a final user may be a questionable restriction for a distribution, because you may not know all use cases of your users. In this case, SonivoxEAS is the default Linux output for drumstick-vpiano and VMPK, because I think that any user installing those programs the first time should be able to hear sound by default, without needing to configure/investigate about MIDI or SoundFonts. Otherwise, there will be many users complaining that their Linux virtual pianos do not produce any sound!</p>
<p>On the other hand, until now the sonivox library sources were embedded inside the drumstick source tarballs, and statically linked to the SonivoxEAS backend. This was against most Linux distros packaging policy. Providing an standalone shared library instead, the issue has been fixed.</p>
<p>Changes in v2.7.1:</p>
<ul>
<li>Fixed ticket #45: the sonivox library dependency (for the SonivoxEAS synth backend) is optional, and easily forgotten by 3rd party packagers. The build system configuration now fails with an error message if the sonivox library is missing unless the cmake variables <b>USE_SONIVOX</b> and <b>USE_PULSEAUDIO</b> are set to OFF. Same failure with the FluidSynth backend and the variable <b>USE_FLUIDSYNTH</b>, and the ipMIDI Network backend and <b>USE_NETWORK</b>.</li>
<li>Fixed underlinking in some RT backends.</li>
</ul>
<p>Compilation minimum requirements for all platforms:</p>
<ul>
<li>C++11 compiler</li>
<li>CMake 3.14</li>
<li>Qt5 >= 5.9 or Qt6 >= 6.2 (with Qt6Core5Compat library dependency for Drumstick::File)</li>
</ul>
<p>Feature dependencies (for some platforms):</p>
<ul>
<li>ALSA (Linux only)</li>
<li>PulseAudio (Unix)</li>
<li>D-Bus (Unix)</li>
<li>Sonivox (Unix)</li>
<li>FluidSynth (All platforms)</li>
</ul>
<p>Copyright (C) 2009-2022, Pedro Lopez-Cabanillas License: GPL v3 or later</p>
<p>Project web site <a href="https://sourceforge.net/p/drumstick" target="_blank">https://sourceforge.net/p/drumstick</a></p>
<p>Online documentation <a href="https://drumstick.sourceforge.io/docs/" target="_blank">https://drumstick.sourceforge.io/docs/</a></p>
<p>Downloads <a href="https://sourceforge.net/projects/drumstick/files/2.7.1/" target="_blank">https://sourceforge.net/projects/drumstick/files/2.7.1/</a></p>
Pedrohttp://www.blogger.com/profile/06773011931515405946noreply@blogger.com0tag:blogger.com,1999:blog-6982925173228101953.post-16644384105002161642022-08-11T23:09:00.000+02:002022-08-11T23:09:04.135+02:00Summer Releases<p>This week I have published several new versions of my music applications:</p>
<ul>
<li> <a href="https://sourceforge.net/projects/kmetronome/files/kmetronome/1.3.1/">Drumstick Metronome (kmetronome) v1.3.1</a>
<li> <a href="https://sourceforge.net/projects/kmidimon/files/1.3.1/">Drumstick MIDI Monitor (kmidimon) v1.3.1</a>
<li> <a href="https://sourceforge.net/projects/dmidiplayer/files/v1.7.0/">Drumstick MIDI File Player (dmidiplayer) v1.7.0</a>
</ul>
<p>The first two applications, kmetronome and kmidimon, are now over fifteen years old and are only available for Linux. These two new versions are simply bug fixes, with no new features. But it is interesting to note that in FlatHub they are already based on Qt6 and supporting both Wayland and X11, although the packages in AppImage format still use Qt5. The chances of finding these applications in the official repositories of Linux distributions are slim. In fact, kmidimon was removed from the official Debian repositories with some lame excuse, and it is unlikely to be included again. I can't do anything about it, so please: direct complaints where they belong. Or use the new available distribution formats or the unofficial repositories, like Debian Multimedia, which includes the three mentioned applications and many others.</p>
<p>The other app, dmidiplayer, is much newer and cross-platform. It is the successor to Kmid2, the KDE karaoke application that I rewrote many years ago. In this new version the most remarkable new feature is the persistent configuration of the songs. This is a feature that was already present in the old Kmid2 and that allows you to store the tempo, general volume, pitch transposition, and MIDI channel settings for each song, which will be applied when it is played again in the future. The other novelty is the individual volume adjustment for each MIDI channel, something that was not possible in Kmid2.</p>
<p>After all these years, it is curious that it is still possible to find Kmid2 in one distribution: Fedora, despite being a Qt4/KDE4 application. So a functional comparison of both applications is not only possible, but easy to do. In my opinion, with this version dmidiplayer has reached parity in terms of functionality with Kmid2. On the other hand, the new architecture has allowed the application to be available on other Unixes (such as FreeBSD) in addition to Linux, macOS, and Windows.</p>
<p>I guess the next app to get updates will be VMPK. There is no forecast yet of the changes it will bring, but there is a recurring request that I will not do: MIDI Jack support. This is not to say that it is not possible to use Jack MIDI with VMPK, because in fact there is an utility called 'a2jmidid' that serves as a translation layer between applications using the ALSA Sequencer and Jack MIDI. On the other hand, for VMPK to use new native backends it is only necessary to implement Drumstick::RT plugins. And this can be done by any interested developer, and then independently distribute the out-of-tree plugins. I've opened a <a href="https://github.com/pedrolcl/drumstick/discussions/9" target="_blank">discussion on GitHub</a> about this. Anyone interested, please read and ask your questions there.</p>
Pedrohttp://www.blogger.com/profile/06773011931515405946noreply@blogger.com0tag:blogger.com,1999:blog-6982925173228101953.post-90921831977222185392022-07-31T23:37:00.000+02:002022-07-31T23:37:09.760+02:00Dog days releases<p>It's hot weather these days here at Barcelona! It is also time for releases...</p>
<p>A new synthesizer library has been released on July 28, 2022: <a href="https://github.com/pedrolcl/sonivox">Sonivox</a>. This project is a fork of the Android Open Source Project 'platform_external_sonivox', including a CMake based build system to be used not on Android, but on any other computer Operating System. Google licensed this work originally named Sonivox EAS (Embedded Audio Synthesis) from the company Sonic Network Inc. under the terms of the Apache License 2.0.</p>
<p>This is a Wave Table synthesizer, not using external soundfont files but embedded samples instead. It is also a real time GM synthesizer. It consumes very little resources, so it may be indicated in projects for small embedded devices. There is neither MIDI input nor Audio output facilities included in the library. You need to provide your own input/output.</p>
<p>Until now, the "eassynth" Drumstick::RT backend included the sonivox library sources, compiled and statically linked. Now, the build system search for an external sonivox library like any other dependency, and dynamically links the shared library when found.</p>
<p>Please find <a href="https://github.com/pedrolcl/sonivox/releases">here</a> the source tarballs.</p>
<p>There are two other projects/prototypes that use this library in my portfolio. They embed it as a git submodule, or find it as an external dependency:</p>
<ul>
<li><a href="https://github.com/pedrolcl/Linux-SonivoxEas">Linux-SonivoxEAS</a>. I've already <a href="https://midi-clorianos.blogspot.com/2016/04/taking-back-from-android.html">blogged about it</a> several years ago.</li>
<li><a href="https://github.com/pedrolcl/multiplatform-sonivoxeas">multiplatform-sonivoxeas</a> with Drumstick::RT MIDI input and Qt Multimedia audio output.</li>
</ul>
<p>I prefer to have all the code in a single place, avoiding duplication. But it is not only my personal convenience, Linux users would have a single copy of the library installed in their systems, which will be easier to patch or replace by the distribution vendors when needed. Of course this would be not possible if their only choice is to install the applications as an AppImage, or a Flatpak.</p>
<p>The other release today July 31, 2022 is Drumstick 2.7.0</p>
<p>A brief summary of changes for this release:</p>
<ul>
<li>ticket #44: removed sonivox library sources from the source tree. The Sonivox library is an external dependency.</li>
<li>ticket #43: Drumstick::RT dummy plugins now include its own configuration dialogs.</li>
<li>ticket #42: Drumstick::Widgets - fixed piano designer plugin to show more properties.</li>
<li>ticket #41 Drumstick::Widgets: Option to use subscript octave designation.</li>
<li>Drumstick::ALSA registering SequencerEvent with qMetaType.</li>
<li>Drumstick::RT FluidSynth plugin updated with changes in fluidsynth 2.2.8</li>
<li>Utils: vpiano uses the subscript octave designation option.</li>
</ul>
<p>Compilation minimum requirements for all platforms:</p>
<ul>
<li>C++11 compiler</li>
<li>CMake 3.14</li>
<li>Qt5 >= 5.9 or Qt6 >= 6.2 (with Qt6Core5Compat library dependency for Drumstick::File)</li>
</ul>
<p>Feature dependencies (for some platforms):</p>
<ul>
<li>ALSA (Linux only)</li>
<li>PulseAudio (Unix)</li>
<li>D-Bus (Unix)</li>
<li>Sonivox (Unix)</li>
<li>FluidSynth (All platforms)</li>
</ul>
<p><a href="https://sourceforge.net/projects/drumstick/files/2.7.0/">Downloads</a></p>
Pedrohttp://www.blogger.com/profile/06773011931515405946noreply@blogger.com0tag:blogger.com,1999:blog-6982925173228101953.post-34542224778335366962022-04-05T09:51:00.000+02:002022-04-05T09:51:15.263+02:00Procrustes' Piano<p>In Greek mythology, <a href="https://en.wikipedia.org/wiki/Procrustes">Procrustes</a> was a rogue smith and bandit. He had an iron bed, in which he invited every passer-by to spend the night. If the guest was shorter than the bed, he used his smith hammer to stretch them to fit. If the guest proved too tall, Procrustes amputated the excess length; nobody ever fitted the bed exactly. Procrustes continued his reign of terror until he was killed by Theseus.</p>
<p>In common language, a "Procrustean bed" is an arbitrary standard to which exact conformity is forced. Pianos are one example of <a href="https://en.wikipedia.org/wiki/One_size_fits_all">"One size fits all"</a> disregarding <a href="https://en.wikipedia.org/wiki/Human_factors_and_ergonomics">Ergonomics</a> absolutely.</p>
<p>The number of keys is almost always 88, no matter that the lowest notes and the uppermost octave is rarely used. In fact, <a href="https://www.youtube.com/watch?v=2ef95BZfYcw">Mozart's forte piano</a> had only 66 keys, and the keys colors were often reversed. Today, we can find instruments manufactured by Bösendorfer with <a href="https://www.boesendorfer.com/en/pianos/pianos/grand-piano-225">92 Keys</a> and even <a href="https://www.boesendorfer.com/en/pianos/pianos/Concert-Grand-290-Imperial">97 Keys</a>, but other examples are rare.</p>
<p>But the worst arbitrariness is the keys size. As Lionel Yu explains, this is the <a href="https://www.youtube.com/watch?v=ZXlknI-Jc48">Piano's Darkest Secret</a>. It is not just the size of the hand that greatly influences performance, given the standardized size of the piano keys, but also may be the cause of musicians' serious injuries or physical disorders. Linda Gould tells his experience with narrower keys in <a href="https://www.youtube.com/watch?v=Jn9-c8n0Q3s">My Piano Has a Secret</a>. There are smaller size violins: 1/2, 3/4 adapted for young people; Why there are not smaller size piano keys as well? This is exactly what the <a href="https://paskpiano.org">Pianists for Alternatively Sized Keyboards</a> organization is advocating: "If everyone plays the same size, most are playing the wrong size!".</p>
<p>I would like to be able to contribute more to making things better for pianists, but what I can do is making VMPK as flexible as possible. You can configure the number of keys as you wish: 25, 49, 88, up to 121 keys for ten octaves maximum (MIDI has a limit of 128 notes). You may also choose the initial note, and of course the octave shift (base octave) and transposition in semitones. The colors of the keys are also fully configurable, and the key size is the easiest thing: you only need to stretch or shrink the program window to adapt the key size to your taste and needs.</p>
<p>I've just published a new release of <a href="https://sourceforge.net/projects/drumstick/files/2.6.0/">Drumstick Libraries 2.6.0</a> and <a href="https://sourceforge.net/projects/vmpk/files/vmpk/0.8.7/">VMPK 0.8.7</a>, focused on fixing bugs like the handling of low level computer keyboard events (which wasn't working on Wayland before) and touch-screen events on Linux (Wayland and X11). The program can handle as many fingers as the touch-screen supports, but I've noticed that Gnome 41 on Wayland has built-in gestures with three fingers that can't be disabled (or there is not yet an extension/tweak to do so), and those gestures are the cause that you can only use two fingers on VMPK. Sorry!</p>Pedrohttp://www.blogger.com/profile/06773011931515405946noreply@blogger.com0tag:blogger.com,1999:blog-6982925173228101953.post-71473386504079159692022-03-18T16:48:00.001+01:002022-03-20T12:37:20.629+01:00Spring is coming<p>I've just released <a href="https://github.com/pedrolcl/barcelona-trees/releases/tag/v0.0.4">Barcelona Trees, Beta2 v0.0.4</a>, which is just another extremely niche application, totally unrelated to MIDI, but also based on the <a href="https://www.qt.io/">Qt frameworks</a> like my other free software projects.</p>
<p>The motivation of this program is to help <a href="https://en.wikipedia.org/wiki/Barcelona">Barcelona</a> visitors or dwellers, answering questions such as:</p>
<ul>
<li>What trees are nearby? (from manual or GPS location)</li>
<li>What trees are on a given street or garden?</li>
<li>Where can I find specimens of a certain genus/species?</li>
<li>For each specimen, obtain more information about its species from existing data on Wikipedia and public images.</li>
</ul>
<p align="center"><img alt="screenshot" src="https://pedrolcl.github.io/barcelona-trees/screenshot.png" /></p>
<p>This may be useful in many ways, from Botany students to simply curious people. Barcelona has plenty of trees: almost 230k at this moment. And the <a href="https://opendata-ajuntament.barcelona.cat/en">Open Data BCN</a> service periodically publishes several datasets cataloging the Geo-located specimens in public spaces that are used by this application.</p>
<p align="center"><a href="https://commons.wikimedia.org/wiki/File:Palau_GC-_tarongers0682-01.jpg" title="ca:user:amadalvarez, CC BY-SA 2.5 <https://creativecommons.org/licenses/by-sa/2.5>, via Wikimedia Commons"><img alt="Palau GC- tarongers0682-01" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Palau_GC-_tarongers0682-01.jpg/512px-Palau_GC-_tarongers0682-01.jpg" width="512" /></a></p>
<p>As an example, there are more than 3k <a href="https://en.wikipedia.org/wiki/Bitter_orange">Bitter Orange trees</a> like the above (the Courtyard of the orange trees is not in a public place, it is inside an official building) used as ornamental. They are not edible in raw, <a href="https://www.barcelona.cat/infobarcelona/en/local-people-in-sant-andreu-turn-their-oranges-into-marmalade_1041932.html">but can be used for cooking</a>. On the other hand, there are a few (dozens) other Citrus gender specimens that are truly edible, and you may find using <a href="https://pedrolcl.github.io/barcelona-trees/">the program</a>. Enjoy!</p>
<h2 id="farewell">Farewell</h2>
<p>This release using Qt 5.15 may be the last one for this application. It won't be a Qt6 migration, because the Qt Location Maps have been <a href="https://www.qt.io/blog/qt-6.2-vs.-qt-5.15-the-feature-parity-comparison">removed in Qt6</a>, but this may <a href="https://bugreports.qt.io/browse/QTBUG-96795">change in the future...</a></p>
<p>Another functionality lost in Qt6 is the QTextCodec class, removed from QtCore and moved to the Core5Compat module that <a href="https://midi-clorianos.blogspot.com/2021/12/winter-releases.html" target="_blank">has been already mentioned here</a>, and provides conversion from many text encodings to Unicode. This issue has impacted applications reading MIDI files, and the Drumstick::File library. Well, I've tested two possible replacements...</p>
<ul>
<li><a href="https://github.com/pedrolcl/icu_qt_poc">Integrating libICU for Unicode conversion and charset detection with Qt apps (POC)</a></li>
<li><a href="https://github.com/pedrolcl/iconv_qt_poc">Integrating iconv() for Unicode conversion with Qt apps (POC)</a></li>
</ul>
<p>iconv() is a POSIX API, and it is included in the C library of many Unix systems, like the GNU libc. This may be detected by cmake, and in this case no additional library needs to be linked to the application program, but the external libiconv is also supported when needed.</p>
<p>Character set detection was never provided by Qt. The iconv() POC uses the latest uchardet library (0.0.7 at the time of writing this), which only supports pkg-config. A newer version will include also support for find_package() and imported targets. On the other hand, libICU provides charset detection in addition to Unicode conversion.</p>
Pedrohttp://www.blogger.com/profile/06773011931515405946noreply@blogger.com6tag:blogger.com,1999:blog-6982925173228101953.post-33629366820814414582021-12-26T11:54:00.000+01:002021-12-26T11:54:12.359+01:00Winter Releases<p>In addition to the usual bug fixing, a common pattern across all projects are the changes related to the transition to Qt6, still experimental but mature enough, while keeping compatibility with Qt5. One stopper in this transition is the removal of the QTextCodec class in Qt6 core libraries, moved to the Core5Compat module, risking to be definitely removed at some point in the future. Some methods in Drumstick::File that depend on this class are deprecated now. This functionality is key for data preservation when parsing/importing MIDI files containing text metadata (titles, comments, names, copyrights, lyrics, markers, ...) encoded in any random scheme available in the last 30 years. But the alternative in Qt6 is the QStringConverter and related classes that only supports a very limited set of encodings, mostly Unicode.</p>
<p>This problem deserves deeper thoughts...</p>
<p>If we were talking about pure text files, this could be solved using for instance the <code>iconv</code> command line Unix utility, that converts text files from one encoding to another, for instance from ISO-8859-5 (Cyrillic alphabet) to UTF-8. Then, the new text file encoded in Unicode could be processed by a Qt6 program without limitations. But MIDI files are compact binary structures that can't be processed directly with that utility.</p>
<p>The second root of the problem comes from the SMF nature itself. The Standard MIDI File format was created as an interchange file format, so the music created in sequencers using proprietary storage formats could be exported and retrieved by another sequencer. Sequencer machines and software at one point become deprecated, stopping to work, and can't be used anymore. Composition files created in those systems are now digital garbage for the trash bin, except if the author took the precaution of keeping exported MIDI files. Those are now the equivalent of modern digital manuscripts, which we try to preserve and keep them readable for the foreseeable future within our musical applications.</p>
<h2 id="changes-in-virtual-midi-piano-keyboard-v0.8.6">Changes in Virtual MIDI Piano Keyboard v0.8.6:</h2>
<ul>
<li>Fixed advanced setting on connections dialog.</li>
<li>Enabled empty input connection after fix on drumstick-ALSA: requires external connections utility.</li>
<li>Better inverted piano colors after fix on drumstick-widgets: changed the white keys background picture depending on the key background color.</li>
<li>Removed dependency on Qt6::Core5Compat when building with Qt6</li>
<li>Requires: drumstick-2.5</li>
</ul>
<p>Downloads: <a href="http://sourceforge.net/projects/vmpk/files/0.8.6/" target="_blank">http://sourceforge.net/projects/vmpk/files/0.8.6/</a></p>
<h2 id="changes-in-drumstick-midi-player-v1.5.3">Changes in Drumstick MIDI Player v1.5.3:</h2>
<ul>
<li>After drumstick ticket #37: WRK format markers are supported</li>
<li>Replaced deprecated signals from drumstick-file when building with Qt6</li>
<li>Requires: drumstick-2.5</li>
</ul>
<p>Downloads: <a href="https://sourceforge.net/projects/dmidiplayer/files/v1.5.3/" target="_blank">https://sourceforge.net/projects/dmidiplayer/files/v1.5.3/</a></p>
<h2 id="changes-in-drumstick-metronome-1.3.0">Changes in Drumstick Metronome 1.3.0</h2>
<ul>
<li>Czech translation updated, by Pavel Fric</li>
<li>Qt6 compatibility fixes</li>
<li>New build options: USE_QT and BUILD_DOCS</li>
<li>Revised and updated documentation system: using Pandoc to create man page and help documents</li>
<li>New settings: qt style, forced dark mode, and internal icon theme</li>
<li>Added action icons: internal theme based on breeze</li>
<li>Desktop icon replaced</li>
</ul>
<p>Downloads: <a href="https://sourceforge.net/projects/kmetronome/files/kmetronome/1.3.0/" target="_blank">https://sourceforge.net/projects/kmetronome/files/kmetronome/1.3.0/</a></p>
<h2 id="changes-in-drumstick-midi-monitor-v1.2.0">Changes in Drumstick MIDI Monitor v1.2.0</h2>
<ul>
<li>Czech translation updated, by Pavel Fric</li>
<li>Revised and updated documentation system: using Pandoc to create man page and help documents</li>
<li>New build options: USE_QT and BUILD_DOCS</li>
<li>Qt6 compatibility fixes</li>
<li>Save recording fixes</li>
<li>Fixed mute track functionality</li>
<li>Fixed event playback highlighting</li>
<li>Support WRK file format markers, provided by Drumstick 2.5</li>
<li>Desktop icon replaced</li>
</ul>
<p>Downloads: <a href="https://sourceforge.net/projects/kmidimon/files/1.2.0/" target="_blank">https://sourceforge.net/projects/kmidimon/files/1.2.0/</a></p>
<h2 id="changes-in-wrk2mid-v1.1.0">Changes in WRK2MID v1.1.0</h2>
<ul>
<li>New build option: BUILD_DOCS.</li>
<li>New Build option: USE_QT to choose between Qt5 and Qt6. Closes ticket #3.</li>
<li>Convert WRK track Port parameter. Closes ticket #2.</li>
<li>Convert WRK markers into SMF text markers. Closes ticket #1.</li>
<li>Displayed compiled and runtime library version information.</li>
</ul>
<p>Downloads: <a href="https://sourceforge.net/projects/wrk2mid/files/v1.1.0/" target="_blank">https://sourceforge.net/projects/wrk2mid/files/v1.1.0/</a></p>
<h2 id="changes-in-drumstick-libraries-v2.5.0">Changes in Drumstick Libraries v2.5.0:</h2>
<ul>
<li>New build options: BUILD_ALSA, BUILD_FILE, BUILD_RT, BUILD_WIDGETS to control building only some of the libraries.</li>
<li>RT, VPiano: Fixed ALSA and CoreMIDI backends, enabling empty connections (for using external connection tools).</li>
<li>Deprecation of the Drumstick::File functions affected by the QTextCodec class removal on Qt6.</li>
<li>Raised macOS deployment target to 10.13 (High Sierra).</li>
<li>Widgets: changed the white keys background picture depending on the key background color.</li>
<li>VPiano: new option to display inverted key colors.</li>
<li>File: WRK format markers processing. Closes ticket #37.</li>
</ul>
<p>Downloads: <a href="https://sourceforge.net/projects/drumstick/files/2.5.0/" target="_blank">https://sourceforge.net/projects/drumstick/files/2.5.0/</a></p>Pedrohttp://www.blogger.com/profile/06773011931515405946noreply@blogger.com0tag:blogger.com,1999:blog-6982925173228101953.post-90553959411421385942021-10-25T23:15:00.001+02:002021-10-25T23:15:58.163+02:00Autumn Releases <p>There is a new batch of releases: Drumstick Libraries, VMPK, and Drumstick Multiplatform MIDI File Player. Below is the change log for each one.</p>
<p>There is a common feature: USE_QT can be given in the cmake command to choose which Qt major version (5 or 6) to prefer. By default (if not set) it uses whatever is found. I've never needed something like that, because all my libraries are installed at $HOME/Qt/x.y.z which is the common practice when using the Qt online installer. In cmake you use CMAKE_PREFIX_PATH to provide the list of non standard prefixes where you have dependencies, and this solution is both simple and comfortable. But some Linux distros decided that it is a good idea to install system wide Qt5 and Qt6 versions together. In this case, the build system needs some help to decide which one to prefer. The projects build and run using Qt6, but I've not tested it too much and produce many warnings at build. The binary packages are using Qt 5.15 for now.</p>
<p>Another common point is the fix a crash on Linux when using the connections dialog, but the system does not have any MIDI available port. This was reported by the same 'Arch' user who needed the USE_QT option. It was also quite difficult to reproduce, partly because poor stack trace information was provided, and mainly because by default ALSA sequencer installations have at least one MIDI port, as they load by default the kernel module 'snd_seq_dummy', which provides the 'Midi Through' ports. The only way to reproduce the crash is to remove/blacklist the module 'snd_seq_dummy' and disconnect whatever MIDI device attached to the system. I can imagine the users who blacklisted 'snd_seq_dummy' and forgot about it, one day will be searching Internet for a MIDI Thru utility. Good luck!</p>
<h2 id="changes-in-drumstick-libraries-v2.4.1">Changes in Drumstick Libraries v2.4.1</h2>
<ul>
<li>New build option: USE_QT to choose among Qt major versions (5 or 6). Fixes ticket #36.</li>
<li>Fixed ticket #35: build with Qt 5.11 is possible again.</li>
<li>Vpiano: fix for a similar bug to vmpk ticket #74: crash in Linux.</li>
<li>Widgets: using buffer time in FluidSynth configuration dialog.</li>
<li>Fixed wrong licenses in several files.</li>
<li>Fixed defaults and ranges for the FluidSynth RT backend parameters, using the same values as the upstream library.</li>
<li>Fixed validation of parameters in the FluidSynth configuration dialog.</li>
<li>Widgets: Swedish translation updated. Thanks to Magnus Johansson.</li>
<li>Widgets: Czech translation updated. Thanks to Pavel Fric.</li>
</ul>
<h2 id="changes-in-virtual-midi-piano-keyboard-vmpk-v0.8.5">Changes in Virtual MIDI Piano Keyboard (VMPK) v0.8.5</h2>
<ul>
<li>New build option USE_QT with valid values 5 or 6, to choose which Qt major version to prefer. By default (if not set) it uses whatever is found.</li>
<li>Fixed ticket #74: crash under Linux using the MIDI Connections dialog if there are no suitable MIDI inputs/outputs available.</li>
<li>Fixed error checking of DwmGetWindowAttribute() call. This caused a problem in Windows 7 running the "Windows Classic" theme.</li>
<li>Swedish translation updated. Thanks to Magnus Johansson.</li>
<li>Czech translation updated. Thanks to Pavel Fric.</li>
</ul>
<h2 id="changes-in-drumstick-multiplatform-midi-file-player-v1.5.2">Changes in Drumstick Multiplatform MIDI File Player v1.5.2</h2>
<ul>
<li>New build option USE_QT to choose among Qt major versions (5 or 6). By default (if not set) it uses whatever is found.</li>
<li>Fix for crash in Linux when using the MIDI connections dialog, and there are not suitable MIDI ports available.</li>
<li>Czech translation updated. Thanks to Pavel Fric.</li>
</ul>
<h2 id="downloads">Downloads</h2>
<p><a href="https://sourceforge.net/projects/drumstick/files/2.4.1/">https://sourceforge.net/projects/drumstick/files/2.4.1/</a></p>
<p><a href="https://sourceforge.net/projects/vmpk/files/0.8.5/">https://sourceforge.net/projects/vmpk/files/0.8.5/</a></p>
<p><a href="https://sourceforge.net/projects/dmidiplayer/files/v1.5.2/">https://sourceforge.net/projects/dmidiplayer/files/v1.5.2/</a></p>
Pedrohttp://www.blogger.com/profile/06773011931515405946noreply@blogger.com0tag:blogger.com,1999:blog-6982925173228101953.post-48930620441377578022021-09-22T19:36:00.000+02:002021-09-22T19:36:38.710+02:00New Releases and the New Picture<p>A new batch of releases from the last weekend: Drumstick libraries 2.4.0, Drumstick Multiplatform MIDI File Player 1.5.1 and Drumstick MIDI Monitor 1.1.0 are out, and here are the main changes for each one:</p>
<p><b>Drumstick Libraries</b> v2.4.0:</p>
<ul class="incremental">
<li>implemented ticket #29: RIFF RMID file support. New utility dumprmi, and guiplayer updated.</li>
<li>implemented ticket #32: missing library version functions in File and RT libs</li>
<li>implemented ticket #33: versioninfo object for windows libraries</li>
<li>Enabled by default the internal reverb on macOS DLS Synth</li>
<li>Avoided hardcoded font family name in vpiano</li>
</ul>
<p><b>Drumstick Multiplatform MIDI File Player</b> v1.5.1:</p>
<ul class="incremental">
<li>Fixed GH ticket #6: The dependency target "update_helpfiles" of target "dmidiplayer" does not exist. The pandoc utility is optional again.</li>
<li>Fixed error checking of DwmGetWindowAttribute() call. This caused a problem in Windows 7 running the "Windows Classic" theme.</li>
<li>Support for RIFF MIDI files, provided by Drumstick 2.4.0</li>
<li>Czech manual updated, thanks to Pavel Fric</li>
</ul>
<p><b>Drumstick MIDI Monitor</b> v1.1.0</p>
<ul class="incremental">
<li>Removed warnings building with Qt >= 5.15</li>
<li>MIDI texts/lyrics encoding defaults to Latin1</li>
<li>New options: Qt Style, Dark mode, and internal icon theme based on breeze</li>
<li>CMake version >= 3.14</li>
<li>Added SCM Revision to the about box</li>
<li>Fixed file info dialog (initial tempo, ...)</li>
<li>Support for RIFF RMID (.rmi) file format</li>
</ul>
<p>A common point for all the above is the <a href="https://www.loc.gov/preservation/digital/formats/fdd/fdd000120.shtml">RIFF MIDI file format</a> support. Citing the LOC:</p>
<blockquote>
<p>It is a wrapper format for MIDI data, as first specified by Microsoft, and later extended by MIDI.org (an arm of the MIDI Manufacturers Association) to permit the bundling of both MIDI files and Downloadable Sounds (DLS) files. According to Multimedia Programming Interface and Data Specifications 1.0, August 1991.: "The 'RMID' format consists of a standard MIDI file enclosed in a RIFF chunk. Enclosing the MIDI file in a 'RIFF' chunk allows the file to be consistently identified; for example, an 'INFO' list can be included in the file."</p>
</blockquote>
<blockquote>
<p>The RIFF format specifications were published in 1991 in Microsoft Windows Multimedia Programmer's Reference, with a brief section devoted to RMID (8-31). The extended specification that documented how both MIDI and downloadable sounds could be bundled in an RMID file (technical note RP-029, "Bundling SMF and DLS data in an 'RMID' File"), was published by the MIDI Manusfacturers Association (MMA) in 2000. The co-authors represent IBM Research, Kurzweil, Microsoft, and Sonic Foundry. In 2001, MMA published the XMF_1_0 specification, which they now prefer to RMID.</p>
</blockquote>
<p>The implementation in <b>Drumstick::File</b> offers read-only functionality, and requires the existing SMF class to process the MIDI data portion. The DLS processing is missing, because I've been unable to find a single example of usage, and I suspect that nobody has used it in the real world. Anyway, there is a new utility 'drumstick-dumprmi', which is similar to the other commandline utilities printing the file contents as text in the terminal, with the extra functionality of extract/convert the MIDI data into a standalone SMF file.</p>
<p>Last month was published another utility: <b>wrk2mid</b> v1.0.0 which converts WRK Cakewalk files into SMF. This is something that can be done in Windows using the program Cakewalk by BandLab, which is gratis as a beer, but 'wrk2mid' can be compiled and run on Linux and macOS, so maybe it could be useful for someone. I don't expect to see it on Linux distributions any time soon, though. See: <a href="https://wrk2mid.sourceforge.io/" target="_blank">https://wrk2mid.sourceforge.io/</a></p>
<p>There was a <a href="https://midi-clorianos.blogspot.com/2014/11/drumstick-metronome-kmetronome-100-and.html">post from 2014</a> with a diagram of the relationship between the Drumstick libraries v1.0 and applications at the time. Now, all my applications depend on Drumstick v2.x and there are new ones too, so may be this is a good time to paint the new picture...</p>
<div class="figure">
<img src="https://drumstick.sourceforge.io/images/drumstick-ecosystem.png" alt="The new picture" />
<p class="caption">The new picture</p>
</div>
<p>It is a pending subject to renew the repertoire included in <b>dmidiplayer</b> as sample songs. Here is a future one, rendered on macOS (Mojave) using <b>dmidiplayer</b> v1.5.1 with <a href="https://github.com/FluidSynth/fluidsynth/releases/tag/v2.2.3">FluidSynth v2.2.3</a> and <a href="http://www.schristiancollins.com/generaluser.php">GeneralUser Soundfont</a>.</p>
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/WgwxFmAsicc" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>
</iframe>
<p>The song is "Negra Sombra" with lyrics by <a href="https://gl.wikipedia.org/wiki/Rosal%C3%ADa_de_Castro">Rosalia de Castro</a> (1837-1885), published in 1880 in her book "Follas Novas", and music by <a href="https://gl.wikipedia.org/wiki/Xo%C3%A1n_Montes">Xoan Montes</a> (1840-1899), a composer from my own birthplace (Lugo). The song was premiered in La Habana, Cuba, in 1892. You may recognize the melody if you like choral music, or because an arrangement by Carlos Nuñez and Luz Casal was included in the soundtrack of the Spanish drama film "The Sea Inside" (2004, Spanish: Mar adentro). This rendition is derived from a score and MIDI sequence by <a href="http://lalusfecit-partituras.blogspot.com/2013/04/negra-sombra.html">Lalus fecit edition 2013</a> licensed as <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC-by-nc-sa</a>.</p>
<p>Publishing this song at YouTube triggered the algorithm claiming it as a copyrighted work by Sony. I am not monetizing my videos at YouTube so it doesn't matter in practice, but it bothers me a lot so I'm disputing the claim. Google and Sony are taking a work that is in the public domain, and they are appropriating it. That may be seen as <a href="https://en.wikipedia.org/wiki/Criminal_conversion">criminal conversion</a>, or at least <a href="https://en.wikipedia.org/wiki/Cultural_appropriation">cultural appropriation</a>.</p>
Pedrohttp://www.blogger.com/profile/06773011931515405946noreply@blogger.com0tag:blogger.com,1999:blog-6982925173228101953.post-21609399594024935292021-05-15T14:37:00.001+02:002021-05-15T14:37:40.288+02:00Drumstick Multiplatform MIDI File Player, Released and Reloaded<p><a href="https://dmidiplayer.sourceforge.io/" target="_blank">Drumstick Multiplatform MIDI File Player 1.3.0</a> has been released this week, right after the <a href="https://drumstick.sourceforge.io/" target="_blank">Drumstick Libraries 2.2.0</a> and <a href="https://vmpk.sourceforge.io/" target="_blank">VMPK 0.8.3</a>; business as usual: we write programs, we release stuff. This post is about the first program, a MIDI file player (reloaded). Let's start by the beginning...<br /><br />10 years ago, there was not a fully featured MIDI file player for Linux. Of course, there was Linux software that could (barely) play MIDI files, but nothing comparable to the <a href="http://www.vanbasco.com/en/karaokeplayer/" target="_blank">vanBasco</a> MIDI Karaoke player (which is a Windows 32 bit application, updated the last time in 2006). This program can be run in Wine, by the way. The key features of the vanBasco player are described in its site, and anyone with a musical background can identify its value, beyond the entertainment use case:<br /></p><ul style="text-align: left;"><li>lyrics can be displayed in a resizable window or full-screen</li><li>control window: ability to change tempo, volume, key of song</li><li>real-time MIDI output window: shows notes, volumes, and instruments, can mute or play solo individual instruments</li><li>piano view: displays notes on a big piano keyboard</li></ul><p>The <a href="https://en.wikipedia.org/wiki/KDE_Software_Compilation_4" target="_blank">KDE 4 desktop</a> was starting to become mature and stable at the time, so I've decided to scratch my itch rewriting the old and abandoned KMid application, adding my favorite features from vanBasco. This was already told <a href="http://midi-clorianos.blogspot.com/search/label/KMid2" target="_blank">on this blog</a> a few times. KMid2 was a total rewrite almost from scratch, with the additional goal to make it multiplatform. Indeed, it was possible to build and run it on Linux, macOS and Windows, but there wasn't an easy way to deploy KDE programs on macOS and Windows at the time, so the only viable target was Linux. On the other hand, because the chosen architecture, it was difficult to maintain and port the program to other platforms. Then, several Linux distributions <a href="https://repology.org/projects/?search=kmid" target="_blank">boycotted</a> this application, with the total indifference of the KDE community. Good riddance.<br /><br />Fast forward to the roaring twenties. Nothing changed for Linux. The vanBasco player is still the king in the Windows world. In spite of most Windows 10 users running a 64 bit Operating System, vanBasco is rotting its 32 bits. The only alternative fulfilling the four mentioned features is <a href="http://falcosoft.hu/softwares.html" target="_blank">Falcosoft MIDI player</a>. I don't know about native macOS alternatives, either. Of course there are <a href="https://github.com/benwiggy/APPlayMIDI" target="_blank">players for macOS</a>, and WinAmp for Windows, and even VLC plays MIDI files, but that is not what I'm talking about...<br /><br />I prefer to avoid hard use cases. Someone asked me once about my VMPK program: how it would be classified? Is it a Game? No, it is not a game, it is a toy! A game has a set of rules that the player must follow to reach the final goal: to win the game. On the other hand, a toy has no written rules. The player can explore, learn, and have fun on its own. No winners, no losers. Sometimes a good game may be repurposed by the users, like <a href="https://en.wikipedia.org/wiki/Wolfenstein_3D" target="_blank">Wolfenstein 3D</a>, but it is uncommon. It is in the <a href="https://www.gnu.org/philosophy/free-sw.en.html" target="_blank">definition of free software</a>: the freedom to run the program as you wish, for any purpose.<br /><br />Anyway, here is an usage example for this program: there is a choir, with a conductor or composer that arranges or edits pieces using some MIDI software like <a href="https://www.rosegardenmusic.com/" target="_blank">Rosegarden</a>, <a href="https://musescore.org" target="_blank">MuseScore</a>, <a href="https://frescobaldi.org" target="_blank">Frescobaldi</a>, or similar. He prints the scores (or exports PDF files for electronic distribution) for the singers. He also exports the pieces as MIDI files, that can be loaded by dmidiplayer, and used by the singers to learn and practice the lyrics and music of each voice. The examples in dmidiplayer include some choral music, edited in Rosegarden and directly exported as MIDI files.<br /><br />You can download this program for free, either as sources that you may study, modify and build, or an AppImage for any Linux distro, or as ready to install packages for Windows, and macOS, from <a href="https://sourceforge.net/projects/dmidiplayer/files/v1.3.0/" target="_blank">Sourceforge</a> and <a href="https://github.com/pedrolcl/dmidiplayer/releases" target="_blank">GitHub</a>.<br /><br />There is also a <a href="https://flathub.org/apps/details/net.sourceforge.dmidiplayer" target="_blank">Flatpak available at Flathub</a>. And thanks to <a href="http://www.deb-multimedia.org" target="_blank">deb-multimedia</a>, there are also deb packages for Debian and Ubuntu users.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://dmidiplayer.sourceforge.io/screenshot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="450" data-original-width="800" height="360" src="https://dmidiplayer.sourceforge.io/screenshot.png" width="640" /></a></div>Pedrohttp://www.blogger.com/profile/06773011931515405946noreply@blogger.com5tag:blogger.com,1999:blog-6982925173228101953.post-75563676109007017162021-01-15T21:57:00.000+01:002021-01-15T21:57:01.690+01:00Drumstick 2.0 and related releases<p><a href="https://sourceforge.net/projects/drumstick/files/2.0.0/" target="_blank">Drumstick 2.0.0</a> has been released. There are four libraries now:<br /></p><ul style="text-align: left;"><li>drumstick::ALSA (Linux only)</li><li>drumstick::RT</li><li>drumstick::File</li><li>drumstick::Widgets</li></ul><p style="text-align: left;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7xld_uN-tJN8mloZZqPVg_Ux7F7kXqi3oUr57aZyvfQQt63l7VYAYMQwovNkUQKkxKWoH9P5Ihq-PQWX9RmH-auTpxUlUYtICp5ZPuzaWpoKrERWylSINcUUjW0eacMX0U7aMN9lcYJY/s815/drumstick-unittests.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Unit tests" border="0" data-original-height="439" data-original-width="815" height="345" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7xld_uN-tJN8mloZZqPVg_Ux7F7kXqi3oUr57aZyvfQQt63l7VYAYMQwovNkUQKkxKWoH9P5Ihq-PQWX9RmH-auTpxUlUYtICp5ZPuzaWpoKrERWylSINcUUjW0eacMX0U7aMN9lcYJY/w640-h345/drumstick-unittests.png" title="Unit tests" width="640" /></a></div>New features include:<br /><p></p><ul style="text-align: left;"><li>Namespaces reorganization</li><li>Code and build systems modernization</li><li>New library: Drumstick::Widgets providing a PianoKeybd widget plugin for Qt Creator and Qt Designer</li><li>New unit tests for Drumstick::Widgets and Drumstick::File</li><li>Removed OVE support from Drumstick::File</li><li>Translations for Drumstick::Widgets and utils</li><li>Documentation of the new API for Drumstick::Widgets</li><li>Drumstick::RT plugins versioning, allowing runtime coexistence between plugins of drumstick-1 and drumstick-2</li><li>License GPLv3 for all components <br /></li></ul><div><p style="text-align: left;">The new library Drumstick::Widgets includes the virtual piano widget used by VMPK and drumstick-vpiano, and also several configuration dialogs related to some Drumstick::RT plugins. The new features are showcased by the drumstick-vpiano application (and also VMPK, of course).</p><p style="text-align: left;"></p><p style="text-align: left;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyawOotK9BoL7oSSB-gVGfBexUP1MdbgZsGIZAzxRGNl_oyudq3D9BmrevFpJuvEYpT-xqaIgtupxZkxhJVC0crzo53eL8Yb5-ylmI5NMnA07ozyBUx3BvonIYulw-rDh4e6AAo_Is4qk/s1766/drumstick-vpiano.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Drumstick Virtual Piano" border="0" data-original-height="333" data-original-width="1766" height="121" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyawOotK9BoL7oSSB-gVGfBexUP1MdbgZsGIZAzxRGNl_oyudq3D9BmrevFpJuvEYpT-xqaIgtupxZkxhJVC0crzo53eL8Yb5-ylmI5NMnA07ozyBUx3BvonIYulw-rDh4e6AAo_Is4qk/w640-h121/drumstick-vpiano.jpeg" title="Drumstick Virtual Piano" width="640" /></a></div><br /><br />The piano widget has been improved with some new features, like providing a new signal carrying the played MIDI note name and number, new customizable palettes for the keys background and foreground (font) colors, configurable fonts, and many options for showing note names:<br /><p></p><ul style="text-align: left;"><li>Show note names: Never / Minimal / When activated / Always</li><li>Black keys names: Sharps / Flats / Nothing</li><li>Names orientation: Horizontal / Vertical / Automatic</li><li>Note names: Standard / Custom</li><li>Octave names (MIDI note 60): C / C3 / C4 / C5</li></ul><p style="text-align: left;">There is also a new plugin for QtCreator and QtDesigner with the name 'libdrumstick-vpiano-plugin.so' which is equivalent to the old Qt4 'vpiano' plugin. It provides design-time support for creating Qt applications leveraging the virtual piano component. Needs to be compiled with the exact same version of the associated Qt5 development tools.</p><p style="text-align: left;"><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimvv38plB8EnZDyNM25fftVH6tEpwhyphenhyphenhxo4Wlic0LpA2s6sLvEWs_j8GPzi2npyUOnaHOatwIWqrcXaXbXqgDjM_vPgb3TaFWI5vqwZAG5yvoDuH76myR2Lxf9qJ8oY9YDPxVmLjSLXio/s1340/drumstick-widgets-pianokeybd.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="QtCreator plugin" border="0" data-original-height="553" data-original-width="1340" height="264" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimvv38plB8EnZDyNM25fftVH6tEpwhyphenhyphenhxo4Wlic0LpA2s6sLvEWs_j8GPzi2npyUOnaHOatwIWqrcXaXbXqgDjM_vPgb3TaFWI5vqwZAG5yvoDuH76myR2Lxf9qJ8oY9YDPxVmLjSLXio/w640-h264/drumstick-widgets-pianokeybd.png" title="QtCreator plugin" width="640" /></a></p><p style="text-align: left;">Following the new Drumstick release, several programs have been released too:<br /><a href="https://sourceforge.net/projects/vmpk/files/vmpk/0.8.0/" target="_blank"><br />VMPK 0.8.0</a><br /> Depends on drumstick::RT and drumstick::Widgets (also drumstick::ALSA in Linux)<br /><a href="https://sourceforge.net/projects/kmetronome/files/kmetronome/1.2.0/" target="_blank">Drumstick Metronome 1.2.0</a> (a.k.a. kmetronome, Linux only)<br /> Depends on drumstick::ALSA<br /><a href="https://sourceforge.net/projects/kmidimon/files/1.0.0/" target="_blank">Drumstick MIDI Monitor 1.0.0</a> (a.k.a. kmidimon, Linux only)<br /> Depends on drumstick::ALSA and drumstick::File<br />All of the above are hosted in SourceForge. AppImages for Linux x64 are available.<br /><a href="https://github.com/pedrolcl/Linux-SonivoxEas" target="_blank"><br />SonivoxEas 1.3.0 </a><br /> Depends on drumstick::ALSA (Linux only)<br />This one is hosted in GitHub, and was <a href="http://midi-clorianos.blogspot.com/2016/04/taking-back-from-android.html" target="_blank">presented in this blog</a> before.<br /><br />Finally a note about VMPK For Android. This app has been removed by Google from the Play Store, with some bureaucratic excuses. It never depended on Drumstick. I need to think about releasing it again, but never returning to the Play Store. I hate app stores.<br /><br /></p></div>Pedrohttp://www.blogger.com/profile/06773011931515405946noreply@blogger.com0tag:blogger.com,1999:blog-6982925173228101953.post-4717450878914470912020-07-30T20:19:00.000+02:002020-07-30T20:19:28.313+02:00VMPK: MIDI by NetworkThis is only a quick and dirty article to link to the <a href="https://sourceforge.net/p/vmpk/wiki/MIDI%20by%20Network/">MIDI by Network</a> page in the <a href="https://sourceforge.net/p/vmpk/wiki/Home/">VMPK Wiki</a>. It explains the basic concepts about <b>ipMIDI</b> and how to use it with VMPK.<br />
<br />
The Wiki has also pages about the VMPK developing environment using <a href="https://sourceforge.net/p/vmpk/wiki/develop/">Qt Creator</a> and <a href="https://sourceforge.net/p/vmpk/wiki/develop-cmake/">CMake</a>.Pedrohttp://www.blogger.com/profile/06773011931515405946noreply@blogger.com0tag:blogger.com,1999:blog-6982925173228101953.post-81753874623073717542018-04-21T14:27:00.000+02:002018-04-21T14:44:31.992+02:00VMPK 0.7.0 released<br />
<div style="margin-bottom: 0in;">
</div>
<div style="margin-bottom: 0in;">
It has been a while! First of all:
thank you very much for the million downloads of VMPK! It happened in
2016, but I wasn't paying attention at the time. I didn't post any
article around that event, neither <a href="https://sourceforge.net/projects/vmpk/files/vmpk/0.7.0/" target="_blank">released a new VMPK version</a> since
that year, so let's cover both things.</div>
<div style="margin-bottom: 0in;">
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYUxnHaEWOxfqs-FwtUys9HFB5zZuy_Vqw6BZHSbspX1lrpHmKDNsr5xP-pHORmNMhC3uS6Q1glgDd4cJgoDQTA5IXMZ_dZ106uQWKVyz1kmp6335uGeWTYaDlruyarTcGxYweoZwYaXc/s1600/vmpk_million_downloads.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="780" data-original-width="1155" height="432" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYUxnHaEWOxfqs-FwtUys9HFB5zZuy_Vqw6BZHSbspX1lrpHmKDNsr5xP-pHORmNMhC3uS6Q1glgDd4cJgoDQTA5IXMZ_dZ106uQWKVyz1kmp6335uGeWTYaDlruyarTcGxYweoZwYaXc/s640/vmpk_million_downloads.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><a href="https://sourceforge.net/projects/vmpk/files/vmpk/stats/os?dates=2008-08-09%20to%202018-04-21" target="_blank">Download statistics</a> </td></tr>
</tbody></table>
<br />
<div style="margin-bottom: 0in;">
</div>
<div style="margin-bottom: 0in;">
Born in 2008, this project is
multiplatform from the beginning, with the goal of emulating a MIDI
controller device on software; which means: producing (and consuming)
MIDI events. The producing part requires another source of human
triggered events: computer keyboard, mouse and touch screen events
are supported and available on the three main target operating
systems. But producing MIDI events without delivering them to a MIDI
Synthesizer makes the program useless, with no sound output at all. This has been the experience of most new VMPK
Linux users for years. Windows users have a software synth included
in the operating system, installed and ready to use, so they may
produce sound as soon as they install VMPK from scratch. But Mac and
Linux users need to find and install first a suitable synthesizer.
Mac OSX also includes a soft synth library, but it is not a
ready-to-use service and needs to be activated by a third party
software. It's not very hard to find and install, because Apple has
always made MIDI users a niche for their products. Good for them.
</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
I've been approached last year
by Microsoft people to package and publish VMPK into their Windows
Store for Windows 10. Probably the million downloads has something to
do with it. I've tried the packaging part without technical problems
thanks to the support of the MS Desktop Bridge team, but the store
conditions were awful, arbitrary and unfair, so I am not willing to
comply with them. This means that VMPK will be available only outside
the Windows Store and there won't be an UWP or Windows Phone version
either in the future. I don't want to speak about the Apple's App
Store. To the hell with them as well.</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
Linux users have been often made
hostages of their distributions and packagers. In theory, the package
repositories of each distribution (equivalent to an app store) are
made for easy discovery and install of all the software available for
Linux, but this is not true in practice. Software integration from
different unrelated sources is also the job of the Linux
distributions, which they miserably fail as well. I mean that when
saying hostages, because the packagers sometimes act as if they want
to force their users to follow their own personal preferences, like
the gurus of a sect: Jack is the chosen one!!! PulseAudio is evil!!!</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
More about that later. Let's listen an
enlightening Linus Torvalds first:</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/5PmHRSeA2c8/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/5PmHRSeA2c8?feature=player_embedded&start=340" width="320"></iframe></div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
OK Linus. I've <a href="https://sourceforge.net/projects/vmpk/files/vmpk/0.7.0/" target="_blank">released this time</a> an
AppImage package for 64-bit Linux. OTOH, I'm still using Subversion
and not planning to migrate the source repository to Git anytime
soon.</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
What I think it would be a good
VMPK distribution? Well, first of all, the latest version should be
available for install, optionally with some former versions available
to choose if the users needs to compare something (like a bug
resolved or introduced in the latest version). Second: main functions
should be immediately available: the user must be able to simply get
sound at once. For Linux, ALSA sequencer inputs and outputs must also
be available without any other extra configuration. About network
I/O: the Mac OSX and Windows operating systems automatically activate firewalls blocking this function but, as soon as VMPK
starts the first time, the OS asks the user for permission to open
the firewall for this software. Linux distributions that include an
active firewall should listen and learn something here.</div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
The latest VMPK release includes
lightweight soft synths for Linux and Mac OSX, which were available
as a Drumstick-RT library back-ends for some time. The Linux soft
synth is Sonivox EAS, borrowed from Android OSP and ported to Linux +
PulseAudio, which was already mentioned <a href="http://midi-clorianos.blogspot.com/2016/04/taking-back-from-android.html" target="_blank">in another post</a>. </div>
<div style="margin-bottom: 0in;">
<br /></div>
<div style="margin-bottom: 0in;">
It is the default output chosen by VMPK
upon install, so you need to use PulseAudio if you want to try VMPK.
Why the PulseAudio choice? Because it is the default Linux sound
server in most distributions: Ubuntu, Fedora (Red Hat), OpenSUSE,
etc. I know that there has been a lot of criticism among the Linux
audio community about PA, but honestly: I can't care less about
arguments that sound like fanaticism. Someone told me that: “many
people in linux-audio avoid PA like the plague.” Well, I'm sure
you know that many computer users avoid Linux like a plague, but I
don't let a handful of haters to influence my decision of keeping
VMPK available for Linux users. And at the end of the day, this is my
personal project and I am who decide the road-map. This is also free
software. If you don't like something or have good ideas to get it
better, you may contribute with code or make your own fork.</div>
<div style="margin-bottom: 0in;">
<br /></div>
<style type="text/css">P { margin-bottom: 0.08in; }A:link { }</style>Pedrohttp://www.blogger.com/profile/06773011931515405946noreply@blogger.com4tag:blogger.com,1999:blog-6982925173228101953.post-24527492428678384612016-04-03T16:59:00.002+02:002016-04-03T16:59:35.399+02:00Taking Back From Android<br />
<br />
Android is an operating system developed by Google around the Linux kernel. It is not like any other Linux distribution, because not only many common subsystems have been replaced by other components, but also the user interface is radically different based on Java language running into a virtual machine called Dalvik.<br />
<br />
An example of subsystem removed from the Linux kernel is the ALSA Sequencer, which is a key piece for MIDI input/output with routing and scheduling that makes Linux comparable in capabilities to Mac OSX for musical applications (for musicians, not whistlers) and years ahead of Microsoft Windows in terms of infrastructure. Android did not offer anything comparable until Android 6 (Marshmallow).<br />
<br />
Another subsystem from userspace Linux not included in Android is PulseAudio. Instead, OpenSL ES that can be found on Android for digital audio output and input.<br />
<br />
But Android also has some shining components. One of them is Sonivox EAS (originally created by Sonic Network, Inc.) released under the Apache 2 license, and the MIDI Synthesizer used by my <a href="https://play.google.com/store/apps/details?id=net.sourceforge.vmpk" target="_blank">VMPK for Android</a> application to produce noise. Funnily enough, it provided some legal fuel to Oracle in its battle against Google, because of some Java binding sources that were included in the AOSP repositories. It is not particularly outstanding in terms of audio quality, but has the ability of providing real time wavetable GM synthesis without using external soundfont files, and consumes very little resources so it may be indicated for Linux projects on small embedded devices. Let's take it to Linux, then!<br />
<br />
So the plan is: for the next Drumstick release, there will be a Drumstick-RT backend using Sonivox EAS. The audio output part is yet undecided, but for Linux will probably be PulseAudio. In the same spirit, for Mac OSX there will be a backend leveraging the internal Apple DLS synth. These backends will be available in addition to the current FluidSynth one, which provides very good quality, but uses expensive floating point DSP calculations and requires external soundfont files.<br />
<br />
Meanwhile, I've published on GitHub this repository including a port of Sonivox EAS for Linux with ALSA Sequencer MIDI input and PulseAudio output. It also depends on Qt5 and Drumstick. Enjoy!<br />
<b><br /></b>
<b>Sonivox EAS for Linux and Qt</b>:<br />
<a href="https://github.com/pedrolcl/Linux-SonivoxEas">https://github.com/pedrolcl/Linux-SonivoxEas</a><br />
<b><br /></b>
<b>Related Android project</b>:<br />
<a href="https://github.com/pedrolcl/android/tree/master/NativeGMSynth">https://github.com/pedrolcl/android/tree/master/NativeGMSynth</a>Pedrohttp://www.blogger.com/profile/06773011931515405946noreply@blogger.com0tag:blogger.com,1999:blog-6982925173228101953.post-3672495463434375782014-11-02T13:36:00.000+01:002014-11-02T13:36:24.295+01:00Drumstick Metronome (kmetronome 1.0.0) and Drumstick 1.0.0 Libraries in the Whole PictureI've released in the past weeks some things labeled "Drumstick" and also labeled "1.0.0". What is all this about?<br />
<br />
Drumstick is the name of a set of Qt based libraries for MIDI processing. Current major version of the Qt Frameworks is 5, which are binary incompatible with the older Qt4 libraries. Latest Qt4 based drumstick release was 0.5.0 published in 2010. Newest Qt5 based release is 1.0.0, published on August 30 2014.<br />
<br />
Drumstick 1.0.0 is not binary compatible with the older one, nor even fully source compatible. In addition, it contains a new "drumstick-rt" library which is a cross-platform MIDI input-output abstraction. Based on Drumstick 1.0.0 I've released two more applications: vmpk 0.6.0 and kmetronome 1.0.0 (now renamed as "Drumstick Metronome").<br />
<br />
There are other applications based on the old drumstick 0.5.0 libraries out there: kmid2 and kmidimon. I'm no longer the kmid2 maintainer, but I will release (time permitting) a "Drumstick Karaoke" application replacing kmid2, and of course also a new kmidimon (naming it as Drumstick-Whatever). Meanwhile, Linux distributions may have a problem here shipping the old and new programs together. Not a big problem, though, because the runtime libraries are intended to co-exist together on the same system. The runtime dependencies are:<br />
<ul>
<li><span style="font-family: "Courier New",Courier,monospace;">vmpk-0.6.0 and kmetronome-1.0.0 depend on drumstick-1.0.0</span></li>
<li><span style="font-family: "Courier New",Courier,monospace;">kmidimon-0.7.5 and kmid2-2.4.0 depend on drumstick-0.5.0</span></li>
</ul>
If you want to distribute all kmidimon, kmid2, vmpk and kmetronome latest releases for the same system, you need to distribute also two sets of drumstick runtime libraries. This is possible because the old and new drumstick libraries have a different SONAME. What is needed is to also rename the packages accordingly. <br />
<br />
<span style="font-family: "Courier New",Courier,monospace; font-size: small;">$ objdump -p /usr/lib64/libdrumstick-alsa.so.0.5.0 | grep SONAME<br /> SONAME libdrumstick-alsa.so.0<br /><br />$ objdump -p /usr/local/lib64/libdrumstick-alsa.so.1.0.0 | grep SONAME<br /> SONAME libdrumstick-alsa.so.1 </span><br />
<br />
For instance, you may name your old drumstick package as "drumstick0" and the new one "drumstick1", or append the Qt name like in "drumstick-qt4" and "drumstick-qt5", or keep the old one as plain "drumstick" and rename only the new one. Whatever makes you happier. These suggestions are for people packaging drumstick for Linux distributions. If you are compiling drumstick yourself and installing from sources, then you don't need to worry. You can use the same prefix (usually /usr/local/) without conflicts, except only one set of headers (usually the latest) can be available at the same time in your system. This also applies to the "-devel" packages from distributions.<br />
<br />
There is only one thing left now. The whole picture :-)<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOVzRR3AX7e7xRfN9LEFOj8PERSYmp2XzNiMTvkNrfXmWPjF17VHyV0o8wuaSVo1bkrDgNNVTRpXoKqBtdQUZQ3q467NeoTNKnAHkdZ4TVaQ6GE5ayU49WdFtJBmKkZxKYxCJDywyN0Jo/s1600/Drumstick1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOVzRR3AX7e7xRfN9LEFOj8PERSYmp2XzNiMTvkNrfXmWPjF17VHyV0o8wuaSVo1bkrDgNNVTRpXoKqBtdQUZQ3q467NeoTNKnAHkdZ4TVaQ6GE5ayU49WdFtJBmKkZxKYxCJDywyN0Jo/s1600/Drumstick1.png" height="396" width="640" /></a></div>
Pedrohttp://www.blogger.com/profile/06773011931515405946noreply@blogger.com0tag:blogger.com,1999:blog-6982925173228101953.post-92053872712526118472014-09-14T23:36:00.002+02:002014-09-14T23:36:51.029+02:00Notes about VMPK 0.6.0 for Desktops<div dir="ltr" id="docs-internal-guid-942aefc9-760a-49ad-c325-ba46226c9886" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">Dear Blog, </span></div>
<br /><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">It has been a long time, but a week later after the release it is time to discuss some aspects of the latest version of our Virtual MIDI Piano Keyboard for desktop computers.</span></div>
<br /><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">Where to start? an interesting point is the change of architecture with the replacement of RtMIDI by Drumstick-RT. This library is new and homegrown, part of the <a href="http://drumstick.sf.net/" target="_blank">Drumstick</a> family which includes Drumstick-File and Drumstick-ALSA as well. The motivation to create it was the difficulty of extending RtMIDI with other drivers different to the ones chosen by his author. This was not a problem in the past, because the RtMIDI sources were always included in the application, and any customization was possible and easy. Now, thanks to the Taliban of Linux distributions forcing the dynamic linking of RtMIDI this is simply not feasible - to the hell with the freedom of Free Software!. Throwing away the ipMIDI backend was not an option. On the other hand, with Drumstick RT is not only possible, but new backends can be compiled separately and installed in the system without recompiling neither VMPK nor Drumstick, because they are in fact plugins. By chance it also has fixed the bug reported (</span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">in 2009!) </span>in ticket #15: LinuxSampler did not appear among </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">ALSA</span> connections, because LinuxSampler MIDI port has no flag providing proper characterization and RtMIDI (unlike Drumstick RT) filters out that port.</span></div>
<br /><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">The replacement of the RtMIDI library with Drumstick-RT was a long time plan, not only for VMPK, but for Drumstick as well, that finally took place now. I hope that this shall be a foundation for features like recording/playback in the future. The only thing that maybe would be missing for some users is the jack-midi interface, but on the other hand Unix users will enjoy native OSS support, and also FluidSynth direct output on all operating systems, meaning also configurable SoundFonts: a very demanded feature for Windows users.</span></div>
<br /><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">Another long time request finally implemented is the ability of displaying any number of keys, for instance 88 keys, instead of full octaves, starting with any arbitrary white note (ticket #39), like configuring 25 or 49 keys (depending on which device, laptop or tablet, and screen size you have). Congratulations to all the requesters and sorry for keeping you waiting for this feature so long.</span></div>
<br /><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">Finally, the migration to Qt5 has happened. This means also replacing a dependency from Xlib to XCB, that hopefully will bring future support for wayland/whatever. The victim has been the keyboard grabbing feature, that was only working on Linux thanks to a now lost X11/Qt4 feature. I hope to bring it back in the future with a multiplatform implementation.</span></div>
<br /><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">There are now binary packages for 32/64 bit Linux users that shall work on any modern distribution, in the form of installers packaged using the excellent <a href="http://installbuilder.bitrock.com/" target="_blank">BitRock InstallBuilder</a>. That means including all the required dependencies inside the package, in the same way the libraries are included in the Windows and Mac OS X setup packages. In order to reduce the package weight, superfluous things like Jack support were excluded, because the new FluidSynth backend is intended to provide instant audio out of the box without requiring the users to search, find, ask, learn, install, try and tweak. Something that traditional Linux distributions have failed to do, in despite of their duty of integration and making the life easier to their users. I am pretty sure that many Linux distros will fail to provide VMPK native packages for this release like they did for the 0.5.x series (see Debian, Ubuntu and Fedora repositories for instance). Prove me wrong, and this kind of binary Linux packages would be deprecated.</span></div>
Pedrohttp://www.blogger.com/profile/06773011931515405946noreply@blogger.com0tag:blogger.com,1999:blog-6982925173228101953.post-57396150144024394072013-12-27T11:53:00.002+01:002013-12-27T11:56:22.139+01:00VMPK for AndroidHi, Blog!<br />
<br />
A lot of time since the last post. Let me announce a new port of <a href="http://vmpk.sourceforge.net/" target="_blank">VMPK</a>, for Android (4.x) devices. It is available in Google Play.<br />
<br />
<div style="text-align: center;">
<a href="https://play.google.com/store/apps/details?id=net.sourceforge.vmpk">
<span id="goog_936994206"></span><img alt="Android app on Google Play" src="https://developer.android.com/images/brand/en_app_rgb_wo_60.png" title="" /><span id="goog_936994207"></span></a></div>
<br />
There are two apps, a paid version (0.5€) and a free one (gratis) with a small advertisement. It is not based on Qt, and it is not open source. It is a Java port rewritten
from scratch using the native Android MIDI synthesizer and native
Android themes. But on the other hand, is quite similar to the old N9
port, as you can see in the following screenshots, but with several additional features.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_QCTUSTmk9gJYDvBnseGxkgEEV81XxiH83SNBdbLGGT3ZIYPTbJNRr2qNvv02tN2JkcQS3nwbGnm4SISOjQgHm73qbAatQ5sw6vls6J2dmMBdH7KuotIFNjKd6rC_pqLdGqxZfrYi_HE/s1600/NEXUS_ONE.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_QCTUSTmk9gJYDvBnseGxkgEEV81XxiH83SNBdbLGGT3ZIYPTbJNRr2qNvv02tN2JkcQS3nwbGnm4SISOjQgHm73qbAatQ5sw6vls6J2dmMBdH7KuotIFNjKd6rC_pqLdGqxZfrYi_HE/s1600/NEXUS_ONE.png" height="192" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXytDbAPBe_S8WPo5CtlhK0d7BahWyGZ6e8DkXiqmb0ymn-PBws2Jj1hvUoEYU-jbaCIqX34xzJtUGydbVxMzbGq32fSr_ngSf5-eu2sY9sd3p52ohbOxTZVwCpxqMuojABf1kYoTfpB4/s1600/device-2013-12-25-130956.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXytDbAPBe_S8WPo5CtlhK0d7BahWyGZ6e8DkXiqmb0ymn-PBws2Jj1hvUoEYU-jbaCIqX34xzJtUGydbVxMzbGq32fSr_ngSf5-eu2sY9sd3p52ohbOxTZVwCpxqMuojABf1kYoTfpB4/s1600/device-2013-12-25-130956.png" height="200" width="320" /></a></div>
<br />
Being mostly a Java app, it includes some C code. The internal MIDI synthesizer is Android's "<a href="https://android.googlesource.com/platform/external/sonivox/" target="_blank">Sonivox EAS</a>", which is part of AOS. The library is included in all recent Android versions, but it is not a public API, so I've compiled the library with a customized configuration and different features resulting a smaller binary and included it in the APK along with some other native code, mainly <a href="https://github.com/nettoyeurny/opensl_stream" target="_blank">opensl_stream</a> by Peter Brinkmann for interfacing the synth with Android's <a href="http://www.khronos.org/opensles/" target="_blank">OpenSL ES</a> audio output. An interesting aspect of the synth is the embedded GM soundfont using very small amount of memory, and not needing external data files. <br />
<br />
Some features are: ipMIDI compatibility (MIDI OUT only) using UDP multicast and Wireless network. Accelerometer driven sliders for velocity, controllers and bender (like the N9 port), configurable number of keys and initial key, among other goodies.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijBbZDQSmji4bev27ldHtqr5VqXFBJTS1JRvhv-WSpkP_Njls4t99TcOd_vCoI9SpAoXx-ndWDc5Kn4D11ctuQ6jRmO7uSbgV_GT6n4OG3_ygKGer0LZENTOhnDgdanf-4dSeC4M-KUP8/s1600/device-2013-12-25-131044.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijBbZDQSmji4bev27ldHtqr5VqXFBJTS1JRvhv-WSpkP_Njls4t99TcOd_vCoI9SpAoXx-ndWDc5Kn4D11ctuQ6jRmO7uSbgV_GT6n4OG3_ygKGer0LZENTOhnDgdanf-4dSeC4M-KUP8/s1600/device-2013-12-25-131044.png" height="320" width="200" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPj4Is9Dl7MR4dL8Pcnh2vVsjfkaM2m-APMEjvPXXhkG5Frw1OIW4ST7VS7AvxehKjzLij0TbHKsQfG5NGWIV9UBG4fmZvMUYqV3QWoyJliYLcGa3XUOChbDII7-4XNtgvOCj04uRmOvw/s1600/device-2013-12-25-131013.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPj4Is9Dl7MR4dL8Pcnh2vVsjfkaM2m-APMEjvPXXhkG5Frw1OIW4ST7VS7AvxehKjzLij0TbHKsQfG5NGWIV9UBG4fmZvMUYqV3QWoyJliYLcGa3XUOChbDII7-4XNtgvOCj04uRmOvw/s1600/device-2013-12-25-131013.png" height="320" width="200" /></a></div>
<br />
Happy holidays!<br />
<br />Pedrohttp://www.blogger.com/profile/06773011931515405946noreply@blogger.com0tag:blogger.com,1999:blog-6982925173228101953.post-45279544510395114702012-01-07T19:41:00.002+01:002012-01-07T19:41:49.580+01:00Choosing MIDI or Digital Audio by AnalogyWhenever I talk to someone about the relationship between <a href="http://en.wikipedia.org/wiki/MIDI">MIDI</a> and <a href="http://en.wikipedia.org/wiki/Digital_audio">digital audio</a>, one of my favorite analogies is that of computer images.<br /><br />A digital <a href="http://en.wikipedia.org/wiki/Raster_image">raster image</a> like a JPG file contains a bitmap. It is equivalent to an MP3 file containing digital audio. Both JPG and MP3 files contain quality loss compressed data, although other formats such as BMP and WAV files can contain pictures and digital sound without compression, respectively. In both cases the files store a set of digitized values. In the case of images, the data are individual pixels or dots that represent colors of the cells in a matrix of rows and columns that divide the digitized image. In the case of sound, individual data are samples that represent moments of time which divides the digitized sound. The digitization consists in dividing alike the image or sound into small fragments, the number of which depends on the resolution we want to get and the size of the scanned original.<br /><br />Another type of images is called <a href="http://en.wikipedia.org/wiki/Vector_graphics">vector graphics</a>. They are not suitable to represent photographs, but drawings. SVG files that are used in many illustrations of <a href="http://en.wikipedia.org/wiki/Wikipedia:Graphic_Lab">Wikipedia</a> are of this type. Instead of image fragments, they contain symbolic descriptions using coordinates of points, distances, lines, and colors... They have the advantage of scalability without loss of quality, and ease of arbitrary modification of some of its components and properties without affecting the rest. The equivalent of this technology in the world of sound is MIDI. A MIDI sequence contains timestamped messages such as notes, instrument changes, controls, etc.. Not a proper format for storing sounds recorded by a microphone, but a symbolic representation of music similar to a score.<br /><br />Images are two dimensional objects, so the digitized images consist of rows and columns of elements (pixels), and the position of the elements of a drawing is characterized by a pair of numbers that represent its Cartesian coordinates. On the other hand sound recordings are one-dimensional, sound samples are taken at constant time intervals and also MIDI messages are labeled by their position in the time line.<br /><br />The above similarities have implications that reflect additional parallelism. An uncompressed digitized image consisting of any single solid color takes the same amount of memory than an image of the same size representing a photograph or a complex composition of multiple colors. Similarly, a recording of silence (for example <a href="http://en.wikipedia.org/wiki/4%E2%80%B233%E2%80%B3">John Cage's 4'33''</a>) takes the same amount of memory than any symphonic piece of the same duration. On the other hand, a simple vector image takes much less memory than a complex picture of the same dimensions. And a few notes MIDI sequence occupies much less memory than a complex sequence of the same duration made up of many notes or other messages.<br /><br />The problems posed by digital images and sounds on stretch and reduction of dimensions are also similar. In both cases artifacts are generated, an effect known as '<a href="http://en.wikipedia.org/wiki/Aliasing">aliasing</a>', which can be offset to some extent by using 'antialiasing' filters. On the other hand, in the case of vector graphics as MIDI sequences, you can easily perform stretching and shrinking of dimensions and duration without risking artifacts or quality loss whatsoever.<br /><br />Starting from a vector image, it is necessary a rendering engine to get a digital image that can be displayed on the screen or a printer. In the case of MIDI, a sequencer and a MIDI synthesizer are required to produce digital audio that can be used by an audio interface.<br /><br />The programs <a href="http://inkscape.org/">Inkscape</a> and <a href="http://www.gimp.org/">Gimp</a>, used in Linux for creating and editing vector graphics and digital images respectively, are comparable to the Adobe programs Illustrator and Photoshop. They cover different needs and audience, thriving on different niches. An example of this type of niche is the architects, who use vector graphics to design and represent buildings with Autocad or similar programs. These are not watertight compartments. Gimp can import vector graphic files, rendering them as bitmaps. Inkscape can also import a bitmap image as a drawing object. In each case, the users may choose the best tool for each task.<br /><br />While it has been easy to list some essential image processing programs for Linux and other systems, to do the same exercise in the field of audio and MIDI is much more risky. The problem is that the way musicians work with computers is not homogeneous, with each musician working in a different way. For old school types the ideal work-flow is to note down musical ideas, develop drafts and refine compositions using tools that work with symbolic elements, producing as a final result a paper copy of the score. <a href="http://www.rosegardenmusic.com/">Rosegarden</a> could be appropriate at this stage. On the other extreme, there are those who never in his life read or write a score, and whose only tools of creation (other than musical instruments) are the mixer and multi-track recorder. In this case, <a href="http://ardour.org/">Ardour</a> could be right.<br /><br />The two applications mentioned above allow the use of digital audio and MIDI at the same time. In the same way as in the world of images, some applications are focused on the symbolic representation (MIDI) and others in a final product (digital audio). In each case, the use of the other technology will be subordinate. For instance, Ardour MIDI messages are aligned to the audio samples. It has even developed an API (Jack MIDI) to ensure synchronization of MIDI events to digital audio samples, subordinating MIDI to the rules of digital audio. Obviously this strategy does not fit adequately on all scenarios where MIDI is useful.<br /><br />As in the imaging world, symbolic representation (MIDI) is probably better suited for design, drafting and composition. By contrast, digital audio is the dominant technology in the studio, at mixing stage and production, to obtain a finished product.<br />Pedrohttp://www.blogger.com/profile/06773011931515405946noreply@blogger.com0tag:blogger.com,1999:blog-6982925173228101953.post-39757242216207604732011-10-12T00:10:00.000+02:002011-10-12T00:10:03.336+02:00VMPK & FluidSynth 0.1.0 released<div class="separator" style="clear: both; text-align: left;">
<a href="http://store.ovi.com/content/210572" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgA8T-Vs5K9uNBp27LkhahG3ygDbi6nUM0lA-nvhxlN1MV1qYDTxDrvtQa6qBL3AmZPyEnqAf_7J3oDEQy0sEBlxNI04u4o9vS8uPl2rDdHALdKqJIQ6lYdGFozik_Wcgt93m_A7D3bUr4/s1600/-nokia-n8-2.jpg" /></a></div>
VMPK & FluidSynth is a MeeGo Harmattan application for Nokia N9/N950 smartphones. It contains a QML based VMPK user interface bundled with FluidSynth for sound generation.<br />
<br />
You may <a href="http://store.ovi.com/content/210572">download it from OVI Store </a>right now.<br />
<br />Several enhancements have been included <a href="http://midi-clorianos.blogspot.com/2011/08/presenting-vmpk-for-nokia-n950.html">since the 0.0.1 beta </a>announced in August. <br />
<ul>
<li>Controllers, Bender, and Velocity values can be optionally controlled by the device's accelerometer.</li>
</ul>
<ul>
<li>Internationalization. This version includes translations to Spanish, Russian (thanks to Serguey Basalaev) and Czech (thanks to Pavel Fric).</li>
</ul>
<ul>
<li>Inverted color theme. This dark color combination consumes less power, enabling longer battery life.</li>
</ul>
<ul>
<li>Latest FluidSynth included.</li>
</ul>
Sources available <a href="http://sourceforge.net/projects/vmpk/files/vmpkn9/">at SourceForge.net</a>, as usual.<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8yiJoaTf9QMbOa76_zdakcUew8htxgYrbPGLG-7QU8n6v4LP7dyrrfxLBxpXuyxkBwGArrEKh3EzIGUISTwXBdAhGtDo0pIj-_oNqzF28JlwvBxEbRb26LHFQ8DQt0bYrpLIJWmofL7A/s1600/2011-10-09_19-19-15.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8yiJoaTf9QMbOa76_zdakcUew8htxgYrbPGLG-7QU8n6v4LP7dyrrfxLBxpXuyxkBwGArrEKh3EzIGUISTwXBdAhGtDo0pIj-_oNqzF28JlwvBxEbRb26LHFQ8DQt0bYrpLIJWmofL7A/s320/2011-10-09_19-19-15.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioC9PH4oiN9rQrB9fd_UGHC7sQC5XkBgrbDpzh3Z1jG81_w_gvXQbExew8hZWGToZ0XWnIQiSHuYEvbK_7C0TBVPwiAbVye5MWo74BT7QM4HTvvqGBEyG_2aROyOxtq3fs-BpAJk5L1t4/s1600/2011-10-09_19-20-38.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioC9PH4oiN9rQrB9fd_UGHC7sQC5XkBgrbDpzh3Z1jG81_w_gvXQbExew8hZWGToZ0XWnIQiSHuYEvbK_7C0TBVPwiAbVye5MWo74BT7QM4HTvvqGBEyG_2aROyOxtq3fs-BpAJk5L1t4/s320/2011-10-09_19-20-38.png" width="179" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ80kkXgfYD957f2GxmHmspoo3sN4W04dcjMASODgOP8hak_4DqK81163lV8_ylX807q5V3YK162losGiH5Y0WmtumuUD33Pgkjk2f2emuBKcEDwk8opvaCKAP7eftPgQsEIdJXnjec24/s1600/2011-10-09_19-21-21.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ80kkXgfYD957f2GxmHmspoo3sN4W04dcjMASODgOP8hak_4DqK81163lV8_ylX807q5V3YK162losGiH5Y0WmtumuUD33Pgkjk2f2emuBKcEDwk8opvaCKAP7eftPgQsEIdJXnjec24/s320/2011-10-09_19-21-21.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivhUQtYs7C059ZH4OtTATzZOBPcHIRrKS6vR6XcieLYekweE-YdSp3H-UDxZNJp28RNwduQFvApiHWfPDdmPO7KzUfDVZnrdXwJWKQFoqdIcjbfireD8KZd1qyq7KUQ2O8GUFG20roiaU/s1600/2011-10-09_19-24-14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivhUQtYs7C059ZH4OtTATzZOBPcHIRrKS6vR6XcieLYekweE-YdSp3H-UDxZNJp28RNwduQFvApiHWfPDdmPO7KzUfDVZnrdXwJWKQFoqdIcjbfireD8KZd1qyq7KUQ2O8GUFG20roiaU/s320/2011-10-09_19-24-14.png" width="320" /></a></div>
<br />Pedrohttp://www.blogger.com/profile/06773011931515405946noreply@blogger.com2tag:blogger.com,1999:blog-6982925173228101953.post-80595159369419385422011-09-11T16:11:00.002+02:002011-09-11T16:11:52.027+02:00SoundFonts want to be free<a href="http://en.wikipedia.org/wiki/SoundFont">A "SoundFont" file</a> (suffix .SF2) is a definition of one or several musical instruments, which can be used with synthesizers (hardware or software) to render, or convert musical notes (eg MIDI files, suffix. MID) into digital sound, which can be used by an audio interface and speakers to play music. Another file format for the same purpose is <a href="http://www.midi.org/techspecs/dls/dls.php">DownLoadableSounds</a> (suffix. DLS). Both include sound samples that can be entirely synthetic or digitized from real instruments.<br />
<br />
<a href="http://www.midi.org/techspecs/gm.php">General MIDI</a> is a very popular specification, that among other things define a palette of instruments. The instrument #1 is a piano, #41 a violin, #57 trumpet, #74 flute... GM SoundFonts offer 128 instruments arranged in that particular order. GS and XG are extensions of this specification.<br />
<br />
Linux needs GM soundfonts that could be distributed together with GPL programs, similar to the need of typographic fonts for text rendering applications. Many Linux distributions incorporate the FluidR3 soundfont in their repositories. It is free and produce good quality sound, but is not small: more than 140 megabytes. <a href="http://musescore.org/en/handbook/soundfont">MuseScore distributes</a> "TimGM6mb" soundfont, which "only" weights 5.8 megabytes.<br />
<br />
There are several software synthesizers using SoundFonts. Well known are <a href="http://www.fluidsynth.org/">FluidSynth</a> and TiMidity++, both with free licenses. One lesser known, but no less interesting, is <a href="http://gervill.java.net/">Gervill</a>. It is part of OpenJDK, and therefore GPLv2 licensed. It is implemented in Java, of course. I am not very fond of Java, and I do not usually use it except for commercial projects when the customer requires their use, but this time I will do it only for fun.<br />
<br />
Gervill can use SoundFonts, DLS, or WAV files. A very interesting feature is the so-called "<a href="http://java.net/projects/gervill/sources/svn/content/trunk/src/com/sun/media/sound/EmergencySoundbank.java">Emergency Soundbank</a>", used when no other external SoundFont is available. Definitions of this SoundFont instruments are fully synthetic and follow the GM standard.<br />
<br />
This EmergencySoundbank is a Java class, and does not reside on a file, therefore it can not be used on another synthesizer. However, nothing prevents us from creating a Java program that instantiates the class, and stores the instrument definitions on a disk file. How complicated may this program be? Let's see:<br />
<br />
<code>
$ cat MakeEmergencySoundfont.java <br />import com.sun.media.sound.*;<br />public class MakeEmergencySoundfont {<br /> public static void main(String[] args) throws Exception {<br /> SF2Soundbank sf2 = EmergencySoundbank.createSoundbank();<br /> sf2.save("GervillEmergencySoundbank.sf2");<br /> }<br />}<br />
</code>
<br />
<br />
7 lines is not much after all. Let's compile it:<br />
<br />
<code>
$ javac MakeEmergencySoundfont.java <br />MakeEmergencySoundfont.java:5: warning: com.sun.media.sound.SF2Soundbank is internal proprietary API and may be removed in a future release<br /> SF2Soundbank sf2 = EmergencySoundbank.createSoundbank();<br /> ^<br />MakeEmergencySoundfont.java:5: warning: com.sun.media.sound.EmergencySoundbank is internal proprietary API and may be removed in a future release<br /> SF2Soundbank sf2 = EmergencySoundbank.createSoundbank();<br /> ^<br />2 warnings<br />
</code>
<br />
<br />
We have earned two warnings for the naughty boys, because it is ugly to directly use classes in the namespace "com.sun.media.sound.*", and if the Oracle finds out our prank, he could lock the pantry. Here, take another cookie, Neo...<br />
<br />
To compile and use this program you only need <a href="http://openjdk.java.net/">OpenJDK6</a> (runtime and compiler). For older Java versions you can get a "gervill.jar" from the <a href="http://java.net/projects/gervill/downloads">project website</a>.<br />
<br />
Running the program produces a SoundFont file:<br />
<br />
<code>
<br />$ java MakeEmergencySoundfont<br />$ ls GervillEmergencySoundbank.sf2 <br />-rw------- 1 pedro users 1.8M 2011-09-11 12:50 GervillEmergencySoundbank.sf2<br /><br />
</code>
<br />
The result weights less than 2 megabytes. Of course the quality of the SoundFont is not high, but it is better than installing nothing at all by default, leaving users wondering what do they need to hear something in their programs that depend on software synthesizers.<br />
<br />
It is interesting that a similar technique, also very simple, can be used to produce other SoundFonts based on samples of arbitrary sounds. For more details, see the <a href="http://java.net/projects/gervill/sources/svn/content/trunk/src.demos/MakeSoundFont.java">MakeSoundFont example</a> in Gervill's repository.<br />
<br />
Finally, a question remains about what license we can use to distribute the file "GervillEmergencySoundbank.sf2" generated by our program. As a general rule, the <a href="http://www.gnu.org/licenses/gpl-faq.html#GPLOutput">output of a GPL program</a> has no restrictions. However, in this case the program output does not come from processing input data, but simply dumps the results of running the algorithms included in the EmergencySoundbank class. To play it safe, we should release it as GPL.Pedrohttp://www.blogger.com/profile/06773011931515405946noreply@blogger.com0tag:blogger.com,1999:blog-6982925173228101953.post-61603480905857127332011-08-27T16:01:00.000+02:002011-08-27T16:01:08.273+02:00Presenting VMPK for Nokia N950<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJVNQSwcyZ_jbPvtwQWHIaKpuVoHbK5tDnCa_SrxeWWI7O-ZNb0XFivv4h65dw-sHmvSnU7RHmNbGdXTgeS6MEHHj_zt1roNcjXB_tR-NmV3PXvIdVBr_KyCvDl5nQQFdvgk_OfnlPbrk/s1600/vmpkn9_purple_icon.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJVNQSwcyZ_jbPvtwQWHIaKpuVoHbK5tDnCa_SrxeWWI7O-ZNb0XFivv4h65dw-sHmvSnU7RHmNbGdXTgeS6MEHHj_zt1roNcjXB_tR-NmV3PXvIdVBr_KyCvDl5nQQFdvgk_OfnlPbrk/s1600/vmpkn9_purple_icon.png" /></a></div>
I've been playing with my new and sexy Nokia N950 developer device, and here is the fruit: a newborn <a href="http://vmpk.sf.net/">VMPK</a>. I've just released a beta for testing, usable but not yet optimized. Please, try it. Your feedback will be appreciated.<br />
<br />
Download <a href="http://downloads.sourceforge.net/project/vmpk/vmpkn9/vmpkn9_0_0_1_armel.deb">VMPK & FluidSynth for N950</a> from <a href="http://sourceforge.net/projects/vmpk/files/vmpkn9/">sourceforge.net</a><br />
<br />
I've learned two lessons from the Symbian port of VMPK published at Nokia's OVI Store: people expect that if a program looks like a piano, it should sound like a piano. It doesn't matter if <a href="http://store.ovi.com/content/132667">the product description says</a> that it doesn't produce any sound by itself. Dozens of comments in OVI Store page confirm that there is no hope that users read the description before downloading a program.<br />
<br />
When I was doing some research for the Symbian port, I've discovered that creating sound always used very large audio buffers, no matter the method, producing about one second of latency or more. This is unacceptable for a musical instrument emulation, so network MIDI was the only available option. On the other hand, the Nokia N9xx uses Linux, including ALSA and PulseAudio among other usual infrastructure, so the latency is not a problem and <a href="http://www.fluidsynth.org/">FluidSynth</a> is a perfectly sound complementary addition to VMPK. <br />
<br />
Second lesson: an user interface that fits well in the desktop version of the program is barely usable on the mobile phone form factor. The solution is to create a new user interface using <a href="http://doc.qt.nokia.com/latest/qdeclarativeintroduction.html">QML</a>, the new declarative language for Qt user interfaces. The piano keyboard widget was already built around the <a href="http://doc.qt.nokia.com/latest/graphicsview.html">Qt Graphics View Framework</a>, so it only required to be wrapped as a QDeclarativeItem subclass and it was readily available as a QML object, to be combined with the <a href="http://doc.qt.nokia.com/qt-components-symbian-1.0/index.html">Qt Quick Components for Meego</a> library to build the new user interface. Here are some screenshots.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgW8LlUPqTIzgo9ioMPiy69LtvecoKX2HpKnoynCh2bZOoWZPK1YPX9VxPSOz5IkiaIz7KVmuIBFui7TvpI-LvAEhEtjdmCnUI3yAWqLAfaiFpy1azYQfKmIygrSRuID5FRW0Kv8JOxG9Q/s1600/vmpkn9-main.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="177" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgW8LlUPqTIzgo9ioMPiy69LtvecoKX2HpKnoynCh2bZOoWZPK1YPX9VxPSOz5IkiaIz7KVmuIBFui7TvpI-LvAEhEtjdmCnUI3yAWqLAfaiFpy1azYQfKmIygrSRuID5FRW0Kv8JOxG9Q/s320/vmpkn9-main.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Main page, common controls are shown.</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlNT4cUX_fuP1Xcjl3v87dVFZ-F_oWNQeYkVYivhppMR-oWwKH-iQVmxlPwHyavEgMze8T4uDLEWIfSaorOMDS-c3Ue7tPCfxd6AhcDO23gnbCDYUuMJxFGtAK-3H-q92JfQsdLCOPjJg/s1600/vmpkn9-menu.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="177" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlNT4cUX_fuP1Xcjl3v87dVFZ-F_oWNQeYkVYivhppMR-oWwKH-iQVmxlPwHyavEgMze8T4uDLEWIfSaorOMDS-c3Ue7tPCfxd6AhcDO23gnbCDYUuMJxFGtAK-3H-q92JfQsdLCOPjJg/s320/vmpkn9-menu.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Main menu, note names option activated.</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy19jLsvuXfRS2PLNvBE8Ik_5B2B-SwLN-uGoZpnnOICM4j0yjINZPgFEniv0s4Dtf2ZBDPlpqSf4Zw9QQUa1qsyM-AyCpKvHuwXJ9soF98JANwDOA5DUa-z8SjGt6IFbnePxijjOo9q0/s1600/vmpkn9-prefs.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="177" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy19jLsvuXfRS2PLNvBE8Ik_5B2B-SwLN-uGoZpnnOICM4j0yjINZPgFEniv0s4Dtf2ZBDPlpqSf4Zw9QQUa1qsyM-AyCpKvHuwXJ9soF98JANwDOA5DUa-z8SjGt6IFbnePxijjOo9q0/s320/vmpkn9-prefs.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Preferences page.</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCR1N_Quzmshpj6_3ezK7k_HYJXDg5cjIUxRGV_rZises8g7n1DnMcoEvOCkjh3_SmckbgR-L0ggg0Nz0ZceUxChiHyi97wuvdaYpZO5eyZjfFi6q1a32ZAdeQYpWx_gXPQPZ6c2aXnMw/s1600/vmpkn9-about.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCR1N_Quzmshpj6_3ezK7k_HYJXDg5cjIUxRGV_rZises8g7n1DnMcoEvOCkjh3_SmckbgR-L0ggg0Nz0ZceUxChiHyi97wuvdaYpZO5eyZjfFi6q1a32ZAdeQYpWx_gXPQPZ6c2aXnMw/s320/vmpkn9-about.png" width="177" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">About page.</td><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
Pedrohttp://www.blogger.com/profile/06773011931515405946noreply@blogger.com4Ronda de Sant Pere, 3, 08010 Barcelona, Spain41.387917 2.169918741.292614 2.0119902 41.48322 2.3278472000000003tag:blogger.com,1999:blog-6982925173228101953.post-48421105639742039982011-06-05T17:51:00.001+02:002011-06-07T16:23:22.589+02:00VMPK 0.4.0 Released<a href="http://sourceforge.net/projects/vmpk/files/vmpk/0.4.0/">This release</a> adds touch screen support (multi-touch) for all platforms, if it is supported by the OS and hardware. New <a href="http://www.music.mcgill.ca/%7Egary/rtmidi/">RtMidi</a> classes have been merged, which includes Jack MIDI support and a new network MIDI driver (UDP multicast) compatible with <a href="http://nerds.de/en/ipmidi.html">IpMIDI</a> and <a href="http://qmidinet.sourceforge.net/qmidinet-index.html">QMidiNet</a>. A <a href="http://store.ovi.com/content/132667">Symbian^3 port</a> has been made. There are new translations to Dutch and Swedish. A bug crashing the program when changing the octave base has been fixed.<br />
<br />
My suggestion is to use the packages provided by your distribution when possible. If you prefer to compile the program yourself, I would like to give you some advices to build VMPK with the new features. First of all, you need CMake 2.8. The touch screen feature is available on all platforms, thanks to Qt >= 4.6 (but is better supported in Qt 4.7). There are two new build options:<br />
<ul><li>RTMIDI_DRIVER: selects the RtMidi backend. The default one depends on the OS. Allowed values: ALSA, JACK, COREMIDI, IRIX, WINMM, NET.</li>
</ul><ul><li>PROGRAM_NAME: selects the executable name.</li>
</ul>In Linux, you can compile VMPK with ALSA, JACK or NET drivers, but only one each time. You may build the program with different names, though, if you want several versions installed at once. For instance:<br />
<br />
<pre>$ mkdir build-jack
$ cd build-jack
$ cmake .. -DRTMIDI_DRIVER=JACK -DPROGRAM_NAME=vmpk-jack -DCMAKE_BUILD_TYPE=release
$ make
$ mkdir build-net
$ cd build-net
$ cmake .. -DRTMIDI_DRIVER=NET -DPROGRAM_NAME=vmpk-net -DCMAKE_BUILD_TYPE=release
$ make
</pre><br />
For the network version, there is a new help page here: <a href="http://vmpk.sourceforge.net/m/">http://vmpk.sourceforge.net/m/</a><br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://store.ovi.com/content/132667"><br />
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9gVOBhgszoMI0BtsMTAm9j73hPsTMjP_wFtyzN8xKU16IhRh6axU7mcB3Ki4stjy1-6SimoPgX86l5FqtM_xzWdvo09iWoQPHRQ-BRb7M1r70qZxBAh07hBIef7cXwnb2L1VVBg8ggXc/s1600/-nokia-n8-2.jpg" /></a></div><br />
Enjoy!Pedrohttp://www.blogger.com/profile/06773011931515405946noreply@blogger.com4tag:blogger.com,1999:blog-6982925173228101953.post-69809830508607913342011-05-29T23:07:00.000+02:002011-05-29T23:07:42.321+02:00Akademy-es 2011<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifTEz7obWaQi-UXddfpJ7gey-8cEcgKyHEAHX6pG8uuBHbQtzEVunyEEgGQz-UXHU7Rf-80Rlv5GEwTMvpt6iQhvHviAHer1A2DhxvzAtXM1SZisXcOdAp7b5uPqtc06JvleMWcFjZWUM/s1600/akademy-es-2011.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="425" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifTEz7obWaQi-UXddfpJ7gey-8cEcgKyHEAHX6pG8uuBHbQtzEVunyEEgGQz-UXHU7Rf-80Rlv5GEwTMvpt6iQhvHviAHer1A2DhxvzAtXM1SZisXcOdAp7b5uPqtc06JvleMWcFjZWUM/s640/akademy-es-2011.jpeg" width="640" /></a></div><br />
<br />
I've been attending the <a href="http://kde-espana.es/akademy-es2011/">Akademy-es 2011</a> at Barcelona last week-end, instead of protesting and making the <a href="http://en.wikipedia.org/wiki/2011_Spanish_protests">Spanish Revolution 2.0</a>. It was a pleasure to meet Antonio Larrosa face to face again, after 5 years. We met the first time at Akademy-es 2006, also in Barcelona, where the idea for KMid2 was born. Hugs, Antonio!<br />
<br />
My presentation was rejected. I've offered the same paper ("<a href="http://www.jornadespl.org/biblioteca/ix-jornades/conferencies-convidades/midi-en-linux">MIDI en Linux</a>") used at the <a href="http://midi-clorianos.blogspot.com/2010/07/midi-en-las-jornadas.html">IX Jornadas de Software Libre</a>. As an alternative, they proposed a lightning talk about KMid, but I wasn't interested in this format. My project is not KMid, but KMid is a piece of my project: providing Linux and KDE the MIDI tools that are needed, and this includes KMid, KMetronome, KMidimon, Drumstick, and some more programs.<br />
<br />
About the conferences. Some talks were recycled, year after year, like the Valgrind talk by Albert that anyway deserves to be repeated even more times because it is a key tool to enhance the code quality of our projects. Other topics were brand new and interesting, for instance the half-rolling release and bundle system of the Chakra distribution, presented by Manuel Tortosa.<br />
<br />
After the meetings, supper and drinks. This is the so called "social program". Everything is social, of course, when a couple of geeks meets to do things together. Saturday supper, I was shocked by a question of one of the attendees. He said to me something like this: Who wants MIDI at 2011, anyway? The answer for this question was in my paper, but he didn't bothered to read it. To summarize: MIDI is not an alternative to MP3, like drawing is not an alternative to photography. Who thinks that every program related to drawing should be banned from KDE? After all, it is a technology invented in the paleolithic era.Pedrohttp://www.blogger.com/profile/06773011931515405946noreply@blogger.com2Barcelona, Spain41.387917 2.169918700000039341.3137835 2.0830957000000394 41.462050500000004 2.2567417000000392tag:blogger.com,1999:blog-6982925173228101953.post-69450070939076912682011-05-28T15:42:00.001+02:002011-05-28T15:44:56.562+02:00Mordor attacksHow to explain yesterday's events to all the inhabitants of Middle-earth? <br />
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://www.flickr.com/photos/acampadabcnfoto/5765879665/" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;" title="JULI_GARZON_27.05.2011_15 por acampadabcnfoto, en Flickr"><img alt="JULI_GARZON_27.05.2011_15" src="http://farm3.static.flickr.com/2274/5765879665_95a66453e0.jpg" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The Squad of Orcs, here called "Orcos de Esquadra", attacked a large meeting of Hobbits at Shire's Square, when they were pacifically claiming real Democracy.</td></tr>
</tbody></table><br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://www.flickr.com/photos/acampadabcnfoto/5764476979/" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;" title="sytsew_27-5-2011_28web por acampadabcnfoto, en Flickr"><img alt="sytsew_27-5-2011_28web" src="http://farm3.static.flickr.com/2151/5764476979_a6c067962f.jpg" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">There have been <a href="http://www.washingtonpost.com/business/121-injured-as-spanish-police-clash-with-protesters-in-makeshift-camp/2011/05/27/AGSJimCH_story.html">121 injured</a>, including 37 orcs.</td></tr>
</tbody></table><br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://www.flickr.com/photos/agenciaacn/4638677840/" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;" title="Felip Puig"><img alt="Felip Puig" src="http://farm5.static.flickr.com/4039/4638677840_a21055330d.jpg" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">There was a repulsive Nazgul commanding the Orcs, Felip Puig.</td></tr>
</tbody></table><br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://www.flickr.com/photos/29723496@N08/2772634893/" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;" title="La Caixa por MarioMelendez, en Flickr"><img alt="La Caixa" src="http://farm4.static.flickr.com/3008/2772634893_bb2d7a17fc.jpg" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Orcs and his commander defend the interests of the Black Tower, where evil dwells.</td></tr>
</tbody></table>Pedrohttp://www.blogger.com/profile/06773011931515405946noreply@blogger.com0Barcelona, Spain41.387917 2.169918700000039341.3137835 2.0830957000000394 41.462050500000004 2.2567417000000392tag:blogger.com,1999:blog-6982925173228101953.post-7358335462154599582011-05-04T23:32:00.001+02:002011-05-15T23:10:40.963+02:00VMPK: new release, soonA new VMPK release is coming, with some new features:<br />
<br />
* Touch screen interface support.<br />
<br />
* RtMidi 1.0.14, comes with Jack MIDI support. Note that RtMidi allows only one driver, so you need to choose at configuring time the desired MIDI backend.<br />
<br />
* Network MIDI support (UDP multicast). It may be used in Linux, Windows and Mac, but is more interesting for portable devices. The protocol is compatible with ipMIDI for Windows and Mac (<a href="http://nerds.de/">http://nerds.de</a>) and with qmidinet and multimidicast in Linux/Unix (<a href="http://qmidinet.sourceforge.net/">http://qmidinet.sourceforge.net</a>).<br />
<br />
* Symbian^3 port.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiQV_AsxZg3vd5OdtzMtLPnvuiPtN0juBn7J64NbWOCeSpIF6drrVwg4SuAN6Ejuzs8il8EKVe6wk4B_alvHUB8LLR5jnPyMJTqLGGStxolVmCaWSg_0R6p7vvCTKBLi72bexq31O9X6o/s1600/vmpk_c7.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="308" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiQV_AsxZg3vd5OdtzMtLPnvuiPtN0juBn7J64NbWOCeSpIF6drrVwg4SuAN6Ejuzs8il8EKVe6wk4B_alvHUB8LLR5jnPyMJTqLGGStxolVmCaWSg_0R6p7vvCTKBLi72bexq31O9X6o/s640/vmpk_c7.jpeg" width="640" /></a></div>Pedrohttp://www.blogger.com/profile/06773011931515405946noreply@blogger.com4