Unsolved Help me understand how the "Loop" works in "Sampler"
-
I would like to allow the user to adjust the start and end of a Sample playback via UI.
Without activating "Loop" I managed to set start/end it but when "Loop" is active in the Waveform another "drawing" is activated that indicates the start and end of the loop but I can't change it.
Without Loop
Loop Enable but cannot adjust start/end
HiseSnippet 1919.3oc4X80aiabDmz17RjZ5gjfTf6g9vBi9.cqpNQ4y145gfHaYq6LNqyBRtWJpsiwZxURaM4trKWZK0fCHOUf9koneD5Gf9knOUf9T9FjNC+iDoNcI9LRBRPEDj3tyNy7a9ytyrrmR5xhhjJCyJmLMjYX9dVClJziaOlxEFGtug48s5RizLEIcp8lFRihXdFllq9TbByJqYj74q9z8n9TgKa9TFFuTxcYGwC354y1q0y499cndrS3AEV8iZcnqTzV5KiA7rpUCiPp6UzQrWPwkshkg48NviqkpAZplEYXt1dRuoCFKuQjt9Wxi3W5yvANFC.AkNcGouGhXbVi1i49d8xs6HCCSqdy8Bql5E9HqtbO9r4m6Md+DBj4bTzeXtRY3sZI34TDdMJ.uk.IyBPZsTH8AVCbU7P8bJHd9YVGJffyPJ31KBkz0Zrx+wxpsDVgPWOfdEqiBFLiC6saznFA9YimTc.Sq4hQQ0iX5+nTFbD6ZlusScjVUHrDoIWSUjAzfPelxg7Ijj7j5iX5r4rWOm35HOU4BetfQFFKb0bofHE6Eq0RgCBHkz21UFDJE.zpAh1OlsQ0unZEeoK0mP88SEVDpnLwV2Uw.G6.lOKQh1qW+WippR0JCkJh8DBWTfyMpVoxDzbrmIfijxvCDTHF3kqymT8U.Xy8Qf0zNGU1qmg202.kRFpaCJ3RHszdQyIwle3CIe1tu7fNG2uK4nc6P9sjm5KuDLHb.BxanWyf+Chx7o37eBIW8oF3QnK.f5U6J75vfn.H54Qfci83xOKSLNEXtL1KurjHxCeX6XkBnR54SmhFAomLhitxp.NpqXi33N8NYQL608TzaNYbbvkBJ2ueL3CWu1r.p8nZD4k+IHpQpVAjMfPoOqdnhC5Wqv7KjLFfFk5.wM11MlrciNIe.JD3CZ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RA2sb9LjeNZDSUD6K0f1UqgsSym4iZ0GtfFMpvFxeUKrEdpp71z2Jegya88kWZ75AVovkfGQQ9oaErU++lJXeStn6mU+h.ZTo+QXL78rRNkkfEE+gDdv0QwWlSdQFKnRz.n5qKqX8nUvZboiafiQPLfI7RF70vmLhN4EuPhN4DMbyEEXOYOmz9s4prz2vB1nkO9VjJlhFA03QHAEbLhRBdAXQh0Pu06XER8tvwXgp2VVN0g5Lb272M.5ZrdRg5yzf.ZIGoYpngr19Rrn9ZV6zz3H4yYSwm25wFOim87i2Bl+kHFQW4y3IOBZr4N4vHqBF2O60P9bq1+tyf53pny5RUtxyxtJA7exwqAPO+m0WlzcRGNzUf5rrWH0Yf4k7yENWzt9MzqM1ONzm6BQazWU3kSMKbjvXZ1c1ToqJYE+2+d9Jxl3es1JIzmwv+9Y+.kLDPcUxKbSuMGlR7tIy.9NQhSqhUWbLYIWaK.JmegqaYQ8ZL17tx3l2UFezckwstqLt8ckwctqL9we6LhcasarVFjVCxvnauCR2maNKY0bUi+G3jNAOD
-
@Mighty23 Do you want to SampleStart == LoopStart, and SampleEnd == LoopEnd? I think you can make it with getSoundProperty and setSoundProperty
-
@bendurso I would like to be able to control the start and end of the loop just like I control the start and end of the sample. Maybe you suggested a good alternative. I will do some tests, thanks
-
Ok I looked a bit in the documentation but I don't quite understand the parameters that these functions accept. Can someone explain to me what propertyIndex and soundIndex in Sampler.getSoundProperty represent?
-
@Mighty23 Take a look at the sample import demo project
-
@d-healey Thanks for pointing me in this direction but I still have the same problem, but with a procedure that I understand less.
In the version of this snippet I get the same issue that I get in the previous example. The range is displayed but it is not possible to change it.
HiseSnippet 6970.3oc47z0babjbfRZkEfskkcN6JubUMF0ky.RzPj5CaU1mr.knjEsIEYQRaYGcNVK1c.vZsXWb6tffL1LQ4iGbU4gjWuWtbOje.WU2S4MUU9Ij+.9mf+Gbo6dlYmY+BDj1V0cUXcmE1Ymomd5ult6c5gueBOvk69kwAdiGySpUagSuUTnCONNLp1B028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b0PK7re3kibzz00pZrv+qT8Ic1pxmRfLFMlU5.PBtMFhOt2WmqjpjNTwB.pz8oB5Q8UOLIKjUEjnH.wkPXrbwtAdgGTRujSkOcmrh4Wfb8ppTO3DFEz2ObJOpmOdDlHfg3DBCg6KyATjIvHcvYS7gIXD4w.SVx1fu5sdjotC3MWF8YP+c3WjReJyMHsuCy7Z7UlKbgxfIloIRjDQ4HladDyMEwpmWhFUWE220ZKEdwpxMAngxehHoH+8xyBjxc40B1Vb1txf.4sdkCgnVFJBC2vu64AR4L6VEfkeVU8RwHzbMZ+nk9h7FLxaR98SGhDAww714FyaWxXNjvASl2R6e8qesq8tu6MtgvXtf6QN1aPxuUlnPduzXlVzfbqSDQV3e0qVA7yBD4JozdIm3hc7vRjdRU7+573RQUOsnqHLm1obewA+4yJwZecIarB680Ui7RE3GW2fBo0Qj8mDZtdpNAtYjHShXv2oGY2.99XhJwSz9+G4Cwl9B
-
@Mighty23 Oh yeah I remember now that there is a bug in that project with recent versions of HISE. I'll dig out one of my projects in a little while where I solved the issue and see what I did.
-
@d-healey thank you, thank you so much. Don't rush, it's already a lot to know that I'm not doing something wrong.
-
@Mighty23 I just had another look at the sample import tutorial, it does actually work, but not with the demonstration samples, you need to drop in your own sample.
-
@d-healey is there a way i can connect the values of .SampleStart & .SampleEnd to .LoopStart & .LoopEnd :
const var SampleStart = Sampler1.SampleStart; const var SampleEnd = Sampler1.SampleEnd; const var LoopStart = Sampler1.LoopStart; const var LoopEnd = Sampler1.LoopEnd;
This would simplify both the implementation and the final UI for the user.
-
@Mighty23 Is that a good idea? I think you'll get pops/clicks at the loop points if they are exactly the same as the start/end points.
-
@d-healey said in Help me understand how the "Loop" works in "Sampler":
@Mighty23 Is that a good idea? I think you'll get pops/clicks at the loop points if they are exactly the same as the start/end points.
you might want to do this if the sample is (say) a drum loop
-
@Lindon Without any crossfade?
-
@d-healey of course not - most drum loops are (in my experience) trimmed to be exactly loop-able (hence their name)
-
@Lindon Right, but in this case the user is dropping in samples and adjusting loop points, so it isn't a pre-cut sample with a baked in crossfade. So we will need some time at the start/end to allow for crossfade.
-
@d-healey said in Help me understand how the "Loop" works in "Sampler":
I think you'll get pops/clicks at the loop points if they are exactly the same as the start/end points.
Should the user re-adjust the Attack and Release to avoid this or could control the XFade as in the example in "CustomSampleImport" . Should the audio glitches you are talking about not occur even if you set the SampleStart and SampleEnd incorrectly?
Something like: (this don't work)
const var Sampler1 = Synth.getSampler("Sampler1"); const var SampleStart = Sampler1.SampleStart; const var SampleEnd = Sampler1.SampleEnd; const var LoopStart = Sampler1.LoopStart; const var LoopEnd = Sampler1.LoopEnd; // LOOP const var Button1 = Content.getComponent("Button 1"); inline function onButton1Control(component, value) { local allSamples = Sampler1.createSelection(".*"); for (x in allSamples) { x.set(Sampler1.LoopEnabled, value); if (value == 1) { // If loop is enabled, set LoopStart and LoopEnd to match SampleStart and SampleEnd local sampleStartValue = x.get(SampleStart); local sampleEndValue = x.get(SampleEnd); x.set(LoopStart, sampleStartValue); x.set(LoopEnd, sampleEndValue); } } }; Content.getComponent("Button 1").setControlCallback(onButton1Control);
(I tried the example with other SampleMaps and it doesn't seem to work)
-
@d-healey said in Help me understand how the "Loop" works in "Sampler":
@Lindon Right, but in this case the user is dropping in samples and adjusting loop points, so it isn't a pre-cut sample with a baked in crossfade. So we will need some time at the start/end to allow for crossfade.
hmm, my experience of this sort of loop- and I've worked with them for over 15 years, is that there is no "baked in" cross fade, a drum loop is just that. Try it yourself:
- create a drum pattern in Reaper over 4 bars, export the 4 bars exactly... take the ensuing wav file and (if you like) drag it into a sampler - set the loop start and end points to the start and end of the wav file, press a key - the loop starts to play - hold it down and it repeats - without a glitch or cross fade in sight...
Sure if the last hit on the drum kit rings out past the end of the loop then you might want to do some cross fading - but you dont have to....
-
@Mighty23 To avoid pops/clicks at the loop points you need crossfade, which means you need some space before and after the loop point.
The property constants are part of the Sampler class, not a specific sampler.
Try something like:
x.set(Sampler.LoopStart, Sampler.SampleStart); x.set(Sampler.LoopEnd, Sampler.SampleEnd);
-
-