Sampler Loop Points



  • I've made a snippet where you can change the sampler loop points of your sample map from the UI. For this I need to call

    const var Sampler1 = Synth.getSampler("Sampler1");
    

    However if I want to add a preset browser and save the sample maps via a combo box etc then I also need to call

    const var Sampler1 = Synth.getChildSynth("Sampler1");
    

    But you can't have both! Is there a way round this?

    HiseSnippet 2902.3oc4b8tbaabDGTRv1h1JwIi6L8C8CXzzNCYFKIfC.2AVmNljRT1plRhCohc7jlwAhDRB0f.r.fxRM0M4QnOC8IHOB8YnyzumGA+FztG.H4Rp+ZMiuDjxuXd6c6c6s+Vr2d+LDaEFz0IJJHTpvh6c5.GoB2Styo9wGs9Q1t9RasgTgORtSssa0rQakc2o4Kkpe5.6nHmdREJL+S3iovhKHk74cOttsmseWmIhjjddfaWmlt8cimHsU0m454socOm8b6iFsQ0s5F3udfWvPvdlWVUZfc2WaenyN17gMmrTga0nmabPXmX6XmHoBKTOn2ocNJ3M9oi+4tQt664vanI0AlnTwaF30iawboRqejqWuVi12QRREjaMwKLepW3Axa61ycr7Idi6mzgxDMv9iBycYlmF17Tu9lWAj4sPp48Ixc5F5NHdROba6txa4G6DdfM.AXyJcrRy8eVPd8.XD9wq1290NaFBMFqQIpp5CULUUK+nhKUDvgnXkisCU5X2efmSnlxePIIvX0CchyjUZ4QctbhRt9dt9NJGLzuarafuRf+y7C1WiulgAdk5FzePfOr5ODlXugNkWp32tTQE3yAAgkhTb8GuXq1MzAbgcb7bRlpRKu5msb4xoiNSI9Guft1dJdfsMvNLxA1Lkh3FXorIZ0z+sgeuxkezD0hVMBMllAACfQjYUJelh2nw91kJ9V3qKUbjaCl50GsKJsbxta4x7IKaOttsm29PLaoo25kSljKxAQtbGzhbui8M26Dh8N1WCui8Y7NP7bX7D+S36g+gbY9GBx+bEgbIOVjzZ1nNtFQIR11dPDWmLKebfJHuoaTboTX3rf.Xx6GTO3jqHRcww9e6nQOATdUu.6diWlRSLjuJQyUz9Z9pdYdowq9E4ol07R2FSbWi6G16W4RjEINVRBVurarS+nk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a0CTDsCTDsCTR9AkDKuC5TlpplXqdfh3cfh3cfpmePIwR7fdEcv+J1pGnHhGnHhGnF4GTRrLOXnUwPWUvUOfXdfhXdfZlePIwR8fggI0vPvUOfndfhndfRyOnjX4dvfoYA2qUrnDh6AJh6AZ9g6AhX4dvnhkJSWvUOf3dfh3dfle3dfHVtGR++nUvUOf3dfh3dfle3dfHVtGLMUMUIhs5AFh6AFh6AV9g6AhX4dvjQYZTwV8.Cw8.Cw8.K+v8.QrbOPUIUz0Da0CLD2CLD2Cr7C2CDwx8.kTQCJFWrnDh6AFh6AV9g6AhX4dfZZpSUEa0CLD2CLD2Cr7C2CDwx8.0RyjI3WVRFh6AFh6AV9g6AhX4dfoxXVB90kjg3dfg3dfke3dfHVtGX5FppB9Eljg3dfg3dfke3dPWrbOvfh7zD7aLICw8.Cw8.K+v8ftX4dH8cOVvUOf3dfg3dfke3dPWrbOXoQnFB9clzBw8fEh6Aq7C2C5hk6AKcKKpfeoIsPbOXg3dvJ+v8ftX4dvhZpxD7aMoEh6AKD2CV4GtGzEK2CVUzHVB9slzBw8fEh6Aq7C2C5hk6gJZLSUA+VSZg3dvBw8fU9g6Acwx8PECcl1G12ZRQ725ce6tgAupa5uxZ7+huuShDva4m.mKJuMusxjeX0jUWUUpuaO2W0sKODYEMIoyWGxMPG8afNF2.cLuA5PuA5vtA5Xco5v+wVo1v3f9o+TS.BZ0H8OO+BiC0KLuz+CB2Gq9A
    


  • @DanH you could have different name for the different references

    const var SamplerSampler = Synth.getSampler("Sampler1");
    const var SamplerSynth = Synth.getChildSynth("Sampler1");
    


  • @ulrik Oh great, I didn't know that was doable! Thank you 🙂



  • Or just get it as a child synth and use .asSampler() when you need to access sampler specific functions.


Log in to reply
 

10
Online

1.4k
Users

4.4k
Topics

40.7k
Posts