I care deeply about soundfonts in 2016!

Earlier this year, the musician and producer S. Christian Collins updated his soundFont, GeneralUser GS. He also blogged about the current state of SoundFont technology and his considerations for the format’s future. He wondered whether this still matters for many people. My personal answer is a resounding Yes!

A little background: I once studied music (in vocational school) and I now have a renewed interest in musical practice. When I began reading about music production last year, I clarified my inner picture of the music tech landscape by first learning that MIDI is a) still totally relevant today and that b) the MIDI protocol is not at all tied to a certain style of (presumably cheesy) sounds. This is an old conflation that many people from my generation have made because, back in the day, when MIDI soundtracks were common – not only in games but in many kinds of multimedia software – the most commonly heard sounds were those of the low-quality licensed GS synths present in Windows and Mac OS. When I realized how little those sounds have in common with modern sample-based synthesis, it opened my eyes to what I would have loved to know much earlier: I love sample-based synthesis and want to work with it in as many contexts as possible.

I had always known, more or less consciously, that there existed adequate technical means to the end of producing realistic orchestrations without ever having to record a live musician, but I had never realized what sampling and sound programming were truly about. For example, I am a Nintendo fanboy who loves listening to the original soundtracks of SNES, Game Boy Advance and Nintendo 64 games, but learning where the sounds of those games were sourced from made me recover a sense of connection with music that I had forgotten about after many years of working in other fields. I love the sounds of General MIDI modules and keyboard workstations, not inasmuch as they imitate acoustic instruments, but as tone generators that happen to be based on multisamples! Judged on their own merits, they have as much legitimacy as any other tone generation techique.

Collins compares current applications for SoundFonts and finds that very few implement the entire specification properly. When I read this and saw that Fluidsynth was definitely the way to go for me, I realized how deep the analogy runs between SoundFonts for synthesis and Adobe Type 1 fonts for advanced typography. In both cases, an ageing technology gets abandoned by its original specifier but remains relevant for an important subset of users and creators. In both cases, one of the best maintained implementations is a piece of free software (respectively Fluidsynth for SoundFonts and the pdfTeX system for Type 1 fonts). Again in both cases, the technology still has immense pedagogical potential, but also much potential in professional use. This is compounded by what I gradually learned about the different synthesis types by reading such publications as Sound on Sound and Keyboard Magazine: their series of in-depth articles demonstrate that a skilled synthesist can conjure a multitude of beautiful, workable sounds with a sample-based synthesizer, if enough modulation options are available. That is the case when a well-programmed SoundFont is used with a synthesizer implementing SoundFont ‘modulators’.

By returning to the field of music, I find myself bringing over my preference for free software, especially in pedagogical settings. (I find commercial audio software much more legitimate than commercial word processing software, but that is a discussion for another day.) Because of that preference and the high availability of free, modern music production software, I profess that I will encourage any newcomers and potential students to the crafts of instrumentation and synthesis to try out free software that implements good sample-based synthesis, along with some aspects of subtractive, additive and other types of synthesis.

Returning to the analogy between SoundFonts and text fonts, I am not alone in capitalising on it. One need only read excerpts from this enticing review of an upcoming typography book:

Several good metaphors are used throughout the book, illuminating its main themes. [The author] compares the fonts to classic musical instruments like cellos and pianos. This metaphor becomes especially apt when he notes that it is difficult to judge some variants of Palatino because they were not actually used—as we cannot judge an instrument which was never played by a skilled musician.

Second, if a font is a musical instrument, then a discussion of it is not complete without a sketch of musicians who played it and the pieces where it shone brightest.

Do give GeneralUser a chance, as well as Fluidsynth’s included SoundFont, FluidR3. Find some good quality MIDI files or, if you can, play an old game with a MIDI soundtrack and use a SoundFont player to render it! You’ll see what I mean. Youtube is full of excellent examples.

With that, I shall return to my experimentations with pulse-width modulated string sounds.

Vers l’intégration des principes de la culture libre à l’Université Laval

Aujourd’hui le 17 juin 2014 se déroulait le Forum sur la culture à l’Université Laval. Cet événement s’inscrit dans l’adoption d’un Agenda 21 de la culture pour l’Université. J’ai participé au forum en tant qu’étudiant des cycles supérieurs.

La journée était organisée en ateliers par équipes et en plénières. Au sein de mon équipe, il fut question à plusieurs reprises d’open culture. (On se demandait si la meilleure traduction était culture libre ou culture ouverte, la question reste justement ouverte…) Je fus très agréablement surpris de constater que certains membres de mon équipe, en particulier un professeur chercheur et une conseillère en bibliothèque, étaient déjà bien au fait de la question. Lors de la synthèse finale en plénière, j’ai rédigé puis partagé la réflexion suivante.


