Changing the start point of the samples on reverse playback mode by code
-
I tried a bit to use this SampleStart feature, but when the playback is set to reverse, this parameter works in a strage way.
I will explore more.
-
@Gabriel-Strozi maybe it's better to make new samples of the reverse drums. This way you have more control. When the user clicks 'reverse' the sampler could change sample map, or perhaps have two samplers and switch between them
-
@DanH or add different amounts of silence to the shorter samples to make all samples the same length
-
I got. The problem is that I already have a User Preset working like Mr. Healey techs, using combobox to change sample maps. To make another samplemap exchange system, would be really hard to me to understand how! I need to think about it and about how big the change on the code would be.
-
Actually, I'm struggling right now to simple change between Normal, One Shot, Reversed and Reverse One Shot. It seems to miss an attribute for that. It's possible to change between this settings by code?
-
Use a different sampler and sample map for the reverse mode, then you can cut the samples exactly how you need them.
-
Use a different sampler and sample map for the reverse mode, then you can cut the samples exactly how you need them.
I'll try it! And how can I switch between Normal and One Shot playback? I'm trying to use
Sampler1.setAttribute("OneShot", value);
But don't work. Any suggestions?
-
@Gabriel-Strozi Try
Sampler1.setAttribute(Sampler1.OneShot, value)
-
@d-healey said in Changing the start point of the samples on reverse playback mode by code:
@Gabriel-Strozi Try
Sampler1.setAttribute(Sampler1.OneShot, value)
Also didn't work. Nothing changes
-
@Gabriel-Strozi You need to get the sampler as a child synth.
HiseSnippet 1175.3ocyW0saaaCElJNJH1qKXsnWraFfPvtvAnKvtMMc.EC0wNNEFqIwvJqX2UvHQaSDIRARJu5MzGnc2dD1yvdR5av1gTR1TtFdNdsY0WXvyeje77KUeAOfHkbAxo5USSHHm645OkoF2YLlxP8NE4rm64XohH7xX0dZBVJIgHGmJuTyvo51Hyu2+h13HLKfLmEB8ZNMf7JZLUMma+V+HMJ5LbH4JZrk1G0pW.m0gGwSA7TwsAJAGbCdD4BrVssbQN6zMjp3BeEVQjfNs4gS8Gy+EVl9ulJoWGQzDMQ9vFkwF0YLMJrewcUhPNt8meyqjcyen64zP5L9y8.ekQf2bKr8ANasJH07V.IGKHscFjtuqefflnlKQimuvsGCBHCwfq1FJY5h152cb6vAMXpCiw2PNS.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T.6babXCTLLq5MAA5BguC7vK2lGuA17jMvli1.ad5FXywafMOaCr46WoM5mIbRphGm0jDXzuaVhkS2YIVUP+Cn97DG.
-
It worked! Now I just have to cut the samples and create new SampleMaps for the reverse Sampler.
Thank you so much!
-
@Gabriel-Strozi Don't cut the samples. Just duplicate your sample map and rename it, then shift the start and end times inside HISE. That way you won't have to use extra disk space or RAM as it will share the same samples.
-
@d-healey How do I use both Sample Start End Knob and OneShot/Normal button?
If I useconst var Sampler1 = Synth.getChildSynth("Sampler1");
Start End Sample and Samplemap CB Not working..
If I use
const var Sampler1 = Synth.getSampler("Sampler1");
Normal/Oneshot not working.... How to compensate both scenarios?
-
@DabDab name them with other names
const var SSynth = Synth.getChildSynth("Sampler1"); const var SSampler = Synth.getSampler("Sampler1");
-
@ulrik Ok.. got the logic.. :) (y) Thank you.
-
@DabDab or use the asSampler function
-
Getting the sampler with the Synth.getSampler("Sampler1") you can change between Normal/Oneshot using the parameter ID from Module Browser instead of using the parameter name:
Sampler1.setAttribute(10, value);
The Sampler parameters are:
It worked for me as well.
-
@Gabriel-Strozi said in Changing the start point of the samples on reverse playback mode by code:
parameter ID from Module Browser
The reason you shouldn't do this is in case the numbers are changed in the future.
-
The reason you shouldn't do this is in case the numbers are changed in the future.
Makes much sense! It's a relevant reason!
Let's rewrite some code hahah -
I am having an issue. I am little weak in Sampler stuff. My Two questions are how can I switch between Noram, OneShot and Reverse mode via ComboBox.
const var A = Synth.getChildSynth("Sampler1"); const var B = Synth.getSampler("Sampler1"); const var ComboBox1 = Content.getComponent("ComboBox1"); inline function onComboBox1Control(component, value) { switch (value) { case 1: B.setAttribute(10,value); case 2: B.setAttribute(13,value); case 3: B.setAttribute("Normal",value); }; }; Content.getComponent("ComboBox1").setControlCallback(onComboBox1Control);
Compiled OK. But Once it's changed nothing happened via ComboBox.
how to fix it? What have I done wrong?
And what is the value for
Normal
mode?