======Documentation: File Formats======
This page describes the file formats used by the DrumGizmo engine. For ease of use we have implemented everything using xml. The main files are the drum kit files, the instrument files and the midi map files. These are described in detail below.
=====New file format (version 0.9.17 and up)=====
====Drumkit xml format====
1.2.3
Test Kit
This is the description of the drumkit
Creative Commons
These are general notes concerning anything of relevance for this particular version of the drumkit
Author of the drumkit
author@email.org
http://www.drumgizmo.org
Ambience left
Ambience right
KickDrum left
KickDrum right
Overhead left
Overhead right
Ride left
Ride right
Snare bottom
Snare top
Floor tom
Kickdrum trigger
Most of the format is self-explanatory. Following is a quick rundown of the things that might not seem so obvious.
===drumkit node===
The drumkit main node only has one attribute which is the version attribute. Use this to do version control of your kit over time. This must use the x.y.z versioning format.
//Bent: We should use the version attribute for file format versioning and add a version tag in the metadata section instead.//
===metadata node===
Explained in the code above. It's self-explanatory.
===defaults node===
Tells DG what the default settings of the DG knobs are. In future releases there will be "reset to default" buttons in the gui which will use these default values. This node is currently not finalized and can be ignored until it's implemented.
//Muldjord: I'm not sure this makes sense. Knobs will change over time, which will quickly outdate the format. We should probably deal with this using presets inside the gui instead.//
===channels node===
The channel nodes manage the available channels that DG will create when loading the drumkit. These are the actual output channels that you will map in your DAW. You can have as many channels as you like. Each channel has metadata applied which currently is "title" and "microphone". These will be shown in the gui.
//Bent: We should think of a better name for the 'microphone' tag since not all audio sources are microphones (eg. trigger or other line signals). But maybe this information doesn't even make sense to store in the drumkit, if for example a cowbell recording is used from another recording setup, but mixed into the OH channels...//
//Muldjord: We'll change this to "source"//
===instruments node===
This node defines what instruments are used by the drumkit. "name" is a semantic name used by the midimap xml file. "file" defines what xml file to load for this particular instrument. "group" tells DG that this instrument is part of a group of instruments, for instance "hihat". Whenever a hit is detected on other instrument with a similar group name, DG will fade the other hit and begin playing the new one. This is very useful for close, open and pedal hihat hits.
The channelmap node connects the instrument channels to the DAW output channels. The "in" and "out" names DO NOT have to be the same. The "in" channel is defined withing the instrument.xml file itself. "bleed" tells what the default bleed for this instrument on this particular channel is supposed to be as default. A "reset to default" button in the DG ui will be introduced at some point, that resets all bleed to use these values". The "main" attribute tells DG that his channel is a main channel for this particular instrument. This is connected to the main bleed fader in DG which then can be set to never influence channels marked as main.
====Midimap xml format====
===midimap node===
The "note" attribute is the midi note value that will be connected. "instr" is the name defined in the "instrument" node in the drumkit xml file. A hit on this particular midi note will then play all channels of that particular instrument.
====Instrument xml format====
The instrument title
The instrument brand and further description
GPL
These are general notes concerning anything of relevance for this particular version of the instrument
Author of the instrument
author@email.org
http://www.drumgizmo.org
This file contains the complete description of one instrument.
===instrument node===
Contains the instrument "version" attribute. Must use the x.y format.
===metadata===
Self-explanatory.
===samples node===
"name" is a unique identifier for this particular sample/hit. "power" is an arbitrary attribute telling DG what power this particular hit/sample has in relation to the power attribute for the other hits defined in this file.
===audiofile node===
"channel" is the name used in the drumkit xml file to connect the instrument channel to the DG output channel. "file" tells what wav file to use. "filechannel" tells what channel inside that wav to use.
=====Drumkit xml format (versions before 0.9.17)=====
This example defines 16 output channels. It then loads the instrument contained in "Hihat/Hihat.xml" and maps the instrument output channels to the drumkit output channels. The instrument and drumkit output channels DO NOT need to be the same (in this case they are though). This makes it possible to merge instruments from physically different drumkits into one drumkit configuration.
The name and description attributes are not currently in use, but are useful for people editing the files.
The "group" attribute in the instrument node is used to bind several instruments into a group. For instance you can have "open hihat" and "closed hihat" being part of the group "hihat". The only effect this has is that whenever a closed hihat hit is played just after an open hihat hit, it will quickly fade the open hihat hit while play the closed hihat hit.
====Instrument xml format====
This file contains the complete description of one instrument.
===instrument node===
Contains the instrument "version" attribute. Must use the x.y format.
===samples node===
"name" is a unique identifier for this particular sample/hit. "power" is an arbitrary attribute telling DG what power this particular hit/sample has in relation to the power attribute for the other hits defined in this file.
===audiofile node===
"channel" is the name used in the drumkit xml file to connect the instrument channel to the DG output channel. "file" tells what wav file to use. "filechannel" tells what channel inside that wav to use.