I have the same problem but using a knob, even in the preset the sample configuration is not saved when exporting the plugin echo the option to activate the loop is disabled because a function is missing but I don't understand which one
this code is thanks to @MikeB :thumbs_up_medium_skin_tone:
// Load Audiofiles into pool ----------------------------------------------------------------------------------------------
Engine.loadAudioFilesIntoPool();
//--------------------------------------------------------------------------------------------------------
// const vars----------------------------------------------------------------------------------------------
const var AudioLoopPlayer = Synth.getChildSynth("Sampler");
const var Random = Content.getComponent("Random");
const var Knob62 = Content.getComponent("Knob62");
const var Next = Content.getComponent("Next");
const var Prev = Content.getComponent("Prev");
//--------------------------------------------------------------------------------------------------------
// Array Samples in AudioFiles-Folder----------------------------------------------------------------------
const var inst = ["sample1.wav","sample2.wav"];
//--------------------------------------------------------------------------------------------------------
//Knob1 Sample selection---------------------------------------------------------------------------------
inline function onKnob62Control(component, value)
{
Synth.getAudioSampleProcessor("Sampler").setFile("{PROJECT_FOLDER}"+inst[value]);
};
Content.getComponent("Knob62").setControlCallback(onKnob62Control);
//--------------------------------------------------------------------------------------------------------
// Random Button------------------------------------------------------------------------------------------
Random.setControlCallback(onRandom_Control);
inline function onRandom_Control(component, value)
{
if (value)
{
Knob62.setValue((Math.randInt(0, 70)));
Knob62.changed();
}
};
//--------------------------------------------------------------------------------------------------------
// Prev-Button----------------------------------------------------------------------------------------------
inline function onPrevControl(component, value)
{
if (value)
{
Knob62.getValue() > Knob62.get("min") ? Knob62.setValue(Knob62.getValue() - 1) : Knob62.setValue(Knob62.get("max"));
Knob62.changed();
}
};
Content.getComponent("Prev").setControlCallback(onPrevControl);
//--------------------------------------------------------------------------------------------------------
// Next-Button ----------------------------------------------------------------------------------------------
inline function onNextControl(component, value)
{
if (value)
{
Knob62.getValue() < Knob62.get("max") ? Knob62.setValue(Knob62.getValue() + 1) : Knob62.setValue(Knob62.get("min"));
Knob62.changed();
}
};
Content.getComponent("Next").setControlCallback(onNextControl);
//--------------------------------------------------------------------------------------------------------