MIDI Block Samples

Back

Back - to Cocoon Samples main page
Back - to Cocoon Blocks Samples main page

What is the MIDI block?

The MIDI block currently gives you an XMidiGenerator to generate an XML representation of any MIDI file (called XMidi by its author Peter Loeb). There is also the XMidiSerializer to render XMidi back as a MIDI file. I have used XSLT to provide some basic musical manipulations such as transposition, and inversion. Retrograde is harder, but I shall see what I can come up with. Hopefully I shall also add some transformers to generate SVG visualisations of the XMidi, starting with normal western musical notation.

MIDI Documentation - Documentation available on the Cocoon Wiki.

A Cocoon signature tune

A Short MIDI File - This is a little ditty I wrote on the notes you get if you take the letters of the word "Cocoon" (using A=A, B=B, ... G=G, H=A, I=B etc.) You get C-A-C-A-A-G: very catchy.
The XMidi Generator - The previous file rendered as XMidi, using the XMidiGenerator.
The XMidi Serializer - The XMidi output of the previous pipeline rendered again as MIDI, using the XMidiSerializer.

Bach's Prelude No.1 in C, BWV846a

A Longer MIDI File - Bach's Prelude No.1 in C, BWV846a , sequenced by B.R.Guillaud and available from The Classical Music Archives (see below).
The XMidi Generator - The previous file rendered as XMidi, using the XMidiGenerator. Be warned, your browser may take some time to render the XML. As the emperor of Austria supposedly said to Mozart, "Too many notes!"
The XMidi Serializer - The XMidi output of the previous pipeline rendered again as MIDI, using the XMidiSerializer.

Transposition

A Cocoon signature tune - You sing bass? Want it lower?
Bach's Prelude No.1 in C#, BWV846a +1 - Transposing Bach with XSLT. What next?
Bach's Prelude No.1 ad absurdum, BWV846a +24 - Bach that only dogs can hear.

Inversion

A Cocoon signature tune - Upside down "Cocoon"? Sure is. I haven't worked out what this spells.
Bach's Prelude No.1 in C, BWV846a - This is our familiar prelude turned on its head. As Schoenberg said, this hat is still a [beautiful] hat whichever way you look at it.

Reference

The Original XMidi Home Page - This is the origin of a lot of the source code in the generator and serializer. This code, and the XMidi format itself were created by Peter Loeb. Many thanks to Peter for permission to use his source code.
The Classical Music Archives - A large site offering classical music in MIDI and audio formats.