sample import detune load setting
This commit is contained in:
parent
1b712e03ee
commit
52eac7e3c6
3 changed files with 22 additions and 9 deletions
|
|
@ -402,13 +402,12 @@ std::vector<DivSample*> DivEngine::sampleFromFile(const char* path) {
|
|||
{
|
||||
// There's no documentation on libsndfile detune range, but the code
|
||||
// implies -50..50. Yet when loading a file you can get a >50 value.
|
||||
// disabled for now
|
||||
/*
|
||||
if(inst.detune > 50)
|
||||
inst.detune = inst.detune - 100;
|
||||
short pitch = ((0x3c-inst.basenote)*100) + inst.detune;
|
||||
sample->centerRate=si.samplerate*pow(2.0,pitch/(12.0 * 100.0));
|
||||
*/
|
||||
if (getConfInt("sampleImportInstDetune", 0)) {
|
||||
if(inst.detune > 50)
|
||||
inst.detune = inst.detune - 100;
|
||||
short pitch = ((0x3c-inst.basenote)*100) + inst.detune;
|
||||
sample->centerRate=si.samplerate*pow(2.0,pitch/(12.0 * 100.0));
|
||||
}
|
||||
if(inst.loop_count && inst.loops[0].mode >= SF_LOOP_FORWARD)
|
||||
{
|
||||
sample->loop=true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue