Author: Barry van Oudtshoorn

  • [Music] If only for you

    I love glitch kits. Perhaps its the strong transients or the unique timbre — whatever it is, though, they lend a unique sound to a piece. In this track a glitch kit is combined with a few synths, some tuned gongs, recorders, accordions, and other eclectic instruments to produce something that doesn’t fall neatly into any specific genre, but that’s hopefully nonetheless enjoyable.


    (Download higher-quality mp3)

    Creative Commons License
    If only for you by Barry van Oudtshoorn is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

  • [Music] Tasman

    This is a more laid-back track that mixes ambient synths with viola, violin, and flute. It’s in a similar vein to “Terminal” from a year or two ago, but somewhat simpler and lighter in its execution.


    (Download mp3)

    Creative Commons License
    Tasman by Barry van Oudtshoorn is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

  • [Music] Teflon smile

    This is an almost-chiptune track. I’ve always enjoyed chip music, but I’ve not written much of it myself. This isn’t strictly chip (modern synths and samplers), but it’s certainly reminiscent.


    (Download mp3)

    Creative Commons License
    Teflon Smile by Barry van Oudtshoorn is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

  • There was a young lady…

    There was a young lady from Libya,
    Who marketed cows in Namibia.
    “What nice calves!” a man said;
    And her face turned bright red,
    As she daintily covered her tibia.

  • Determining a table cell’s x and y position/index

    When working with HTML tables, we often want to extract the column and row index for a particular cell. Easy enough, surely — just use row.rowIndex and cell.colIndex, right? Well, no.

    The spanner in the works

    …is the presence of cells that span rows or columns (apologies for the terrible pun). For example, in the following table:

    abcd
    efg
    hij
    klmn

    the column index of cell “g” is reported by the browser to be 2 — when in fact it should be 4!

    The solution

    Fortunately, there is a solution. The code below is based on this very old example by Matt Kruse. I updated it, tidied it up, and MooTools-ified it.

    Usage

    Simply call “getCellCoords” on the (header) cell you’re interested in. This will return an object containing “x” and “y” members — the column and row index, respectively.

    The code

  • [Music] Rising

    It’s been a while since I last wrote a wholly-orchestral piece. As I was writing this one, I toyed with the idea of turning it into an industrial piece, à la Conflagration, but ultimately rejected that path.

    Dark in parts, fanfare-like in others, and with a playful duet between flute and bassoon towards the end, Rising is quite certainly programmatic (that is, it constructs a narrative). The story that it tells — well, I’ll leave that open to your interpretation.


    (Download higher-quality mp3)

    TrackPerformer data

    I’ve extracted the performance data from Rising, so that if you want to, you can build a TrackPerformer performance of the piece. Download rising.js to get started. Follow along with my TrackPerformer step-by-step — with the template in hand, you can safely skip large chunks of the step-by-step. You’ll mostly need to focus on steps 1, 5, 6, 7, and 8.

    If you do build a performance, let me know about it! I’m tempted to start releasing the data for my other tracks as well, so if you’d like to build a performance for any of my pieces, just let me know in the comments.

    Creative Commons License
    Rising by Barry van Oudtshoorn is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

  • [Music] Tabula Rasa

    This is a more down-beat, semi-acoustic, easy-listening pop track — just waiting for lyrics and vocals. For those interested, the primary chord progression is A, F#m7, Fmaj7, Esus7 – E. It’s a somewhat melancholy progression, suited to subtly-changing ostinati, and lightly-improvised piano and bass lines.

    There are lots of Guitar Rig effects at play in this one, mutilating sounds from FM8, Massive, Battery, Kontakt, and Absynth. Guitar Rig has become my go-to VST effect — even though I don’t actually use guitars all that much in my music!

    [audio:http://www.barryvan.com.au/music/Tabula rasa.mp3]
    (Download)

    Creative Commons License
    Tabula Rasa by Barry van Oudtshoorn is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

  • [Music] Skyclad

    Ah, synthpop! Ah, 7/8! I have a fondness for both, and so it seemed only natural to bring them together.

    [audio:http://www.barryvan.com.au/music/Skyclad.mp3]
    (Download)

    Creative Commons License
    Skyclad by Barry van Oudtshoorn is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

  • TrackPerformer step-by-step

    I’ve had a request to put together a guide explaining exactly how to build a performance using TrackPerformer. This post will walk you through the process, from preparation to presentation.

    Please note that this guide assumes you are working with an Impulse Tracker or OpenMPT module; if you are not, you will have a bit more work to do.

    Ingredients

    To build your performance, you will need the following items:

    • The original module file (IT or MPTM format)
    • The exported audio file (preferably in OGG, MP3, and M4A formats, for maximum cross-browser compatibility)
    • A copy of the ModReader source (which you can download from GitHub)
    • A copy of the TrackPerformer source (which you can also download from GitHub)
    • A decent plain text editor (not Word) — I recommed Komodo IDE or Komodo Edit.
    • A recent and decent web browser — Firefox, Chrome, or Opera work best.

    With these in hand, you’re ready to get going!

    Method

    1. Set up

    If you haven’t already, extract TrackPerformer to the folder of your choice. When you do so, you’ll notice that there are several sub-directories: “Examples”, “Source”, and “Utilities”. Create a new directory, called “Performances”.

    Copy the file “template.html” from the “Examples” directory, renaming it to the name of your track.

    Next, copy your exported audio files into the “Performances” directory; ensure that they all have the same file name (bar the extension).

    Create a new, blank file, with a “.js” extension and named the same as your track. Load this file in your editor.

    Finally, load the HTML file in your editor, and add a <script> tag just before the closing </head> tag that references your JS file. For example, if your JS file was named “purple.js”, you would type:

    <script type="text/javascript" src="purple.js"></script>

     2. Conversion

    The next step is to convert your file into a format that TrackPerformer understands. This means noting down when every note is played, and by which instrument. It also means extracting information such as the tempo, time signature, and song title.Fortunately, if you’re using an IT or MPTM module, the ModReader utility is able to perform this (rather tedious) step for you.

    If you are not using a format that ModReader is able to convert, you will need to complete this step manually. If your file can be opened in OpenMPT, it is possible to use a JavaScript macro in Komodo IDE/Edit to facilitate this; otherwise, you will need to craft the entire lot by hand.

    If you have not already done so, extract the ModReader zip file to a suitable location. Then, in your web browser, load the “index.html” file from that location.

    Select the file you would like to convert. Note that ModReader does all of its processing on your computer — it doesn’t send your file anywhere, and won’t change its contents, either.

    All going according to plan, there should now be a lot more text on-screen. Copy everything between the dashed lines (not including the lines), and paste it into your performance’s JS file. This is the TrackPerformer-compatible version of your module,in a format known as JSON.

    3. Write some JavaScript

    As I said earlier, ModReader gives you a JSON representation of your track, which is great. However, we need to now pass this representation through to TrackPerformer. To do this, we need to write some JavaScript to go around this JSON representation. Edit your JS file so that it looks something like this:

    [sourcecode language=”javascript”]window.addEvent(‘domready’, function() {
    var controller = window.controller = new barryvan.tp.Controller({
    background: ‘rgba(230,230,230,0.5)’,
    meta: {
    colour: ‘rgba(0,0,0,0.5)’,
    visible: false
    }
    }, $(‘container’) || document.body);
    controller.perform({
    title: ‘Foo bar baz’
    /* the rest of the track… */
    });
    });[/sourcecode]

    What we’re doing here is creating a new Controller, and telling it to perform the track.

    4. Make some noise

    The next step is to point TrackPerformer at the MP3, OGG, and M4A exports of the music. To do this, find the line in your JS file that reads

    "audio": ""

    . In the empty quotes, put in the filename of your audio (without any extension). If your audio is on the web, put in the full URL (again, without the extension). Your JS file will now look something like this:

    [sourcecode language=”javascript”]{
    /* snip */
    “audio”: “mice”
    /* snip */
    }[/sourcecode]

    Now, load up your HTML file in your web browser. You should be able to listen to your track. Next up, we’ll add a performer.

    5. Add a performer

    Each instrument in your piece can have zero or more performers assigned to it. There are a variety of performers that you can use, each of which offers a unique visual representation of your music. Each performer has a variety of options which affect its function and appearance. These include colour, size, position, vitality, and many others.

    Each performer is defined in a code block that looks something like this:

    [sourcecode language=”javascript”]{
    performer: barryvan.tp.performer.Oscillator,
    options: {
    colour: ‘#f00’,
    stepSize: 10,
    sustain: true,
    middle: 58
    }
    }[/sourcecode]

    The block above means that we want an Oscillator (performer: barryvan.tp.performer.Oscillator). We have set some of its options (options: { … }) such that it is bright red (colour: ‘#f00’), that a semitone is 10 pixels in size (stepSize: 10), and that its middle note (vertically centred in the performance) is 58 (middle: 58), or A#4.

    If you look at your JS file, you should see a section labelled “instruments”, which will look something like this:

    [sourcecode language=”javascript”]”instruments”: [
    {
    “name”: “Melody”,
    “performers”: []
    }
    ][/sourcecode]

    Put the performer’s code block between the [], like so:

    [sourcecode language=”javascript”]”instruments”: [
    {
    “name”: “Melody”,
    “performers”: [{
    performer: barryvan.tp.performer.Oscillator,
    options: {
    colour: ‘#f00’,
    stepSize: 10,
    sustain: true,
    middle: 58
    }
    }]
    }
    ][/sourcecode]

    Now, if you reload your performance in your web browser, you should have something on-screen. You can add more performers to the other instruments in your piece in the same way. If you want more than one performer for the same instrument, you can simply place a comma after the closing brace of the performer block, and start the next one.

    6. Add some filters (optional)

    Filters can manipulate the entire presentation. They can, for example, shift pixels around, draw a grid, or simply calculate the framerate.

    Filters are applied to each frame of the animation, and can be applied before or after the performers have been processed. Filters that are processed at the start of each frame go under “prefilters”; those processed at the end of each frame are entered under “postfilters”.

    Let’s shift some pixels around using the “Pick” filter. Like performers, filters are defined in a block of code:

    [sourcecode language=”javascript”]{
    filter: barryvan.tp.filter.Pick,
    options: {
    fuzz: 2
    }
    }[/sourcecode]

    We’ll add this into the “prefilters” section:

    [sourcecode language=”javascript”]”prefilters”: [][/sourcecode]

    becomes

    [sourcecode language=”javascript”]”prefilters”: [{
    filter: barryvan.tp.filter.Pick,
    options: {
    fuzz: 2
    }
    }][/sourcecode]

    If you reload your performance in your web browser, things should look a little more fuzzy.

    Filters can have a huge impact on the overall “feel” of your performance. They can soften the performers’ hard edges, and give the entire performance a more natural appearance.

    7. Present

    Once you’ve added more performers, adjusted colours, and fiddled with the CSS on your HTML file, you’re ready to take to the stage. Simply upload the “Source” directory and your performance to your webserver (making sure to keep relative paths intact), and publish the URL. You don’t need to do anything on the server: TrackPerformer is entirely client-side.

    8. Ask questions

    If you run into problems, or have a question, don’t hesitate to leave a comment or raise an issue on GitHub. You’re also more than welcome to fork the project, and build your own performers and filters — if they’re pulled back into the main TrackPerformer tree, then everyone else can use them, too!

    Appendix

    A. Converting notes to numbers

    Notes are in the range C-0 to B-9, and are numbered from 0 to 119. To find the number for a particular note, use this formula: x = note + (octave * 12). In this formula, the note C is 0, C# is 1, D is 2, and so on.

    B. TrackPerformer Wiki: performers, formats, etc.

    The TrackPerformer Wiki has details on all of the performers, the performance format, the filters that are available, and the controller options.

  • TrackPerformer update

    I’ve added in some really exciting new features to my TrackPerformer project, as well as three new performances: We Three Kings, Carol of the Bells, and Joy to the World.

    Filters

    It’s now possible to add filters, or effects, into the processing chain. These filters can be applied before any performers (pre-filters) or after all performers (post-filters). At the moment, the included filters are:

    • FPS: Calculates the average framerate across the performance, optionally displaying it in a DOM element.
    • Grid: Draws a grid to the canvas. The grid may be a simple intersection grid (points), or lines. Both the X and Y axes may be independently configured.
    • Pick: Probably the most interesting (and processor-intensive) part of TrackPerformer. The Pick filter will randomly swap a pixel with one of its neighbours. It’s used at full intensity on both We three Kings and Joy to the World, and, when toned down a little for Carol of the Bells, provides a softening, organic effect.

    I’ve got some ideas for more filters down the track… The only difficulty is keeping performance acceptable: manipulation of the canvas pixel by pixel is quite slow in current browsers.

    Performers

    There are a couple of new performers, and some minor updates to some of the existing ones. The Oscillator performer, in particular, is rapidly becoming the most flexible and useful of the performers.

    • There’s a new ShimmerGrid performer, which is great for adding texture and movement to the entire canvas. You can see it in action particularly well on Joy to the World.
    • The Swarm performer can now draw its particles as knots (like the SignalTracker), as well as as dots.
    • The Oscillator now has the ability to draw sustained notes, and to increase the longevity of notes. Take a look at Carol of the Bells to see these new options in use.
    • Notes can now be filtered based not only on their pitch, but also their velocity (volume).

    There are a couple of other changes here and there, but these are the main ones.

    We Three Kings

    The three new example tracks are all taken from We Three Kings, my new Christmas remix album. Why not go and have a listen?

  • TrackPerformer

    TrackPerformer provides a visual stage for your music, using HTML5 canvas and audio. On that stage, performers “play” the instruments in the music visually. In other words, it’s a visualisation system for music, but based on the notation (the abstract) rather than the audio (the manifestation).

    Essentially, you take a piece of music, convert it into a format that TrackPerformer understands (JSON), describe how you want it to be performed, and then watch! You can, of course, write your own performers.

    Before going any further, let’s see it in action. The music is “Colony”, a new piece that I wrote about a week ago.

    Note: You won’t be able to view the performance linked above in Internet Explorer, due to its over-aggressive script-blocking: the scripts served from GitHub have the wrong mime-type, so IE won’t let them run.

    Take a look at the project on GitHub to see how it all fits together. TrackPerformer itself resides in the “Source” directory; in “Examples”, you’ll find the performance of Colony; in “Utilities”, there’s a JavaScript macro for Komodo IDE/Edit that will help you to translate copied-and-pasted OpenMPT pattern data into TrackPerformer’s JSON format.

    You can find more information on the TrackPerformer wiki, including an outline of the format, and some basic instructions for getting started. I’ll be adding more information to the wiki over the next few days, and I’ll post updates here too.

    Let me know what you think!

  • [Music] Conflagration

    I’ve been meaning to write a piece in this idiom for years. It’s an industrial/orchestral hybrid. I don’t know why, but I always find this style of music fun, notwithstanding its occasional heaviness.

    More of the usual Native Instruments suspects at play in this piece: Kontakt, Massive, FM8, and Battery. All of them driven by OpenMPT and Xlutop Chainer.

    [audio:http://www.barryvan.com.au/music/Conflagration.mp3]
    (Download)

    Creative Commons License
    Conflagration by Barry van Oudtshoorn is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.