Favoriser ce qu’on appelle «open culture» à tous les niveaux. L’open culture découle, entre autres, du modèle de l’open source en informatique: c’est le pari d’une collaboration universelle dont tous les acteurs profitent, avec un souci de la transparence, de l’accessibilité et du choix de bonnes normes de travail.

En plus de l’open source, les aspects de l’open culture à favoriser à l’Université Laval comprennent l’open access (la publication en libre accès, point sur lequel notre Bibliothèque est déjà bien avancée), l’open science, l’open data etc. Plusieurs enjeux de formation et de recherche sont liés à une telle culture. Par exemple, les avantages techniques et éthiques de l’open source peuvent grandement améliorer les relations de travail et d’apprentissage en favorisant la confiance, l’efficience et la maîtrise des moyens techniques.

Cela touche tous les domaines: toutes les sciences, les lettres, les arts et les techniques. Il est manifeste que l’open culture favorise aussi l’interdisciplinarité, en donnant à tous une confiance renouvelée en leurs moyens et en leurs possibilités de communication.

Enfin, l’appropriation de l’Agenda 21 pourrait passer par une accessibilité maximale grâce à l’application des principes de l’open data et de l’open source.


Ma réflexion semble avoir été bien reçue, autant par les participants que par les organisateurs.

En rétrospective, je me rends compte que la discussion m’a aidé à mieux cerner ma position. Par ailleurs, bien que le contexte de la discussion et les connaissances préalables des participants aient favorisé l’adoption du terme open, je remarque que c’est une concession qui ne me satisfait pas totalement.

D’une part, traduire en français les expressions contenant le terme open est souvent fâcheux et la langue française nous autorise à utiliser sans ambiguïté le terme libre, luxe que les anglophones n’ont pas. Ô combien on en a déjà parlé, mais ô combien cette dynamique ne laisse pas de proposer des défis et des dépassements dans la communication!

D’autre part, outre le défi linguistique, je préfère parler de liberté plutôt que d’ouverture pour des raisons ontologiques. La sémantique de la liberté m’apparaît plus riche et plus productive. Cependant, au Québec, le discours du libre est peut-être moins présent que celui de l’ouverture. Est-ce à cause du contexte nord-américain? Je ne saurais répondre avec concision, alors je vais finir sur cette bombe.

L’important pour moi est que l’Université Laval considère sérieusement l’adoption de tels principes et je n’en suis que plus déterminé à continuer mon apologie du libre dans le domaine des humanités.

The Time of the Editor’s “Toolset 24” Has Come

Abstract: I am finally beginning to tame Emacs and Firefox has long been my browser of choice. Both are currently (as of September 24, 2013) at major version 24. Used together and in a certain way, they represent an extremely powerful and extensible toolset for editing, publishing and development in general. In particular, I use Emacs to work with the major relevant editable document formats, i.e. Markdown, Org, OpenDocument, TeX and friends, and Firefox to work with the major relevant publishable formats, i.e. PDF, HTML and friends.

This article’s draft is first published on September 24, 2013. It will be progressively augmented and updated as I refine my workflow and my understanding.

A Response to The Document Foundation’s Open Letter to the City of Freiburg and to the Circumstances of the Letter’s Publication

Last year, I posted the following comment on a blog post from The Document Foundation. I post it here again, as I realize that I had neatly summed up my position in this small piece. I then augment the initial comment with more recent insights and personal experience.

Comment on the “Open Letter to the City of Freiburg”

It saddens me to see that Microsoft Office still manages to shackle sensible businesses and public service providers like that. The truth is that OOXML is badly engineered and that ODF is an excellent format. People always live in fear of not being able to work with existing Office files and also believe (wrongly) that OpenOffice/LibreOffice cannot do everything that MS Office can. The truth is that OpenOffice and LibreOffice are being (re)built around the OpenDocument format, whereas the OOXML format is built around the peculiarities of MS Office. There is nothing rational or desirable about OOXML: it is defective by design and achieves none of its stated goals. ODF is modern, rational, consistent and flexible. It is also complete, contrarily to what Microsoft wants people to think. Users should not care about OOXML compatibility, they should care about achieving their goals with their documents. There is no proposed goal that cannot be achieved with ODF, whereas with OOXML you always have to jump through hoops.

