drumkitxml
v1.0.3
Published
Generate a drumkit.xml for Hydrogen from a folder with samples
Downloads
8
Maintainers
Readme
drumkitxml
This package generates a working drumkit.xml
file for Hydrogen.
Changes
1.0.3
- Keywords for better indexing on NPM
1.0.2
- Only import path required. Less mandatory, more optional with default values
- default export destinaiton
- default extension wav
- default metadata; author, info, name
- Only import path required. Less mandatory, more optional with default values
1.0.1 more doc
1.0.0 init
Install
npm install -s drumkitxml
Example
Required/Mandatory
- Create a file or run from command line if you prefer:
const dkx = require('drumkitxml');
- The an input path with your samples would be nice, actually mandatory:
const samplesPath = './my808/';
Optional
- You might want to specify the extensions in case of multiple export formats in directory/path/folder, default
wav
.
const extension = 'flac';
- Where to export the file. default
./drumkit.xml
const exportFile = './test_drumkit.xml';
- Metadata for the header
const name = 'Linn';
const info = `Drum samples from Linn
http://www.wavealchemy.co.uk/drum-samples/ty1/
Generated at ${new Date().toISOString()}`;
const author = 'Wave Alchemy';
const license = 'Wave Alchemy says use for free but not for commercial use';
- Finally:
dkx(samplesPath, extension, exportFile, name, author, info, license);
- Results:
<drumkit_info>
<name>Linndrum</name>
<author>Wave Alchemy</author>
<info>Linndrum samples
http://www.wavealchemy.co.uk/drum-samples/ty1/
Generated at 2017-11-03T00:29:03.957Z</info>
<license>undefined</license>
<instrumentList>
<instrument>
<id>0</id>
<filename>cabasa_01_t1.wav</filename>
<name>cabasa_01_t1</name>
<volume>1</volume>
<isMuted>false</isMuted>
<pan_L>1</pan_L>
<pan_R>1</pan_R>
</instrument>
<instrument>
<id>1</id>
<filename>cabasa_01_t2.wav</filename>
<name>cabasa_01_t2</name>
<volume>1</volume>
<isMuted>false</isMuted>
<pan_L>1</pan_L>
<pan_R>1</pan_R>
</instrument>
<instrument>
<id>2</id>
<filename>cabasa_01_t3.wav</filename>
<name>cabasa_01_t3</name>
<volume>1</volume>
<isMuted>false</isMuted>
....