AudioWaveform and sampleIndex setting
-
So I have an AudioWaveform in my UI (well I have more than one but hey - not important there) and I want to be able to display the sample being played by the last played note....
So no problem setting the sampleIndex:
MyAudioWaveform.set("sampleIndex",<somevalue here>);
so I know what the note number is ...
any ideas on how I match this up with the sampleIndex in the currently loaded Sampler??
- cant see anything in Sampler API or waveForm API or here in the forums...but Im old and I've been known to miss stuff...
-
If you set the index to -1 and connect it to the sampler via processor ID it will do what you want automatically.
-
@d-healey thanks - it takes a little jiggery pokery to get this sorted : so setting = -1 means nothing is displayed in init or sample load... but easy fixable...
-
This post is deleted! -
@Lindon I've been meaning to get around this for ages. What's your method?
-
@DanH so basically my sampleLoad function now sets the sampleIndex = 0, so we are always displaying something at least...
and my onNote :
if (SamplerSpace.AudioWaveform1.get("sampleIndex") != -1) { SamplerSpace.AudioWaveform1.set("sampleIndex", -1); };