You choose. Do you want:

  • A format that is complete, covers all use cases and yet has a fairly concise specification (a little over 800 pages in PDF), that is similar to HTML in its XML syntax and thus can be implemented, read and authored directly at the XML level by anyone who has the skill to work with HTML and other such similar formats; or

  • A format that is not even known with certainty to be complete or to cover all use cases due to its complexity, verbosity and shunning of existing standards, has a specification of many thousands of pages that leaves out important implementation details and is so complex and alien in its XML syntax that it is hard, even for a seasoned coder, to actually write any of it “manually”?

I know what I want. If the decision makers knew what was at stake, even if they chose MS Office, they would choose ODF (recent versions of MS Office are supposed to support ODF). Formats are important. They are actually, in a sense, more important than applications. Let me quote Rob Weir who, in a sensible article, laid it out very appropriately a couple of years ago:

The ODF open standard transcends implementations and code bases. It is bigger than any one product. ODF is what enables the user to have choice.

Indeed! And if one needs convincing, one need only consider the case of Web standards. At the onset of the web standards era, almost no one implemented the standards until a certain period of toil had passed. Then, eventually, standards began to be consistently implemented. And everyone involved saw that this was Good. During the dark ages, when the standards existed only in spec documents, they were an important beacon and implementing them was a motivation. Eventually, we ended up with much more than spec documents: there are now multiple implementations and, thus, there is now choice.

The conclusion is that ODF, when well used and well applied with e.g. OpenOffice or LibreOffice (among other emerging tools), is already much better than OOXML and MS Office. What we need to do is improve ODF implementations even more, so that the world eventually realizes how nice ODF is and wants nothing else. In particular, I think ODF should become a first-class citizen of the Web. One should be able to open an OpenDocument Text document in a browser as though it was a web page. The various existing web browsers, which are already awesome tools, should become honest-to-goodness OpenDocument consumers, as defined by the ODF specification. Moreover, we need more web applications that are OpenDocument producers as defined by the spec. For now, there is WebODF, but this project is still in its infancy and has yet to see widespread usage. Here is hoping that it gains more prominence in the near future.

Most importantly, the key activity that will help OpenDocument gain prominence is education. More than anything else, we need educators, decision makers and supporters to spread the news that documents must imperatively be authored and edited in an open and accessible format. The good news is that we have already come out of a dark age: documents need not be obfuscated anymore. Producing and consuming documents need not be a single company’s business anymore. It is not that hard to develop and deploy the technology to make and exchange high-quality office documents, no matter what a certain company wants you to believe.

Recent Considerations

Today, in 2013, as LibreOffice 4.0 and Microsoft Office 2013 are upon us and as the release of OpenOffice 4.0 is imminent, I am convinced even more deeply of ODF’s importance. Let me share a personal experience. At my University, in the Philosophy and Literature departments and, more generally, in the various fields of the Humanities, students have long been left to themselves concerning electronic document production. Until very recently, the vast majority of professors, assistants and administrators exchanged binary Office files among themselves and with students without ever giving so much as a hint of awareness of the existence of other formats. No explicit requirement was ever expressed for electronic documents, probably because most professors, in both Philosophy and Literature, expected student assignments to be submitted on paper anyway — electronic submission is a very recent reality in both fields. The consequence of this situation is that Office files were, as elsewhere, a de facto standard. Not giving any explicit requirements was, in many ways, worse than explicitly requiring MS Office files. There was no agreed best practice, no style sheet or template, only a very concise and seldom updated style guide (which primarily concerned the formatting of citations).

Students have trouble with Office files, especially Word files. I can tell, I’ve been there too. Students do have trouble with their text documents authored in Microsoft’s formats. They are at a loss and they do not control what they do: Word controls them. Ask any student or teacher what they think about Word’s handling of lists, different languages, titles, tables of content, hyphenation, justification, font mamagement, multicolumn “sections” (what sections? there is actually no such thing as a section in Word’s formats!) and so on and so forth…

Sometimes, the same teachers and Faculty who happily used WordPerfect or even AppleWorks back in the day are now clueless about the fact that there are other applications or formats besides Word’s. They used to have choice (to the extent that choice was possible in that pre-standards era), but now they have partial amnesia and they remember almost nothing of their old word processing habits and preferences: it’s Word, all the time, all the way, without even so much as a glance backwards. This is in fact very rational from their point of view: they do not think about it in explicit terms, but they view Word a de facto standard and have a vague belief that Word is being improved continuously to meet all their needs. The reasoning goes something like: “Everyone I know has been using this set of tools for so many years, I guess it must mean that this set of tools has demonstrated its excellence and versatility and is now beyond comparison with competing solutions. My IT department suggests this tool set, they offer support for it and they use it extensively themselves, so why would I go on a quest for a hypothetical different tool set which I have no need for?” This is called inertia.

