Changing the start point of the samples on reverse playback mode by code
-
@Gabriel-Strozi to import a snippet go to File, Import Snippet.
HiseSnippet 2967.3oc4b0sbaabEFTRvwhNx1Ii6L8hNcvnocFpLVT.K.1ErIcLIknrUM0OCohc7jlwAhDRB0f.r.fxVM0M9QnOBc5CPm7.zK5M8tdS6SPtoW27FjdV.PxCo9wzZhgAZwMh6Y+6rmuyd1y9ILXOeuNVAAd9BEVb+S6aIT38Eaepa3wqerosqvVaHT3lhsqs8dMazRZ2cZ9Dg5m12LHvpqPgByeedaJr3BBQOe28pa5X51wZrHAgG4Y2wpocO6vwR2q5Cscb1zrq0918PsVq5Vc7bW2ywa.nOyKJKz2ryyLOxZGSdylSTnv0Zz0NzyucnYnUfPgEp608z1G68b231+H6.6Cbr3ETDZCCTr3M8b5x0XtTg0O11o6dCW2ABBED2arUX9XqvcD21tq8H4isF2NpBow8.aOJL2kodJX0Sd1UuBH0agX06CDa2w2te33Z351MD2xMzx+PS.BvpUbaEl6euf35dPKbCK2y7YVa5CEF0iRTY46JoKKuxGuTwkJB.QPnzIl9RsM602wxWQ5WJE4YT9HqvDYkVdXkKG2KaWGaWKoCG31Iz1yUxy8gtdGnvmUeOmRc7502yEl+6Biry.qUVp3WsTQI34PO+RAR1tilsxc7s.iXaKGqngpzxk+nkWYk3VmzI9iiWGSGIGP45a5GXAKmRAbMrTx.UN9uMb6tBWEG1sfxAmWaRzKoORxYXqe4REeYzZanoCF70GtNJsbz5a4U3CWxpbcSGmC.+1RSt3iMPWjIhb4lnE41Gyqt8wGaeLmA6i44Xe.uZ+vwVH+2.KD4xrPjIrPmwwKxoC67EsCIpzY7+3cKHRz1l8C3cJYELxmEj2zNHrzE4uBJ9Ad08dwqwmcQrxU1LX3FhUJ63Y1czTUZrx74Q8dUkufOyWl8ZjFbQ1roUwosaipGV+u1oHwqbjjHbeY6PqdAKeWjsr7uwyFbx90tKuRbeP1rc7Bs10szJE+phKV7kEkltpCO7bqKQ8iLamS07yF7urNVxcPuCr7GhKC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.xgHOghHOgpjePNsTE4zjYFrLPFJTD8ITD8ITR9A4RU9SToLYYkLPFJTD+ITD+IT07CxkpDnnVQknPy.YnPQDnPQDnP0xOHWpxfhlREMU4rPFJHFTnHFTn54GjKUoPQSSmpokExPAQgBEQgBklePtTkCEMlhAbW7L.xg3Pgh3Pgle3PgjpbnnUwPlolExPAwgBEwgBM+vgBIU4PI9+EdVHCEDGJTDGJz7CGJjTkCEccYcYRFHCEFhCEFhCEV9gCERpxghNixTnYfLTXHNTXHNTX4GNTHoJGJTYREUkLPFJLDGJLDGJr7CGJjTkCEJohBbwfL.xg3Pgg3Pgke3PgjpbnP00UoxYfLTXHNTXHNTX4GNTHoJGJTCEcVV3Ejkg3Pgg3Pgke3PgjpbnvjYLirvqHKCwgBCwgBK+vgBIU4PgopIKmEdIYYHNTXHNTX4GNTTSUNTXPxkJYg2RVFhCEFhCEV9gCE0TkCk32K8rPFJHNTXHNTX4GNTTSUNTLTHTsrv6IqAhCECDGJF4GNTTSUNTLTMLnYgWTVCDGJFHNTLxObnnlpbnXP0kYYg2TVCDGJFHNTLxObnnlpbnXTQgXjEdSYMPbnXf3PwH+vghZpxgREEltbV3Mk0.wghAhCEi7CGJpoJGJUzTYJuCdSYSiumA8L6368zNwe9C4eUCtdjD.ocif3EE2lWVZzW7PQQ4xxB8r6Z+zNc3tMqpHHb98gbE5i5UnOZWg9neE5C8JzG1UnOFWZe3eoipMHzqW724EPvdMh+DTT.49K7egVE9am
So, ignore the sample start modulation that I mentioned before. If that is actve it means that you can't move the Sample End point where you want to. In this snippet the sample start knob works ok but the sample end knob just makes the end point decrease, which ever way yo turn the knob. So it needs more work / someone better at HISE than me to come in and fix it
But this should be a good jumping off point....
-
Nice!! Importing the snippet right now. I'll try to understand and develop from there! Thank you so much!
-
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.Dyrn9wMZ7HO3uCddsZf6Vp7lfEd933jHhno2O3Yh+GNhnLPzPUe+B46qMixhnLh2vTVfhxYdbV6TkhyZpOVAOpd.ONgy..7HXyiRIGT62pUsXKNTRTmnTB50oJR8YbujQ.21LKdds2AmTw8Pilh8r994m19Gn2p7yrCNJ5ZHco9hfA1IKfdAWQtjU2.nZuql2hhFNboxx2K.nKUrNOVrJCqyRiulHrcGZEg.c4rmcVurmfL2hkhbVOFUcYBIm9LdTnNqPu9Cy0P49UX0O06TrBqS+x4A5kPDJpFNNmRl.0uYIiUcOkHuQwSL5lGLfJIkQ5d4opYNeDMTaPdj.8VPMm+BNso5EgvBIdBoGquf.QPctK5CS9gxNdXZDVUtVT2zIW.3hKU.nSxYRpZpcSoaQAZiUVfttP79t8opfwKGiasDLBN+OEXLus1W51c3PRfZN.218redS6gs9G+2jc7Ov0WIH3XJaTdotAC0bKJ7+XLQIYsmn.YbQbbnO8WsT6Oa0NE7Qhxb+iVli5jXdJqzYki7AjDBVAgYKa1s0fAuTvSSVzp2+BSRwUBnEE3JrEj23y9N1Qvkxgv0wrWRaQ8SEiz9p4bFPlPDxx7tHMFh2LFIRpq3bzE5RhN9RCNGC8deqs1lSowUXSLFFyZnat.8iWf9IKPezBzOcA5iWf9YyoybnmiSzYF5w7KzUb20qqHrA8wvU1Ry1zQy17LNkaeXo5LetAWVOpvmnTPHSZo6RlduympGTr85UL9uzv+y+1qkd+S0BL5S0QutrIPYKvQiwG.ygFhSiTEbK2B4bNimLlynAkKRfj9QiHBaruzKD7zDnFcNmG1Z.IhfkVU4eaqWAu+AKJW6eq7E292Btz30W6lAWOceOu+Kws6zzrUNhrxZMh7iNd27wk2ott8xGb5AmtP8Ydb9dtlV8d5Iy+eA0A7Tc66hodtvnQe34.AD6AjaoG5lQ2PSqAjOgEZH9a3WtvlESS0BaVHDETrUvcKes4U0NUHL8zDyK+hf4zQ1ozR3QGZHAS7tSPYLNPveSP1Wjnw5tFN.JYlOvtJ7k9.sWSj4qT.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.