bitwig-multisamplegen
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -70,2 +70,10 @@ #!/usr/bin/env node | ||
const getVelocity = parsed => { | ||
if (parsed.velocity === undefined) { | ||
return DEFAULT_VELOCITY; | ||
} | ||
return parsed.velocity; | ||
}; | ||
const getNoteNumber = parsed => { | ||
@@ -101,3 +109,3 @@ const note = parsed.note.toUpperCase(); | ||
const n = Number(k); | ||
result[n] = ramda.sortBy(x => x.velocity ?? DEFAULT_VELOCITY, result[n]); | ||
result[n] = ramda.sortBy(x => getVelocity(x), result[n]); | ||
}); | ||
@@ -110,3 +118,3 @@ return result; | ||
return parsed.reduce((acc, parsed) => { | ||
const velocityMax = parsed.velocity ?? DEFAULT_VELOCITY; | ||
const velocityMax = getVelocity(parsed); | ||
const sample = { | ||
@@ -150,3 +158,3 @@ name: parsed.fullname, | ||
if (isNaN(parsed.velocity ?? 127)) { | ||
if (isNaN(getVelocity(parsed))) { | ||
ora(`unable to parse velocity: '${res[4]}'`).fail(); | ||
@@ -153,0 +161,0 @@ return null; |
{ | ||
"name": "bitwig-multisamplegen", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Generate multisample xml file from samples ", | ||
@@ -5,0 +5,0 @@ "author": "guillaumearm", |
Sorry, the diff of this file is not supported yet
48794
233