bitwig-multisamplegen
Advanced tools
Comparing version 0.1.5 to 1.0.0
@@ -223,2 +223,3 @@ #!/usr/bin/env node | ||
const AUTHOR_NAME = 'Trapcodien'; | ||
const MULTISAMPLE_FILE = 'multisample.xml'; | ||
@@ -373,8 +374,8 @@ const DEFAULT_VELOCITY = 127; | ||
const generateMultiSampleXml = samples => { | ||
const generateMultiSampleXml = (instrumentName, author, samples) => { | ||
let xmlResult = `<?xml version="1.0" encoding="UTF-8"?> | ||
<multisample name="Generated Instrument"> | ||
<multisample name="${instrumentName}"> | ||
<generator>Bitwig Studio</generator> | ||
<category></category> | ||
<creator>Trapcodien</creator> | ||
<creator>${author}</creator> | ||
<description></description> | ||
@@ -414,3 +415,5 @@ <keywords></keywords> | ||
const zip = new JSZip(); | ||
zip.file(MULTISAMPLE_FILE, generateMultiSampleXml(samples)); | ||
zip.file(MULTISAMPLE_FILE, generateMultiSampleXml(givenPackageName, AUTHOR_NAME, samples), { | ||
compression: 'DEFLATE' | ||
}); | ||
const spinner = ora('Copy sample files...').start(); | ||
@@ -422,3 +425,5 @@ | ||
return Promise.resolve(fs.promises.readFile(filename)).then(function (buffer) { | ||
zip.file(sample.name, buffer); | ||
zip.file(sample.name, buffer, { | ||
compression: 'DEFLATE' | ||
}); | ||
}); | ||
@@ -425,0 +430,0 @@ }); |
{ | ||
"name": "bitwig-multisamplegen", | ||
"version": "0.1.5", | ||
"version": "1.0.0", | ||
"description": "Generate multisample xml file from samples ", | ||
@@ -5,0 +5,0 @@ "author": "guillaumearm", |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
62698
426
0