SAMPLER LOOP MODE ON/OFF
-
Does anyone know if there's a way to toggle the sampler's loop mode on and off?
-
That's not the sampler's loop mode, that's the sample's loop button.
-
@d-healey Can I script it?
-
@DanH if you run this, you'll get the attributes you can access:
for(i=0;i<Sampler1.getNumAttributes();i++) Console.print(Sampler1.getAttributeId(i));
-
@ustk Thanks, it's not in there so was wondering if anyone knew if there was a way - sometimes the APIs aren't listed but are there
-
@DanH Figured it out:
inline function onSAMPLERLOOPControl(component, value) { for(s in Sampler1.createSelection(".*")) { s.set(Sampler.LoopEnabled, value); } }; Content.getComponent("SAMPLERLOOP").setControlCallback(onSAMPLERLOOPControl);
-
@DanH Thank you ... I am trying your Code but ending up with error...
Here is the Code
Content.makeFrontInterface(500, 400); const var SAMPLERLOOP = Content.getComponent("SAMPLERLOOP"); const var Sampler1 = Synth.getChildSynth("Sampler1"); inline function onSAMPLERLOOPControl(component, value) { for(s in Sampler1.createSelection(".*")) { s.set(Sampler.LoopEnabled, value); } }; Content.getComponent("SAMPLERLOOP").setControlCallback(onSAMPLERLOOPControl);
What am I missing ?
Interface:! Line 7, column 35: function not found {SW50ZXJmYWNlfHwyNTF8N3wzNQ==} Interface: Compiled OK Interface:! Line 7, column 35: function not found {SW50ZXJmYWNlfHwyNTF8N3wzNQ==} Interface: Compiled OK Interface:! Line 7, column 41: no iterable type {SW50ZXJmYWNlfHwyNTd8N3w0MQ==} Interface:! Line 7, column 41: no iterable type {SW50ZXJmYWNlfHwyNTd8N3w0MQ==}
ERROR !!!!
-
@DabDab I think you have to create a typed Sampler script reference to the sampler
const var Sampler1 = Synth.getSampler("Sampler1");
-
@ulrik Thank you Sir... now it is working ... :)