Convolution - script start and length of audio file?
-
I can see that we can edit the start and length of and audio waveform directly in the audio waveform panel. Is there a way to script these?
-
Nevermind
@Christoph-Hart said in How can I create an interface for Start-/EndLoop of Audio Loop Player?:
Looper.asSampler()
is likeCar.asShip()
:)There are two ways:
- Create a AudioWaveform, connect it to the looper module and drag the sample edges to set the range.
- Create a
AudioSampleProcessor
reference to a looper usingSynth.getAudioSampleProcessor("LooperID")
and use its methodsetSampleRange(startSample, endSample)
.
Check this example (you need to load an audio file in the looper to see how it works):
HiseSnippet 1212.3oc4V0zaaTDFdV6rkZCthJJRbbUDGbPoQ1k1Rj.DNwIAYQRZT1PnmZ0jcGaOJyNypYGmVSUk3X+Cv+KNvYtf5Qj3Bmg2Ylc8tKdyGNT.IXOsyLue7LOy6WGHEAjjDgD4z3nowDjy635OkqF2eLlxQC1B4bK28vIJhzyt0lSiwIIjPjiS8uTugSikPlue8K1Dyv7.R9VHzwBZ.YWZDUkuabuuhxX6fCIGQiJH886MHPv6KXhI.dp61AEiCNEOhrOVKVMWji61gTkP5qvJRBxYoMEgS8GKdF2J+wzD5ILhdQWjOXH616HXgZDq+G0eLkEdP18NAAF8fbVntkEti6dzP5r8yYi20bfWtFE4CmZWD75dMgmSA3sjEd210OPRiU4mnw1a6NfCOTCwvSPQXYkEU6mp41W.RvUqEgOkriDVLSi1OrSmU8dPmNq7osZ1pI7Pjn7NCK81UHhgW+O2yDWr1HhZiIgTgONJlQlAf1KakaYs51eWKgnrRcHlOhzFL+5qeu4cv17Pv5YHCreeQTrfCKZuLblwh4RCbqTctxaNEz3IOQ6CJmQ4DugS3AJpf6I3f8zJJEr1AYZsJXW1DxJsZ9hVMaTM1M1U6qi0h1dkLc.n8Ry04Bfu1VoNsOlwNAhoaWDIV9XdrZ740BsFIVUSrEf7kg0TpqZzVDKZCU.l6KTjGwauRyWzrQyWN2ICGV0QolhQjUcptrf7BTqMeRzIDYFUjJGjcTN86FWszu.KcTPPAe.mpdTLIccdBZ2JRPQo7IjpVOEff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