Sampler oneshot mode in scripting
-
MAAAN! I cant WAIT for the new documentation!!!
I want to set a sampler into one shot mode (and back again) in my script:
TheSamplersAsSamplers[0].setAttribute(TheSamplersAsSamplers[0].OneShot,0);Can anyone tell me the correct attribute name?
I looked in XML
<Processor Type="StreamingSampler" ID="mySampler" Bypassed="1" Gain="0.0" Balance="0.0" VoiceLimit="256.0" KillFadeTime="20.0" IconColour="0" PreloadSize="8192.0" BufferSize="4096.0" VoiceAmount="256.0" SamplerRepeatMode="3.0" RRGroupAmount="1.0" PitchTracking="1.0" OneShot="1.0" CrossfadeGroups="0.0" Purged="0.0" Reversed="0.0" NumChannels="1" UseStaticMatrix="0.0" Group0Table="" Group1Table="" Group2Table="" Group3Table="" Group4Table="" Group5Table="" Group6Table="" Group7Table="" SampleMapID="myMap"> <ChildProcessors>which makes it look like it should be "OneShot" but that give this:
Interface:! Warning: undefined parameter 0 -
@Lindon You can right-click a module's header and select Dump Parameter ID and Values to see all available options.
For the sampler
sampler0: (StreamingSampler) - Parameter dump: [0]: "Gain" | 1.00 [1]: "Balance" | 0.00 [2]: "VoiceLimit" | 128.00 [3]: "KillFadeTime" | 20.00 [4]: "PreloadSize" | 8192.00 [5]: "BufferSize" | 4096.00 [6]: "VoiceAmount" | 256.00 [7]: "RRGroupAmount" | 8.00 [8]: "SamplerRepeatMode" | 3.00 [9]: "PitchTracking" | 1.00 [10]: "OneShot" | 0.00 [11]: "CrossfadeGroups" | 0.00 [12]: "Purged" | 0.00 [13]: "Reversed" | 0.00 [14]: "UseStaticMatrix" | 0.00 [15]: "LowPassEnvelopeOrder" | 0.00 [16]: "Timestretching" | -1.00 -
@Lindon said in Sampler oneshot mode in scritping:
Interface:! Warning: undefined parameter 0
Just tested, sampler needs to be of ChildSynth type.
-
@David-Healey thanks yeah spent another go round in the source to uncover this too.. thank you.