Displaying a waveform from a sampler
-
@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+25vYqULOg46PYEfZSOAAx2iIAD890p4leUy1sScJKt5XCQcynj3YogPcFZUDi8nA5x71sus1gWYtyEzxlwfOMoRRXbyqjFvelSgc7GYvNBn8UZJXwjaFIzrsJJYTQebPvgvkrVyyQk4u2lMKfyx4y5ofuZgQ5IHVerGv7IunYlONW0oa6B9d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OSX6DIOLsIIXX3toEVV6VTXUC8WkN0wlA
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.Dl6Q66zoyM71nSm0t2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JkvgwRMWu2HRDAmZcb9658X3BnXQ0C4ePbQ2yNWbZ4qu10.WOUCNu+aLirw+6mQdZT2UxmP54q97jOyyyW1U2S2SMB9eKnNhmIgQqEi2bgYf9vb+.h8jvkTSWMxcTxJ.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? -
@ustk - thanks - I looked at the API - just one question "the progress of what?"
-
@Lindon preload :)
-
@ustk lol - yes - the preload progress of what? The Sample Map? The AudioWaveForm ? my washingmachine?
and once i know what this is Im not sure how this helps me in any real way....
Actually this is a bit dis-ingenuouse of me..sorry. Yeah waiting for the sample map to load might be what I need - but I think what we need here... but its working right now so once I need to laod a bigger sample map and thus need some sort of async. call back method I think I might ask for that...
Hey @Christoph-Hart - how about it:
on async(event)
(just half joking here...)
-
@Lindon Apparently, it's the progress when loading samplemaps (maybe just audio samples too? don't know...) Sorry man that's all I know
-
@ustk Maybe just to replace your timer with something cleaner... Again, that's a side of Hise I don't really know...
-
@ustk yeah on async is the cleanest code solution ....