AudioFile Range - Odd Behaviour?
-
Is this a bug?
The range slider works when decreasing the range, but it refuses to increase the range.HiseSnippet 2664.3oc0Y0saaibElz1zwVaRwltYA5kDt8BkTsZIojsrPvh0NxVabi+Qvx0cALBBFQNRZVSwgfjxVpYCPuruB6KQeFReJ5c8YXe.ZQ64LCoHosrsrR1TTA3DN+bNmu472bNjsB31zvPdfhZgSF6SUTenV6wdQ8azmv7T1aGE0Gq8JZWVvwzAjvHZ.0Q4Ei8IggvCppK9c31TWcIEwue9aeAwk3YSSmRQ4TNyltOa.KJc1Va8JlqaShC8D1fL6t5V6Yy8Zvc4CAHsnlghOw9bRO5gDbaKno7RRXeE0moYaWsNcytV0LrpSW2oZGKSChkQ850nj0Mr6TmRr51w1PQc4ccXQ7f1QjHZnh5Ruf6Ltce9kdRAbJKj0wkhCLUZCRVNcStqCdDwYUZzm45zJQWEpnnp0JUysnTy8DsCXNrIympA+bwB5oTjUAptPd3sXN3YlEdFYf2TfjZFHsjDROVqsc.yOJcEDOel1ddfkrKArSYghbuJK7uWQqAG1gWT4AjyoMCfASnnXUCiR5ULLd5yKT.rUgQ5WPBz2dnCi+mHWP6xCFXp+M5IbnGMpAefO2CFTbs7aaMfGorPJ9leORsvGDoc2tco1.gxE0gUWKufCIC7coA4HRHk1hElbxuFKPh6xboHkILYBwMgEJdki3q73cpbimLwpBFWf44x7n5cG5YGw3d5bOwhHcAb2h1IDUBXq6P5SK71Bq5yCKBD+tmW3VYe4PbVAeZPbc6.AGEyydABJLQ1B9p+1BEVsvpe8WKOvkc4DGwITdtaQh5aBzAaQtNHjiId8.MPoXJ.vH0mGCdo.CelTafyeJdFfoDL3cfrAwzlFoG0mpaGiwBS3a7oaB3S.ZQTK.jtJrgPtKsre.CN2Q8YgBMwvf.fL2w6CPmJA+Se5y0uYJxBWXi.npV0zvnrwMSxgCGHoJLgjMqXXZVCULYzTfKvsBKghLwdl3okm90VSXkD5puQ96G02e6l5+X7HIQWFGnfqj52YGPgS09bP4tOme91dNM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zhLv9b6ldAXUxygz9zd10ZD+TN9RIa.FfqzD9.T0Hi7GPvpmTW9ernhKfwbcl6J.sSx5pKdaeiKy47abszuTeiqklsxvuc38+AMVkqqgUSvXaF5Esq2ETWHlQfwesVbvexrV4P4AbOdRIoY84fBr60Cyckh8odf1NJB76Sm4IacL0kRBoY6.Ge6rjfqF1bOzEl26OO4TsW+FMIb0wnb8OD61mT2ras43Emoli+ni24uQ4ONP4SQmfeJjw.hc.+M1xFnQe4UDy.maOQ98U0N.GqOk254.Hq3arsyypqQn07RXk4kvpyKgqOuDtw7RXs4kvMuaBwKs1dXDefLjUQ4fV6JJKRUcRMApKp7eQ4jpZW
-
This doesn't work, but might give a hint of a solution.
You need to store the maximum length when the sample is loaded. Then use that value to set the length you want, up to that maximum amount. You can't check the length once the range has been changed because then you'll only get the new length reported.
HiseSnippet 2646.3oc2YstaaibElz1zIRa1hltYA5OIb6OjS0pkT2EBVr1w1Zia7EAKW2EvMHXD4HoYM0LBjT1Rc2.ze1Wg8knOC4IouBsO.En8blgTjzV9ZZS6VAjXNWNmy2btMmCYGegCMHP3qom+3YioZ5Own6Ld3vsFRXbsc2VS+oFul1m4eDcDIHj5Sc0d4rwjf.3Ac8k+Fba54VQS96u+0uj3Q3NzjozzNQvbn6wFwBSlsyFul440l3ROlMJ0tqtwtNB9VBOwD.RKaXoMl3bFY.8.BtskLzdEIXnl9yMp6zplUOpUsZMqVoY0p0qVulUeqJ860rd0dUZTsha0Z1NUzzWcGWVnvuaHIjFnouxKEty5NTbAWIfSXArddTbfsVWPxpoaK7bwiHNq1VCYdtch0UAZZ5FcRzbKqzbOyXelKa97IZvetbAyDJRq.0WJK7VNC7rSCOqTvaAPROEjVQAomZz0wmMNLYEDOehwtbvR1m.1ozPQsWskddNisDvN3gkFQNi11GFLmhBUsrJZVwxZ8WjOuOcf4Hxz8n7AgCgwfsKHz7bhu4lSbYheO4bZeg+HayuxLliCngaIFMVvgAEVK61VC3YBKTvo82hTK8IQZ2oeepCPn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+LiZkpVtb4FVMZTsYU6JVsjvCJ7Ax2.gsOXzspQ4rXKGLwh0GoADh3xka0xpZs5kKWoZyFMqIQziLdEaqIgZWgaYwTx7ZentCepw9.egFSgdObuYuBk7RphTSKUn1pFCv35LwXeBD43SKIWXQQVQzbKgTKkw+e4O9tIQEMEq6W4wZum+i+Xw2eO7StCQM2J7vMTwx1pBrgVsZVsUCK6n2sc2QBQ3vTNxQ9kYQXzj+WHP6IFGQChdOo2kXsz9Xos9YVQVdBNBJ9ZIkT1M3jnW3RrTf6rdoPb1Hh71xGTSQoqB6yhqBSlIeOARr7D9L0Ll3TlXoLTe6q8iF8W9G+065GMZ7c9iF0cF2YeY7XR0xxRWO1m3bF5ajZADl6H6jwMMBNBbiv2nP5OZk5k1JaQFXelcSOGrJY4PReZO2366bzg+1c153219v81dmid2IB7EMtEX.v+.JdyekcoKHmqMBUMpH+QjowO5AXLSm4dRPOuwb8kuoOxk8C7ibsx+y8Qt9IPyTY5THWLF6xPOmc3mS8f3DIF+EFQA7wyVNCJ2WvEwkgl1OCJpdv.LeUB1W3AZyvPvWOYlmswQTOJIfltqa7srR7ubnx8PWXeu+ljKzd8KMTv0DirM+oaSvK++0MA+QoytOFxXDwwW7VGUCwne5iky.matLecNi8wwlK3sXNBxx8VGmrr5JDV9gRXkGJgUenDV6gRX8GJgMdnD171IDuDZyIghQpPSMs86rirLGc842wqur1+RUL6I7
-
This post is deleted! -
Thanks for trying, but I wasn't using Sample Length as part of the equation, just sample rate, which shouldn't be changing.
So I'm not sure about this one.
The snippet you provided crashes my system, I've been getting crashes with various configurations of .get used on the audioFile.
Troublesome.
-
-
@griffinboy sample rate won't give you the length of the file in samples so I don't see how it's useful here
-
Ah but sampleRate will give me one second in terms of the audio file!
I was using that to give the audio a range of one second.
And then using the knob to scale that second.
This was to test range-changing in real time.And with this I discovered the issue.
Weirdly it reminds me of the way that you could only scrollwheel a knob backwards but not forwards, some kind of glitch I used to have in Hise. -
Don't tell me I'm going to have to write a convolver too
As I am doing with the sampler -
Womp womp
-
@griffinboy What's wrong with the method I suggested?
-
Theoretically it makes sense, but I'm not having trouble with the theory, Hise is just not behaving
: (I've had similar issues with the sampler as well.
Setting external audio data parameters has been a real hassle. I've not been able to get anything to work properly. -
@griffinboy I'll try and take a look at it later today if I have a bit of time.
-
This post is deleted! -