2 |
* * |
* * |
3 |
* LinuxSampler - modular, streaming capable sampler * |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
* * |
5 |
* Copyright (C) 2010 - 2015 Andreas Persson * |
* Copyright (C) 2010 - 2019 Andreas Persson * |
6 |
* * |
* * |
7 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
8 |
* it under the terms of the GNU General Public License as published by * |
* it under the terms of the GNU General Public License as published by * |
279 |
if (nbDimensions) { |
if (nbDimensions) { |
280 |
int c = len[nbDimensions - 1]; |
int c = len[nbDimensions - 1]; |
281 |
for (dim = nbDimensions - 2 ; dim >= 0 ; dim--) { |
for (dim = nbDimensions - 2 ; dim >= 0 ; dim--) { |
282 |
const DimDef& dimDef = dimDefs[dims[dim]]; |
int min; |
283 |
int max = dimDef.max == -1 ? 127 : dimDef.max; |
int max; |
284 |
for (int i = dimDef.min ; i <= max ; i++) mapArr[dim][i] *= c; |
if (dim < dims.size()) { |
285 |
|
const DimDef& dimDef = dimDefs[dims[dim]]; |
286 |
|
min = dimDef.min; |
287 |
|
max = dimDef.max == -1 ? 127 : dimDef.max; |
288 |
|
} else { |
289 |
|
min = 0; |
290 |
|
max = 127; |
291 |
|
} |
292 |
|
for (int i = min ; i <= max ; i++) mapArr[dim][i] *= c; |
293 |
c *= len[dim]; |
c *= len[dim]; |
294 |
} |
} |
295 |
} |
} |