Worst of all is the lack of style sheets and, more fundamentally, the total lack of knowledge about styles in general. People in the fields of Literature and Philosophy are bound to write documents in a technical manner. Many would refuse to call their documents “technical documents”, but they must admit that the process of producing these is a highly technical one. It is highly surprising, then, that departments have never thought about enforcing the use of styles. What departments do instead is say: “you must author your documents with such characteristics and follow those guidelines we provide, but we will not actually tell you how to properly implement such characteristics”. The result: no style sheet, no style; no style, no consistent structure; no consistent structure, substance suffers. Indeed, I assert that a lack of style harms the substance of the text. (I would need to demonstrate this separately and it is highly probable that I eventually will.)

Without a style sheet, work is endlessly and needlessly duplicated. Students, assistants and Faculty all suffer from a lack of style. They try to implement their department’s guidelines with insufficient knowledge of the tool they use and they repeatedly approximate without ever reaching full implementation of the guidelines.

The fact of the matter is that writers will not become document stylists if they have not first been exposed to an established style and the tool that was used to implement the style. Long have word processor users been acquainted merely with the icons presented by the application (be they part of a toolbar or a so-called ribbon) and a small subset of safe menu items. Where are the styles in a word processor? In Microsoft Word, they used to only be part of an anemic toolbox; many users never even knew that this toolbox existed. Of late, Word’s styles have also been presented in a ribbon and a gallery of sorts. The awareness about styles is not much better for it. As the official Word blog puts it, most people think that styles are “for people who want big blue text”. Not some people, but indeed most people: even many of those who do use styles believe that they are meant for people who want big blue text. What I mean by that is that many users have not been acquainted with the full purpose and raison d’être of styles: structure and semantics.

OpenOffice and LibreOffice possess a most excellent tool to deal with styles on a structural level: the Styles and Formatting window, also informally and quite appropriately know as the Stylist. This window has three great virtues:

  • it can be positioned and sized arbitrarily;
  • it has tabs for the style families;
  • most importantly, it can present the hierarchy and thus the inheritance model of the styles.

The Stylist is one of the great pillars of OpenOffice and LibreOffice. It gives access to one of the fundamental concepts of OpenDocument. What is more, it is set to become even more solid and usable in the future: it is being improved both conceptually and visually.

All of the style-related functionality in OpenOffice and LibreOffice is supported by and grounded in the underlying standard: the excellent and flexible OpenDocument format. You might already have guessed one of my conclusions: OpenOffice (which is more than ten years old and was first released around the same time as the decaying but still widely-used Office 2003) laid the groundwork for the excellent style model of OpenDocument. Microsoft Office, because of its inherent structure and shortcomings, would never have allowed such a development to emerge. OpenOffice made OpenDocument possible and, now, OpenDocument is ushering in the era of style. In the long term, this will improve the lives of authors and editors the world over and, hopefully, give better tools to my fellow philosophers and literary theorists. My deep wish is that they become fully aware of the format and realize the full extent of the potential that it holds regarding their work.

The Humanities deserve a more humane format. Fortunately, such a format is now within reach. The fruit is ripe! As I said above, education is what will make the greatest difference in the coming march of OpenDocument. The fight for open standards is far from over and, in this fight, all of those who are already aware of the better alternatives have a responsibility of education towards those who are not yet aware of the alternatives. The education that shall ensue is, in my opinion, a highly philosophical activity: one that deserves much energy and an earnest, continuous dialogue.

Publication de mon article dans le volume 12, automne 2012 de la revue Phares

Le 15 novembre 2012 paraissait le volume 12, automne 2012 de Phares, la revue étudiante de la Faculté de philosophie de l’Université Laval. Dans ce numéro, on peut trouver ma toute première publication universitaire, un article intitulé « La musique présentée comme folie philosophique dans le Phèdre de Platon ». Le rédacteur de la revue résume très bien mon article :

[…] Christian Gagné cherche à déployer le thème de la musique sous-jacent au Phèdre de Platon. Ce faisant, il réintègre la musique dans la constellation d’arts inspirés par les muses, et rappelle ainsi le sens grec de mousikê. L’auteur commence par soulever la parenté que Platon avance entre le philosophe, l’amant et le musicien, par le biais de l’éloge des folies divines effectué par Socrate. Ensuite, une interprétation du mythe des cigales est proposée en prenant comme objets principaux les figures de Calliope et d’Ourania, muses respectives de la poésie épique et de l’astronomie. Ces deux muses sont posées à l’origine de l’activité philosophique, plus particulièrement dans les domaines de l’éthique et de la nature. L’auteur opère enfin un rapprochement entre la philosophie, la véritable rhétorique et la poésie bien menée, en ce qu’elles constituent trois types de discours soumis à une recherche de la vérité.

