Unknown Functions 'set' & 'getRange'
-
@trillbilly Is it because the sample map is not loaded?
-
@d-healey You're right, when I load an internal sample map, it works. But it wont work anymore with Drag-And-Drop samples.
I would rather use the sample maps from internal samples, but, you cant edit the loop range. I've made a post about it HERE.
Also, obiviously Im using custom sample import so users can use their own samples. Im confused why it doesnt recognize them as sample maps anymore?
-
@d-healey Ok, scratch that. its working ONLY if there is a sample loaded. If the sampler is cleared, it throws the error.
If you save a preset without a sample/samplemap loaded, it will save but crash upon opening it again.
-
@trillbilly So before you try to call a function on the
sound
object you need to check if the object is populated.if (!isDefined(sound)) return;
-
@d-healey That will work better than my idea of populating an empty samplemap when a sampler is not in use. Thank you.
-
@d-healey It solved the
sound.set
issue but not thesound.getRange
issue. -
@trillbilly This line?
local newValue = parseInt(sound.getRange(Sampler1.LoopXFade)[1] * value);
-
@d-healey Yes, that is correct
-
@trillbilly And you tried placing the check before it?
-
@d-healey No, Im an idiot, I only put it in 1 callback.
Worked like a charm. Much appreciated.