OpenBSD Journal

The Story Of The Extra Audio Track: Recording Music With OpenBSD

Contributed by weerd on from the Puffy Burst Into Song dept.

Alexandre Ratchov (ratchov@), OpenBSD developer and composer of one of the extra audio tracks on the newly released audio CD, writes in to tell us how he created the song:

As the "Sonate aux insomniaques" track was just released, I take few minutes to explain how the audio track was produced and where it comes from.

The music is entirely inspired by a poem titled "Sonate aux insomniaques" by Guillaine Dioudonnat. The initial plan, was to work with Guillaine to turn it into a song. But it turned out that the text would add constraints to the rhythm, which would make harder to make the music reflect the universe created by the poem. That's why there are no lyrics.

From the technical point of view, the audio track is a proof-of-concept that OpenBSD is usable for music applications. Not only does the software run on OpenBSD, but the song is made using an approach popular in the community: use simple programs that do one thing and make them work together. I'm involved in the OpenBSD development, and relying on OpenBSD to record my music reminds you that developers actually use the code they write.

The following hardware was used:

  • a low profile i386 machine running -current
  • a envy(4) based audio card (ESI Julia)
  • a MIDI master keyboard (Studiologic SL-990)
  • umidi(4) based synth module (Roland XV-2020)
  • analog mixer, speakers, headphones, microphone
and the following software:
  • midish as a MIDI sequencer
  • aucat(1) to play, record and mix .wav tracks
  • a small home-made soft synth (not released yet)
  • sndiod as glue to make above work together in sync
  • lame, mpg321, mp3info, vorbis-tools, oggtag

The first step consisted in finding a melody, i.e. playing the piano and/or the melodica until something nice pops up. This also includes, discussing with Guillaine, drinking beer and so on.

The next step was to find a nice arrangement. This requires a lot of experimenting and recording all the instruments one-by-one. That's the point where OpenBSD starts being involved. I used three kind of instruments:

The hardware synth (used for drums, bass, piano, strings).

It synthesizes in real-time what I play as well as MIDI tracks recorded in midish with the MIDI keyboard. In other words during playback, MIDI events are replayed and sent to the hardware synth which generates the sound, there are no .wav files involved at this stage.

Acoustic instruments, like the melodica.

It's recorded with a microphone as a .wav file using aucat(1); aucat is started with MIDI control enabled (-qt options) in a way it's controlled by midish (aka MMC control) for the start, stop, and relocate operations. Furthermore midish is configured to use the sound card clock (aka MTC clock) as time reference as exposed by sndiod(1), this is an easy way we have to keep MIDI tracks perfectly synchronized to audio tracks.

Software synth (used for the "wind" sound).

It's the same as a hardware synth, except that the sound is generated by a process running on the computer and thus the output is on the sound card. The soft synth is controlled by midish using a sndio(7) midithru port as if it was a hardware synth connected to a hardware port. Since soft synths are low-latency hard real-time programs, sndiod must be started with small buffers (ex. -z240 or -z120). OpenBSD is not a real-time system but is pretty good, provided that CPU-intensive kernel code is avoided.

This step is quite long; it includes various volume and effects adjustments in order to make it sound well.

Once everything sounds perfect, the next step is to "convert" MIDI parts to .wav files that can be mixed together to obtain the final mix. To record the hardware synth, the usual approach is simply to plug the synth output to the sound card input and to record it as if it was an acoustic instrument. A similar approach can be used to record the soft synth, except that sndiod(1) playback stream (produced by the synth) is recorded instead of the sound card input.

Finally, the last step was to mix all the .wav files together using aucat off-line mode (-n option) and to compress them to MP3 and OGG files.

Thanks to Alexandre for the story behind Sonate aux Insomniaques. If you haven't heard it yet, make sure to download it in either OGG Vorbis (5.7MB) or in MP3 format (5.9MB). If you enjoy the OpenBSD release songs, make sure to buy the 4.1 - 5.1 Songs.

(Comments are closed)


Comments
  1. By phessler (phessler) spambox@theapt.org on http://theapt.org

    The opening had a very Radiohead-esque feeling to it. Very nice song, and quite enjoyable to listen to. :)

    Comments
    1. By laudarch (laudarch) on

      This is really great, I love the song and so does my 2 month
      old baby boy and my sweet wife. I have attempted making music
      on OBSD before; I used audacity(for recording) and oxygen for
      drums.

      PS: I put my son to sleep with the song on continuous replay

      Great Job once again.

  2. By Amir Samiremov (Amir) osem@gmx.net on Amir

    Great work and nice thought - the song is nice!

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]