Je tiens à remercier toute l’équipe de Phares, ainsi que le personnel enseignant de la Faculté et mes collègues en recherche. Mon article aborde un sujet connexe à celui de mon mémoire, lequel paraîtra sous peu.

Semantic Documents: the Relevance of LibreOffice and OpenDocument

I love LaTeX and nothing will ever completely replace it, but let us be realistic: although LaTeX’s goal is to create documents in which the focus is on logical structure and semantic content, in actual fact most people use markup and commands which pertain more to presentation than structure. Using semantic commands exclusively in LaTeX is unintuitive and complicated. What is more, a LaTeX document’s semantic markup is not easily exported to other formats, at least with the included tools. Of course, there is TeX4ht, but as of yet I have had little success with this package, due to my custom commands. There is also Pandoc, which is absolutely magical and wonderful, but then again custom commands are not optimally digested by it.

It is much easier to create semantic documents with the OpenDocument format. LibreOffice Writer, in particular, presents three tools of choice to create semantic markup: styles, sections and text fields.

As I understand it, at the level of the XML code, character styles and text fields present themselves in much the same way. However, their purposes are different. Styles are potentially just as semantic as text fields, but the latter allow automatic generation of content and can also be updated automatically. It is also possible to automatically update the contents of styled text, but this process is technically more demanding and no simple way of doing it is provided by the application’s interface (it is necessary to use scripts). On the other hand, text fields are not meant to apply a given visual style to the text contents, though it is possible to carry out this task manually or through scripting. From the OpenDocument 1.2 Specification, part 1, section 7.2:

The presentation of information in a field is determined by the style applied to the field.

The relationship between paragraph styles and sections is not as straightforward. Sections do not contain a single block-level element, but rather an arbitrary number of objects of any kinds, thus offering an additional level of organization for the document. Just like text fields, sections can be automatically updated, notably from external sources. Actually, in some ways, sections function like LaTeX’s environments and \input commands.

A LibreOffice ODT document contains style, text field and section definitions. By employing those three types of definitions, one can probably cover all semantic needs. The target formats (generally, HTML and PDF) conserve those properties vith very variable degrees of fidelity. The HTML format and, by extension, ePub, can definitely conserve all the semantic properties, but in most cases it is necessary to modify the generated HTML, chiefly in order to modify the classes and identifiers of div and span elements. In most cases, one must also edit the related CSS. By combining intelligent styling and adequate definition of fields and sections, one can conserve everything in this target format.

In the case of the PDF format, almost everything is lost, except the fields of tables of contents, hyperlinks and form fields. The appearance and style of sections is conserved, but nothing allows one to visually distinguish custom fields to which no particular style has been applied or sections that have no special formatting. Obviously, because PDF is meant for printing or simple reading as opposed to editing or data mining, none of this is alarming; the important thing is to always keep the source ODT file. In all cases, one must consider this source file just like program source code: it is more important than the compiled program, since reproducing the program from the source code is easily done, while reproducing the source code from the program is nearly impossible, except perhaps for extremely simple programs with very little structure. The analogy is relevant for documents that are mostly textual and the situation is the same with TeX source files and their corresponding targets (DVI, PostScript, PDF), insofar as TeX files are properly considered to be pogram source code.

The conclusion is simple: OpenDocument Text is the ideal starting format, while HTML, TeX and PDF are more properly target formats. Of course, HTML and TeX are also excellent starting formats, but ODT seems to be a relatively better choice for semantic and structured documents, depending on the producer of the document and their intention. In “real life”, most people work with a word processor and, notwithstanding the relevance of the many criticisms targeted at such pieces of software, the fact that they are useful and indispensable is undeniable. The average person will probably never want to learn TeX, nor write HTML. Visual editors are indispensable. The solution is not to hate them and to wish for their disappearance (this will never happen), but to improve them and to make sure that we use the best one available. In this day and age, that is LibreOffice (or, of course, OpenOffice, but I have developed a habit of using LibreOffice specifically). The format is excellent, the software is complete and surprising (in a good way), the API is fascinating. Admittedly, sometimes LibreOffice hurts, sometimes it disappoints, but one could say the same of all such visual editors and, actually, LibreOffice is probably the least aggravating of them all. In a perfect world, maybe books and Web documents would still be systematically produced by professionnals and specialists, but that is a beautiful utopia. In our world, what matters most is to give everyone poweful and liberating tools to produce reliable, useful, accessible and efficient documents. Since most everyone produces documents nowadays, is this not luminously evident?