# drumkitxml

> Generate a drumkit.xml for Hydrogen from a folder with samples

Latest version **1.0.3** (published 2017-11-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install drumkitxml
pnpm add drumkitxml
yarn add drumkitxml
bun add drumkitxml
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2017-11-03 |
| First published | 2017-11-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jean-Philippe Ruijs |
| Maintainers | ruijs |
| Keywords | generate, hydrogen, drumkit, xml, samples |

## Links

- npm: https://www.npmjs.com/package/drumkitxml
- npm.io page: https://npm.io/package/drumkitxml

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2017-11-03
- 1.0.2 — 2017-11-03
- 1.0.1 — 2017-11-03
- 1.0.0 — 2017-11-03

## 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

 * 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>
        ....
```

---
_Source: https://npm.io/package/drumkitxml · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
