Displaying a waveform from a sampler
-
@Lindon oh hang on I worked out what teh index is for... so is there any way can get a static view of my wave file?
-
Try this
HiseSnippet 1063.3oc2WszaaaDDdokViJk37BAE8HgQO3.3FHFmjFzdHxVxJPsw1BlJo4VvZxQRKL4trKWZa0f.zi9mku2K8mRNz6tyRJIRkR3pn15BDcRyKxucluYlk8TROHNVpHV05ONBHV2j5NVnG0ZDiKHcaSrtEcOVrFT1Yp1YbDKNF7IVVUdgQgUspjzee346vBXBOHWEg7ZI2CdIOjqy01q4OxCB5v7g97vBd+3lc8jhVx.YBhmJzFjHl2wrgv9LiaqPIVqtqOWKUtZlFhIVU2Q5O1cj7TQl+ulGyOJ.LBNDW7AkotiLv2fXy+IsFwC76M8bGSHVzd4YgJYYg6S2i6ymoOOabmTC14QTLeXsxUAOmkDdVEfW0L3cWpqmhGoysXv1MncEXgZ.CKAEgUluDqKnsjnCB8CCYGCcTnvr.13oMZro8SZz3Ae+fDgmlKE1Rw9RMbfXiGT+c0qU+80s+XSCFTpMyqQICB.UolMUc0UE3Fhjvi.0l1mvBRfYNhG+4yuqtX4WurScAGkhtBt9fHXhbdEvojJ.YRZC+2q51loYlhxDcneQfRyMvwpMbBx1yJQ0nsg3i0xnTeCijBySv5l5I7qrhRm.ISyEC6yQXyQDbaZQUNjyl0d7qsZNNWXmlmx80iPxq0OXQHi.9vQZizeji2Lfba51I9b41BVv3XPQNZ3zNrZqt0Vaco4ww0PXt1yO+7OR6iLpa2tcpZMblN24e6hKS0llWr1h9t0paau9rzWW+0+N60m9xcVeyTycE9vYnAm0p+dbdvegeicYR+j.ld9VOy7lIFP9xbbbCQVDy0iKNO5SnerQo8ikxFVP3dWZOt1aT43ckRvKxp9uFuSltsFc2AC.OcNXqR67lq4QYzLrTmNiYlMCaFWYN7rSBhXkK+WJru3hl8TXGGb5jNtIpuSSqJyC9JKF3KI2cnLwzKtGSq3XqHc+jPWj36AXpSHffXSK2JlVtL4FFYCHbAgepvk3uIFcLxVSL5L0Xw5ysxNI2f5xEP5d3zjxWlJa+SrS.6W.BPYXZNWwp3eeQWEGsvqhOvSiu99JlHNRFO2C1EB48w4awEU9pXbCC7yGZn9E02RxTkZ5COuCdHKMFWlNQk1CscnLQnmqmoxRQTmeTRA+Kg0V8+g6G7u+7n+4iOqrXv8uouu1TL5xCiBfcEm.A3NzTLdObo4.VRfdp14I46IExnQRA2qHC3P.aNGNDTEwdoGns0Z7Bk4ZteyCg.fUjM+0MeIxBYJLOAKYtvYwyEWU85qnYv01zYZ+4wZuJeFs16S.JWGaQtNdGgLOk7sdYWR2vk+hTM34Vj9EZ0vOUDkscHoWbGii13gMHg3Dw254YR2eCleJOlGsDwr0RDyiWhXdxRDySWhX91kHlmckwXVFschVFl0JhJ5sa1M0s1UvPlbJqm7mnLCPHA
-
@Lindon said in Displaying a waveform from a sampler:
@Lindon so is there any way can get a static view of my wave file?
No I don't think so
-
Actually, the docs mention something - https://docs.hise.audio/ui-components/plugin-components/audio-waveform.html
-
@d-healey - yes thanks for this - I am now this far along thanks to your earlier post what I actually want is the waveform display from Kontakt, where i see the waveform in a window and when I play a note it shows it being played...so essentially what we get when we select a wave/zone in the sampler and play it...
-
@Lindon I think that's what the audio waveform does, but it doesn't connect to a sampler so you'll have to tinker with it and see if you can bend it to your will.
-
@d-healey thanks, yes trying that as we speak - but I cant see any way to load a sample into it (the drag and drop doesnt work neither does right clicking) and I cat see any attributes I can use to set it up...:-(
-
@Lindon Did you check the doc I posted?
-
@d-healey yeah- thanks - but its not really much use to me as I have over 500 kick drum samples the user can select from - and I want to display the one they have chosen...so pool loading them all will break the heap space pretty quickly...
-
Can't you change which one is loaded into the audio player through scripting at run time?
I haven't played with it before, I have to go out in a minute but I'll try it out when I'm home.
-
audioSampleProcessor.loadFile()
Looks like a good place to start. -
@d-healey yeah - but this is my exact problem - I would need to ship all the audio files as compressed audio with their associated sample maps(500 sample maps) AND ship all the audio(wav files) again as load-able into an audioSampleProcessor. These would need to be pooled so I think this number would break the heap space limits in the windows compiler.
Meanwhile the sampler already has this data and can display it how I'd like - but I cant get to it (Sampler>Sample Editor)
-
@Lindon Ah I see, I was thinking the loop player could load from sample maps. @Christoph-Hart - feature request :)
-
Secret tip of the day: use the
sampleIndex
property if you want to display samples from a samplemap in the audiowaveform.HiseSnippet 1429.3oc4W0siSbCE1ylc.RfEAHpTuoRih5EIUvpDXApDBwrI6tnHXgnjE5+B4cFmDWlwdjGOKrEgTeH5CPeD5i.OR7Fzdrm+7DBogUEJpMWrZ8w9b7m+NGe97LTv8HwwbAxp9AGGQPVmyd7wL4r9yvTFZvNHqyauONVRDNol5cbDNNl3irrpcOkAq5qiz+dyc6gCvLORoID5IbpG4AzPprz5P26SCB1C6SNfFZr5sbG3wY84A7D.O0r6fhvdOCOk7PrZYqYirN0t9TIWLVhkjXj05839GOdF+4rz0+DZL8v.hZPWzXHPol2iG3qPrxJp+LZf+v7ycLBYYOrjEpkxBW1depOsvdIabA8DNkdXxGVqsL300DdcVc3YY.u0Sg2EsG6InQxxYTX6r1CXPhZBFRAlvJcsn09sZ184vJXxMCwOirm.FT3Qqa1oyUbtQmNsu8FM1nAjHhkNGgENam3S4eC9HxDtHrqycbxiwThrOOLhyfAsZVcYMSiR0HAq9PdO9Kd2AoXEZ+K8bLNLJfHTNpqNUtkYqUy7IK1SJKfxHNSRXdRJm4vYiHSDj3YpMUvCZ4kuiWAhdPBo8FMd4FMbfeAbObfS.E12637C+zsSsl+25vYqULOg46PYEfZSOAAx2iIAD890p4leUy1sScJKt5XCQcynj3YogPcFZUDi8nA5x71sus1gWYtyEzxlwfOMoRRXbyqjFvelSgc7GYvNBn8UZJXwjaFIzrsJJYTQebPvgvkrVyyQk4u2lMKfyx4y5ofuZgQ5IHVerGv7IunYlONW0oa6B9dYmCihjEeRlGepvZ.+GxkjGwZ0twKaTuwqZ3L+TSlrv4xBlpjaQSqZkIVlisXIgGRD4TT9Bg6zUaZX+taZX1SyKkaLVHmMfQkOJhvdWsRPYDJzToVFpf+Spao7YYsTpjtPTeUKupoPj9.X1jGMevtPVvxyD53bV6hDy7g3LtuUHNeVH5kHkblN.0sypQW.Bd7fcvRrpaY1YDN2QDgjpnTqcHGAxPo8NqauCI9YRdjlDxppPVm98lFdQI.9d2iKF7q22MJmyG.90vN+RNxnr2.7twPNL+9upeMx.VmZEIzx.59clfYp6yo9xYEFd8L2PLrXaqrDWwNYuB7tArM2keOXtcAQcQuspEncx8SBvxpBppWQjMAbgohxkRchESkGa9JiOHprqJbun8Ppza1hw6ZK.uPI4GZ7l8lkMr2cxDPBpDrqau229g+AJlP4KRgxkrGKAQwPJaZVwuFOFWE9G3YjQq7yHGJHAbr+X5uXrrW61KA3KQUq+gqdq1NDjnqrWYHeDIBD6gzektWiFcOAOIZdudyc0EKGH.cIfJLm3QLBv6RyyXeAONdBbbzwJ1bpgIhoJtpzxHxQDQbUaOLIDx8LFIPIiXotg+3XhJWS81GKETytNH8tz4.rNeCusVOt6biu1biu9bi2Ztw2Xtw2btw2pbbJgtONRUYnda+b5fmd0zAg.LDCGYiU1iNsH3oVJKf6TRyZnX7wCK3o2m5S5uL3iWK1ZqFb+a93k54XbLUkc1kcDbsDrnv3k.U4I3j.Yt0psH1my3Qy3LpW0KAPQ8zoDgI1W3AZaoDtCVZ4xtifmqiiMtE+ktO.dmKVT8t86EWzc04hkku9b6T35n5q47eCowZ+uWZbYT24yDFcfcWH+DOOeNacqbGkx6+VPcDOQBJp4pZ1fz2XPt2iXJ.tlRTMcbm7W7Nlv70C9S3W1jcyUKUS1MeRjWdnfyV1+q+FCqZDlR5P+hu.PGNvrjNFdTgBRfh1GETFh8D7m5k90SJrdFsE.kL8mST2de0Xmhu4x1tylcPgfV0S87TWDtJvvK1mqcB745m.e15D3yMNA9bySfO25D3yWuTeTOSX6DIOLsIIXX3toEVV6VTXUC8WkN0wlA
Load any samplemap into the Sampler1, then press Refresh and you'll see the exact sample you've selected.
-
@Christoph-Hart well yes, and no.....
When I make a sample map and create a ch1 file for it and then load this (ready to ship) sample map - the audioWavewForm doesnt refresh at all... :-(
-
Have you selected a sample in the combobox?
-
@Christoph-Hart yep that fixed it - silly me . Thanks.
-
OK so for those of us trying to use this in any practical scenario - there's a couple of gotchas.....
So assuming a scenario where you want to load a sample map and display the audio at the same index position in all cases, so for example you have a set of hundreds of drum sample maps, each with just one wav file (at index zero obviously..).
So you swap out and load the new sample map and say:
AudioWaveform1.set("sampleIndex", 0);
and you will (sadly) discover your AudioWaveform will not display the new wav file...
The only way around this that I've found (and its sorta ugly) is to:
- set the AudioWaveform to some other index position (even if theres no file at that position) e.g.
AudioWaveform1.set("sampleIndex", 1);
- wait for it to set itself up...(use a timer) and then reapply:
AudioWaveform1.set("sampleIndex", 0);
You cannot do this:
AudioWaveform1.set("sampleIndex", 1); AudioWaveform1.set("sampleIndex", 0);
As again it fails to work
Here's my snippet of this cough "solution" at work... if any one has a better way of doing this please let me know...
HiseSnippet 1393.3oc4WEtaTaDDdctXf6JAUPTopJUIqn9iKRzn6.BTIDhK4RB5DDxoyAZU+QQK16c2Jr20Z85TthhT+Qef5i.OB8Qg2fzY2097ZykPHpPQsN+H2LyNi+1uY1YVOTvCHoobAxo4AyRHHmK65OiIm1eJlxPC1F47MtalER4+H9PxtbQ7VYRIm4SjOMAs0rDbZJID43z3gp06zbYj94sOXKbDlEPJUgPOiSCHOlFSkkZG16QznncwgjCnwVq918FDvY84Q7L.aMb6fRvAuDOg7DrZYK4hbtvNgTIW3KwRRJxY4s3gy7mx+UlY8OilReQDQIzE4CAxndWdTnBwJsn9SoQgCK3fTDxwcXIizvvHW2cOZHct9Rl4K0F7J8vlObV5zfWWa304rCOGK3srAdW00OPPSjkVTX6KbGvjDwXLjBrgkYsnk9kFt84vJXx0iwujrq.Dl6Q66zoyM71nSm0t2JsVoEjHRkdGhEdyqDFCUBc8tuWQLlPj84wIbFHzd0pKaUSTpFIebbRDQnhgtdSEgbcsWsvn1yReLkd27Des41q40PLiDcxX0XNGiFg0SIRU0nnONJ5EPYW6wYr.IkyZuVqW2p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4SXgZA3VuGmarawXSkwtEFQAEgB1a4+V+MCNMHL0nC8U+hfAxQ1kzovsKTPBF08IAkw3.A+4AluFRg0Ko0.njo+pglt6oj8l+MTttcVuCJFlU87f.0AguGX3E6yMOG9bqygO29b3yFmCety4vm6dN74GNUeTWSXyLIO1zjDTLbGSgkyNyKrZf9a3FCodA
-
This post is deleted! -
@Lindon I don't know much on this side.
But maybeEngine.getPreloadProgress()
can help you?